celldetective 1.3.9.post3__py3-none-any.whl → 1.3.9.post4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
celldetective/_version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "1.3.9.post3"
1
+ __version__ = "1.3.9.post4"
@@ -181,7 +181,7 @@ def intensity_nanmean(regionmask, intensity_image):
181
181
  else:
182
182
  return np.nanmean(intensity_image[regionmask])
183
183
 
184
- def intensity_centre_of_mass_displacement(regionmask, intensity_image):
184
+ def intensity_center_of_mass_displacement(regionmask, intensity_image):
185
185
 
186
186
  if np.any(intensity_image!=intensity_image):
187
187
  intensity_image = interpolate_nan(intensity_image.copy())
@@ -211,7 +211,7 @@ def intensity_centre_of_mass_displacement(regionmask, intensity_image):
211
211
  return np.nan, np.nan, np.nan, np.nan
212
212
 
213
213
 
214
- def intensity_centre_of_mass_displacement_edge(regionmask, intensity_image):
214
+ def intensity_center_of_mass_displacement_edge(regionmask, intensity_image):
215
215
 
216
216
  if np.any(intensity_image!=intensity_image):
217
217
  intensity_image = interpolate_nan(intensity_image.copy())
@@ -108,10 +108,17 @@ class CustomRegionProps(RegionProperties):
108
108
 
109
109
  idx = self.channel_names.index(default_channel)
110
110
  res = func(self.image, self.image_intensity[..., idx])
111
- len_output = len(res)
111
+ if isinstance(res, tuple):
112
+ len_output = len(res)
113
+ else:
114
+ len_output = 1
112
115
 
113
- multichannel_list = [[np.nan]*len_output for c in range(len(self.channel_names))]
114
- multichannel_list[idx] = res
116
+ if len_output > 1:
117
+ multichannel_list = [[np.nan]*len_output for c in range(len(self.channel_names))]
118
+ multichannel_list[idx] = res
119
+ else:
120
+ multichannel_list = [np.nan for c in range(len(self.channel_names))]
121
+ multichannel_list[idx] = res
115
122
 
116
123
  else:
117
124
  print(f'Warning... Channel required by custom measurement ({default_channel}) could not be found in your data...')
celldetective/utils.py CHANGED
@@ -1264,7 +1264,6 @@ def rename_intensity_column(df, channels):
1264
1264
  if s.isdigit():
1265
1265
  if int(s)<len(channel_names):
1266
1266
  test_digit[j] = True
1267
- print(f"{test_digit=}")
1268
1267
 
1269
1268
  if np.any(test_digit):
1270
1269
  index = int(sections[np.where(test_digit)[0]][-1])
@@ -1289,36 +1288,36 @@ def rename_intensity_column(df, channels):
1289
1288
  new_name = np.delete(measure, -1)
1290
1289
  new_name = '_'.join(list(new_name))
1291
1290
  if 'edge' in intensity_cols[k]:
1292
- new_name = new_name.replace('centre_of_mass_displacement', "edge_centre_of_mass_displacement_in_px")
1291
+ new_name = new_name.replace('center_of_mass_displacement', "edge_center_of_mass_displacement_in_px")
1293
1292
  else:
1294
- new_name = new_name.replace('centre_of_mass', "centre_of_mass_displacement_in_px")
1293
+ new_name = new_name.replace('center_of_mass', "center_of_mass_displacement_in_px")
1295
1294
  to_rename.update({intensity_cols[k]: new_name.replace('-', '_')})
1296
1295
 
1297
1296
  elif sections[-2] == "1":
1298
1297
  new_name = np.delete(measure, -1)
1299
1298
  new_name = '_'.join(list(new_name))
1300
1299
  if 'edge' in intensity_cols[k]:
1301
- new_name = new_name.replace('centre_of_mass_displacement', "edge_centre_of_mass_orientation")
1300
+ new_name = new_name.replace('center_of_mass_displacement', "edge_center_of_mass_orientation")
1302
1301
  else:
1303
- new_name = new_name.replace('centre_of_mass', "centre_of_mass_orientation")
1302
+ new_name = new_name.replace('center_of_mass', "center_of_mass_orientation")
1304
1303
  to_rename.update({intensity_cols[k]: new_name.replace('-', '_')})
1305
1304
 
1306
1305
  elif sections[-2] == "2":
1307
1306
  new_name = np.delete(measure, -1)
1308
1307
  new_name = '_'.join(list(new_name))
1309
1308
  if 'edge' in intensity_cols[k]:
1310
- new_name = new_name.replace('centre_of_mass_displacement', "edge_centre_of_mass_x")
1309
+ new_name = new_name.replace('center_of_mass_displacement', "edge_center_of_mass_x")
1311
1310
  else:
1312
- new_name = new_name.replace('centre_of_mass', "centre_of_mass_x")
1311
+ new_name = new_name.replace('center_of_mass', "center_of_mass_x")
1313
1312
  to_rename.update({intensity_cols[k]: new_name.replace('-', '_')})
1314
1313
 
1315
1314
  elif sections[-2] == "3":
1316
1315
  new_name = np.delete(measure, -1)
1317
1316
  new_name = '_'.join(list(new_name))
1318
1317
  if 'edge' in intensity_cols[k]:
1319
- new_name = new_name.replace('centre_of_mass_displacement', "edge_centre_of_mass_y")
1318
+ new_name = new_name.replace('center_of_mass_displacement', "edge_center_of_mass_y")
1320
1319
  else:
1321
- new_name = new_name.replace('centre_of_mass', "centre_of_mass_y")
1320
+ new_name = new_name.replace('center_of_mass', "center_of_mass_y")
1322
1321
  to_rename.update({intensity_cols[k]: new_name.replace('-', '_')})
1323
1322
 
1324
1323
  if 'radial_gradient' in intensity_cols[k]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: celldetective
3
- Version: 1.3.9.post3
3
+ Version: 1.3.9.post4
4
4
  Summary: description
5
5
  Home-page: http://github.com/remyeltorro/celldetective
6
6
  Author: Rémy Torro
@@ -1,8 +1,8 @@
1
1
  celldetective/__init__.py,sha256=bi3SGTMo6s2qQBsJAaKy-a4xaGcTQVW8zsqaiX5XKeY,139
2
2
  celldetective/__main__.py,sha256=bxTlSvbKhqn3LW_azd2baDCnDsgb37PAP9DfuAJ1_5M,1844
3
- celldetective/_version.py,sha256=7LdGJtBuAQ99wkn-0aLzi5WGP1RCrguzXtOTqLyM6m8,28
3
+ celldetective/_version.py,sha256=-wBVuq0KoOI1lWnD4DhV-4xOLeDCprVOid1FqpG037I,28
4
4
  celldetective/events.py,sha256=UkjY_-THo6WviWWCLnDbma7jWOd_O9a60C4IOX2htG8,8254
5
- celldetective/extra_properties.py,sha256=nP_EX2yxJuZRP283uYzN8km-_uOfW94u0zD_K2bIub8,8689
5
+ celldetective/extra_properties.py,sha256=LRJ1SRp9dvH_tpSEYv25wJFvaSg-95jFpzKLZwWvA3I,8689
6
6
  celldetective/filters.py,sha256=6pl2IGPK2FH8KPWbjzQEbT4C-ruqE1fQ8NQNN7Euvy8,4433
7
7
  celldetective/io.py,sha256=KDb1N7ccUAUXKE2NHo9TIC7A5u2A9wYieGteoa0ymN0,121754
8
8
  celldetective/measure.py,sha256=h1F08Vf7sy-20syMFZTUl1lHzE4h6cQvswJpwD9fcfE,58475
@@ -12,7 +12,7 @@ celldetective/relative_measurements.py,sha256=-GWig0lC5UWAcJSPlo9Sp45khGj80fxuQf
12
12
  celldetective/segmentation.py,sha256=WApzoU1s3Ntvp0eIw_pRZXNwCA8LDKC9YoyR52tioz4,30943
13
13
  celldetective/signals.py,sha256=nMyyGUpla8D2sUYKY1zjbWsAueVPI_gUalY0KXfWteI,111595
14
14
  celldetective/tracking.py,sha256=VBJLd-1EeJarOVPBNEomhVBh9UYAMdSnH0tmUiUoTrY,40242
15
- celldetective/utils.py,sha256=0LENOCxNMuEmClLiyvo_jIO2as4i7a5bMk1NaXUhgVs,104430
15
+ celldetective/utils.py,sha256=u9mvb4ajP4eE_usnkz9fBxkVOLrd2HfuPPE9FgAhTbc,104404
16
16
  celldetective/datasets/segmentation_annotations/blank,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  celldetective/datasets/signal_annotations/blank,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
18
  celldetective/gui/InitWindow.py,sha256=TPKWYczhPHvPKWg654sXnE9xCEx6U-oWX0_OJgLTWbU,15044
@@ -99,7 +99,7 @@ celldetective/models/tracking_configs/no_z_motion.json,sha256=b4RWOJ0w6Y2e0vJYwK
99
99
  celldetective/models/tracking_configs/ricm.json,sha256=L-vmwCR1f89U-qnH2Ms0cBfPFR_dxIWoe2ccH8V-QBA,2727
100
100
  celldetective/models/tracking_configs/ricm2.json,sha256=DDjJ6ScYcDWvlsy7ujPID8v8H28vcNcMuZmNR8XmGxo,2718
101
101
  celldetective/regionprops/__init__.py,sha256=ohe9vC7j4lnpKnGXidVo1PVfoQfC8TqCuHTNo8rXmdg,44
102
- celldetective/regionprops/_regionprops.py,sha256=5pxet-E2Eg6bSs7n0xjknDPQr15G14nUAqPRfDffzz0,10042
102
+ celldetective/regionprops/_regionprops.py,sha256=a68bAytxgy-WFUzrjWg-xViSE27ehN9PdKfyO-dxKxM,10275
103
103
  celldetective/regionprops/props.json,sha256=sCwACmbh0n-JAw9eve9yV85REukoMBJLsRjxCwTRMm8,2424
104
104
  celldetective/scripts/analyze_signals.py,sha256=YE05wZujl2hQFWkvqATBcCx-cAd_V3RxnvKoh0SB7To,2194
105
105
  celldetective/scripts/measure_cells.py,sha256=edZ9xlUsLg1TI_yudp7bd04B_oqdHk9Ee4mSDe8G86w,11769
@@ -121,9 +121,9 @@ tests/test_segmentation.py,sha256=k1b_zIZdlytEdJcHjAUQEO3gTBAHtv5WvrwQN2xD4kc,34
121
121
  tests/test_signals.py,sha256=No4cah6KxplhDcKXnU8RrA7eDla4hWw6ccf7xGnBokU,3599
122
122
  tests/test_tracking.py,sha256=8hebWSqEIuttD1ABn-6dKCT7EXKRR7-4RwyFWi1WPFo,8800
123
123
  tests/test_utils.py,sha256=NKRCAC1d89aBK5cWjTb7-pInYow901RrT-uBlIdz4KI,3692
124
- celldetective-1.3.9.post3.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
125
- celldetective-1.3.9.post3.dist-info/METADATA,sha256=IH5Ea7-lEKV8k_kgSYxLmxN9mB_IcncHnRExw5HSN5w,10753
126
- celldetective-1.3.9.post3.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
127
- celldetective-1.3.9.post3.dist-info/entry_points.txt,sha256=2NU6_EOByvPxqBbCvjwxlVlvnQreqZ3BKRCVIKEv3dg,62
128
- celldetective-1.3.9.post3.dist-info/top_level.txt,sha256=6rsIKKfGMKgud7HPuATcpq6EhdXwcg_yknBVWn9x4C4,20
129
- celldetective-1.3.9.post3.dist-info/RECORD,,
124
+ celldetective-1.3.9.post4.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
125
+ celldetective-1.3.9.post4.dist-info/METADATA,sha256=_UdO696o0Et9eTWHRKOl6NSn8eC8puV1y1G25M8qCEU,10753
126
+ celldetective-1.3.9.post4.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
127
+ celldetective-1.3.9.post4.dist-info/entry_points.txt,sha256=2NU6_EOByvPxqBbCvjwxlVlvnQreqZ3BKRCVIKEv3dg,62
128
+ celldetective-1.3.9.post4.dist-info/top_level.txt,sha256=6rsIKKfGMKgud7HPuATcpq6EhdXwcg_yknBVWn9x4C4,20
129
+ celldetective-1.3.9.post4.dist-info/RECORD,,