celldetective 1.3.7.post1__py3-none-any.whl → 1.3.8__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.
Files changed (31) hide show
  1. celldetective/_version.py +1 -1
  2. celldetective/gui/btrack_options.py +8 -8
  3. celldetective/gui/classifier_widget.py +8 -0
  4. celldetective/gui/configure_new_exp.py +1 -1
  5. celldetective/gui/json_readers.py +2 -4
  6. celldetective/gui/plot_signals_ui.py +38 -29
  7. celldetective/gui/process_block.py +1 -0
  8. celldetective/gui/processes/downloader.py +108 -0
  9. celldetective/gui/processes/measure_cells.py +346 -0
  10. celldetective/gui/processes/segment_cells.py +354 -0
  11. celldetective/gui/processes/track_cells.py +298 -0
  12. celldetective/gui/processes/train_segmentation_model.py +270 -0
  13. celldetective/gui/processes/train_signal_model.py +108 -0
  14. celldetective/gui/seg_model_loader.py +71 -25
  15. celldetective/gui/signal_annotator2.py +10 -7
  16. celldetective/gui/signal_annotator_options.py +1 -1
  17. celldetective/gui/tableUI.py +252 -20
  18. celldetective/gui/viewers.py +1 -1
  19. celldetective/io.py +53 -20
  20. celldetective/measure.py +12 -144
  21. celldetective/relative_measurements.py +40 -43
  22. celldetective/segmentation.py +48 -1
  23. celldetective/signals.py +84 -305
  24. celldetective/tracking.py +23 -24
  25. celldetective/utils.py +1 -1
  26. {celldetective-1.3.7.post1.dist-info → celldetective-1.3.8.dist-info}/METADATA +11 -2
  27. {celldetective-1.3.7.post1.dist-info → celldetective-1.3.8.dist-info}/RECORD +31 -25
  28. {celldetective-1.3.7.post1.dist-info → celldetective-1.3.8.dist-info}/WHEEL +1 -1
  29. {celldetective-1.3.7.post1.dist-info → celldetective-1.3.8.dist-info}/LICENSE +0 -0
  30. {celldetective-1.3.7.post1.dist-info → celldetective-1.3.8.dist-info}/entry_points.txt +0 -0
  31. {celldetective-1.3.7.post1.dist-info → celldetective-1.3.8.dist-info}/top_level.txt +0 -0
celldetective/tracking.py CHANGED
@@ -441,9 +441,14 @@ def interpolate_per_track(group_df):
441
441
 
442
442
  """
443
443
 
444
- interpolated_group = group_df.interpolate(method='linear',limit_direction="both")
444
+ for c in list(group_df.columns):
445
+ group_df_new_dtype = group_df[c].infer_objects(copy=False)
446
+ if group_df_new_dtype.dtype!='O':
447
+ group_df[c] = group_df_new_dtype.interpolate(method='linear',limit_direction="both")
448
+
449
+ #interpolated_group = group_df.interpolate(method='linear',limit_direction="both")
445
450
 
446
- return interpolated_group
451
+ return group_df
447
452
 
448
453
  def interpolate_nan_properties(trajectories, track_label="TRACK_ID"):
449
454
 
@@ -937,18 +942,6 @@ def track_at_position(pos, mode, return_tracks=False, view_on_napari=False, thre
937
942
  return df
938
943
  else:
939
944
  return None
940
-
941
- # # if return_labels or view_on_napari:
942
- # # labels = locate_labels(pos, population=mode)
943
- # # if view_on_napari:
944
- # # if stack_prefix is None:
945
- # # stack_prefix = ''
946
- # # stack = locate_stack(pos, prefix=stack_prefix)
947
- # # _view_on_napari(tracks=None, stack=stack, labels=labels)
948
- # # if return_labels:
949
- # # return labels
950
- # # else:
951
- # return None
952
945
 
953
946
  def write_first_detection_class(df, img_shape=None, edge_threshold=20, column_labels={'track': "TRACK_ID", 'time': 'FRAME', 'x': 'POSITION_X', 'y': 'POSITION_Y'}):
954
947
 
@@ -972,27 +965,33 @@ def write_first_detection_class(df, img_shape=None, edge_threshold=20, column_la
972
965
 
973
966
  column_labels : dict, optional
974
967
  A dictionary mapping logical column names to actual column names in `tab`. Keys include:
975
- - `'track'`: The column indicating the track ID (default: `"TRACK_ID"`).
976
- - `'time'`: The column indicating the frame/time (default: `"FRAME"`).
977
- - `'x'`: The column indicating the X-coordinate (default: `"POSITION_X"`).
978
- - `'y'`: The column indicating the Y-coordinate (default: `"POSITION_Y"`).
968
+
969
+ - `'track'`: The column indicating the track ID (default: `"TRACK_ID"`).
970
+ - `'time'`: The column indicating the frame/time (default: `"FRAME"`).
971
+ - `'x'`: The column indicating the X-coordinate (default: `"POSITION_X"`).
972
+ - `'y'`: The column indicating the Y-coordinate (default: `"POSITION_Y"`).
979
973
 
980
974
  Returns
981
975
  -------
982
976
  pandas.DataFrame
983
977
  The input DataFrame `df` with two additional columns:
984
- - `'class_firstdetection'`: A class assigned based on detection status:
985
- - `0`: Valid detection not near the edge and not at the initial frame.
986
- - `2`: Detection near the edge, at the initial frame, or no detection available.
987
- - `'t_firstdetection'`: The adjusted first detection time (in frame units):
988
- - `-1`: Indicates no valid detection or detection near the edge.
989
- - A float value representing the adjusted first detection time otherwise.
978
+
979
+ - `'class_firstdetection'`: A class assigned based on detection status:
980
+
981
+ - `0`: Valid detection not near the edge and not at the initial frame.
982
+ - `2`: Detection near the edge, at the initial frame, or no detection available.
983
+
984
+ - `'t_firstdetection'`: The adjusted first detection time (in frame units):
985
+
986
+ - `-1`: Indicates no valid detection or detection near the edge.
987
+ - A float value representing the adjusted first detection time otherwise.
990
988
 
991
989
  Notes
992
990
  -----
993
991
  - The function assumes that tracks are grouped and sorted by track ID and frame.
994
992
  - Detections near the edge or at the initial frame (frame 0) are considered invalid and assigned special values.
995
993
  - If `img_shape` is not provided, edge checks are skipped.
994
+
996
995
  """
997
996
 
998
997
  df = df.sort_values(by=[column_labels['track'],column_labels['time']])
celldetective/utils.py CHANGED
@@ -1794,7 +1794,7 @@ def ConfigSectionMap(path,section):
1794
1794
 
1795
1795
  """
1796
1796
 
1797
- Config = configparser.ConfigParser()
1797
+ Config = configparser.ConfigParser(interpolation=None)
1798
1798
  Config.read(path)
1799
1799
  dict1 = {}
1800
1800
  try:
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: celldetective
3
- Version: 1.3.7.post1
3
+ Version: 1.3.8
4
4
  Summary: description
5
5
  Home-page: http://github.com/remyeltorro/celldetective
6
6
  Author: Rémy Torro
@@ -30,6 +30,7 @@ Requires-Dist: setuptools
30
30
  Requires-Dist: scipy
31
31
  Requires-Dist: seaborn
32
32
  Requires-Dist: opencv-python-headless==4.7.0.72
33
+ Requires-Dist: PyQt5
33
34
  Requires-Dist: liblapack
34
35
  Requires-Dist: gputools
35
36
  Requires-Dist: lmfit
@@ -43,6 +44,14 @@ Requires-Dist: h5py
43
44
  Requires-Dist: cliffs_delta
44
45
  Requires-Dist: requests
45
46
  Requires-Dist: trackpy
47
+ Dynamic: author
48
+ Dynamic: author-email
49
+ Dynamic: description
50
+ Dynamic: description-content-type
51
+ Dynamic: home-page
52
+ Dynamic: license
53
+ Dynamic: requires-dist
54
+ Dynamic: summary
46
55
 
47
56
  # Celldetective
48
57
 
@@ -1,48 +1,48 @@
1
1
  celldetective/__init__.py,sha256=bi3SGTMo6s2qQBsJAaKy-a4xaGcTQVW8zsqaiX5XKeY,139
2
2
  celldetective/__main__.py,sha256=bxTlSvbKhqn3LW_azd2baDCnDsgb37PAP9DfuAJ1_5M,1844
3
- celldetective/_version.py,sha256=Yd44UrL9S8sic_5qacvIYizakEn80iQg_uqOQxs_-vo,28
3
+ celldetective/_version.py,sha256=47xEhOdVR5Y8-pZH8aVP6Z2UhhY8jGWTQ-rJHt5fIeU,22
4
4
  celldetective/events.py,sha256=UkjY_-THo6WviWWCLnDbma7jWOd_O9a60C4IOX2htG8,8254
5
5
  celldetective/extra_properties.py,sha256=y556D6EMjLGhtjDqRoOTRGa85XxTIe0K1Asb26VZXmo,5643
6
6
  celldetective/filters.py,sha256=DT3MyqNBSj3EMtb74oZUirdonKcwcowjtehTT72mrrk,4181
7
- celldetective/io.py,sha256=Rzwl51e0a77HzBCKG1r9M2kIHZekJ9NhdJ5Wl3RPyQA,123115
8
- celldetective/measure.py,sha256=qepAEl4XHcS0Jx6zeoRlPBG_pjYjfid2gLBRMhiyDyo,64445
7
+ celldetective/io.py,sha256=kD8jvaZJHndlYXM-NwVjesKs8tRQNYiZJCH5VHmk2uA,123067
8
+ celldetective/measure.py,sha256=IfmyRaGzYjlTKh6uVBdn4qLEm6LgXQstb5NlB_Blc8I,58291
9
9
  celldetective/neighborhood.py,sha256=s-zVsfGnPlqs6HlDJCXRh21lLiPKbA_S1JC6uZvfG_0,56712
10
10
  celldetective/preprocessing.py,sha256=Wlt_PJua97CpMuWe_M65znUmz_yjYPqWIcs2ZK_RLgk,44109
11
- celldetective/relative_measurements.py,sha256=ZviXp6-z_SB60e7z3GznqfEngv70waOK0sMxm_q-JJA,30546
12
- celldetective/segmentation.py,sha256=ONuAioeU4qGX7n_LoUVQuv8iHHD9N0D8Bjv2kDdMOrk,29411
13
- celldetective/signals.py,sha256=VYaJHJdLSJa8cyamTW0tvoX9nSH1V8BS687HOAwJKb4,121739
14
- celldetective/tracking.py,sha256=babNFkxtYDwoAl_WJcZC-GYItafKShV2PLSWimxM6oA,40361
15
- celldetective/utils.py,sha256=MP2bGjb_XUIhT397TJQjcggJPgpGksyRcHJpu9VTW8Q,108422
11
+ celldetective/relative_measurements.py,sha256=-GWig0lC5UWAcJSPlo9Sp45khGj80fxuQfFk-bdBca0,30117
12
+ celldetective/segmentation.py,sha256=ul8E-cjjaWxaMZfjAtbrH7joUjxbZSeb77GL3Alp5Os,30779
13
+ celldetective/signals.py,sha256=nMyyGUpla8D2sUYKY1zjbWsAueVPI_gUalY0KXfWteI,111595
14
+ celldetective/tracking.py,sha256=VBJLd-1EeJarOVPBNEomhVBh9UYAMdSnH0tmUiUoTrY,40242
15
+ celldetective/utils.py,sha256=lX9W8H7y4z8B5DajUDqAoXlycJbIIzOmX7O-2b7eb04,108440
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
19
19
  celldetective/gui/__init__.py,sha256=2_r2xfOj4_2xj0yBkCTIfzlF94AHKm-j6Pvpd7DddQc,989
20
20
  celldetective/gui/about.py,sha256=FJZrj6C-p6uqp_3UaprKosuW-Sw9_HPNQAvFbis9Gdk,1749
21
21
  celldetective/gui/analyze_block.py,sha256=h0sp7Tk3hZFM8w0yTidwIjZX4WRI-lQF3JCFObrLCPo,2761
22
- celldetective/gui/btrack_options.py,sha256=tY0XiDcsI4KDgwZtcaP7HWLJ_isxamM-7sFX-m5Dcwk,44662
23
- celldetective/gui/classifier_widget.py,sha256=UyElqL9Rq5cKcM6i8ZLGCqkMqqnSDaw6i_hRoV_7WSE,19817
24
- celldetective/gui/configure_new_exp.py,sha256=sRBGhMoQUP8-XchmfV6VvuFHceS4Q8qPY2ua7DQOaHI,20754
22
+ celldetective/gui/btrack_options.py,sha256=ZXaJuCdqB_BK1CFRbgZErlAlXMbzDF2DP7opLSd6III,44682
23
+ celldetective/gui/classifier_widget.py,sha256=nHWmaWXse2CxxRFmR4mA0JRADr5i0MsWldaqJQIQ-i8,19992
24
+ celldetective/gui/configure_new_exp.py,sha256=N4SdL-4Xo0XbTAkCtt1ywr74HmHc5eaPlHGv1XgxAX0,20772
25
25
  celldetective/gui/control_panel.py,sha256=1TWUCvEif19ZLy4pDUupPrGzIKnG6Tg6kWGp_R8OSG4,22045
26
26
  celldetective/gui/generic_signal_plot.py,sha256=Gv4KhA5vhbgVSj5jteE42T0aNCoQZtmIAUkEsMi6JNA,36309
27
27
  celldetective/gui/gui_utils.py,sha256=n9JVXBantJK3RFt8fQ7HJYKdCC4ezBMBwlgT5QT2I9o,39343
28
- celldetective/gui/json_readers.py,sha256=Su3angSobroeGrrumGgQcs3Cr_9l9p52-Hfm3qneVcI,3664
28
+ celldetective/gui/json_readers.py,sha256=SkI_bR1MlAKd8NLBmQUVjJfZ7mKiU_FEjgC4dUwBACk,3698
29
29
  celldetective/gui/layouts.py,sha256=XsqiHR58DXsG5SSD5S8KOtUv4yw-y-s2_wZx_XsHeJs,52013
30
30
  celldetective/gui/measurement_options.py,sha256=cfiC4lq-XqY4Sa4Vkw5mys7JKaa9tE2BgeN8_k-SIDY,40355
31
31
  celldetective/gui/neighborhood_options.py,sha256=FBNDvlzMPKp8s0Grxds90pCPHG1s27XrpMN0HV2gf0I,19839
32
32
  celldetective/gui/plot_measurements.py,sha256=n0pDUcYcsKlSMaUaBSVplGziuWp_7jKaeXdREs-MqyI,50848
33
- celldetective/gui/plot_signals_ui.py,sha256=-yKpmmWi0CDKazn3v49ArvykdQbtGIXx0ZwQ4yO8-eY,16641
34
- celldetective/gui/process_block.py,sha256=l16GS_xTeSqWIxYZj1lc4EwC3WOhZsE4k-GOTBKZR0o,71188
33
+ celldetective/gui/plot_signals_ui.py,sha256=u7b36pmjF8sf0Ctb9KCrnRcvAD3vlNaaIVkX3-rHCA0,17332
34
+ celldetective/gui/process_block.py,sha256=3v4q5kAq5uY6w0f3zyImXi_iTp8Qv2EFvzNjTEvqG9E,71210
35
35
  celldetective/gui/retrain_segmentation_model_options.py,sha256=7iawDN4kwq56Z-dX9kQe9tLW8B3YMrIW_D85LMAAYwk,23906
36
36
  celldetective/gui/retrain_signal_model_options.py,sha256=GCa0WKKsgmH2CFDHAKxPGbHtCE19p1_bbcWNasyZw5o,22482
37
- celldetective/gui/seg_model_loader.py,sha256=vWvPMU6nkTiQfI-x2WjQHrdJGFdV4a4Ne-4YIOq_YZ8,18153
37
+ celldetective/gui/seg_model_loader.py,sha256=b1BiHuAf_ZqroE4jSEVCo7ASQv-xyWMPWU799alpbNM,19727
38
38
  celldetective/gui/signal_annotator.py,sha256=9l_qbIO9V862eGk6mVOCXo0jsG8Z3WP9kx7wCBFGvKU,89014
39
- celldetective/gui/signal_annotator2.py,sha256=1OTGc6wKUDHitpRUOHuDMSoJbubLvh1sGR2YRN7oDeU,106289
40
- celldetective/gui/signal_annotator_options.py,sha256=ztFFgA70SJ0QkntxYGsgDNCvSuSR5GjF7_J6pYVYc1g,11020
39
+ celldetective/gui/signal_annotator2.py,sha256=qBDPk3UHmMoY4_i5KJt3Nr8kxjLOkYay_xNc6xrn_pE,106340
40
+ celldetective/gui/signal_annotator_options.py,sha256=ekxy7Qtw5EGqXa82KdZezaSlmprSAGMW2ZZoE1SObRM,11013
41
41
  celldetective/gui/styles.py,sha256=SZy_ACkA6QB_4ANyY1V0m1QF66C0SVGssOrwW1Qt1Aw,5076
42
42
  celldetective/gui/survival_ui.py,sha256=J4ZYjX8ne0wT0ruQu9WL3WfLnRIAQalkaAR8ngb7PkI,14170
43
- celldetective/gui/tableUI.py,sha256=89TB_U2l4rhYCpEr3RicratMOp74Spx3ioBeM5lnbHA,51021
43
+ celldetective/gui/tableUI.py,sha256=Yz_pHk1ERXRb0QsBPrvLEwAGpvVlawgn1b6uzz5wL_0,58022
44
44
  celldetective/gui/thresholds_gui.py,sha256=VjCVBCDsNh_LoXfEqUn32nsYQwO9-Elh3Gl1RBv7acc,48756
45
- celldetective/gui/viewers.py,sha256=mne5GLFAjv-vxMABXP7I9VhrJGtPnZj560HLdlwDZSU,47806
45
+ celldetective/gui/viewers.py,sha256=HDLB6j1FJwgKR6dQwzeHmcDvDMbDIYwD2svd-VZhJFE,47806
46
46
  celldetective/gui/workers.py,sha256=P4qUMXuCtGcggGmJr3VitAPSfRG30wkJ1B0pfcdGbKg,4225
47
47
  celldetective/gui/help/DL-segmentation-strategy.json,sha256=PZD9xXjrwbX3TiudHJPuvcyZD28o4k-fVgeTd7dBKzI,1583
48
48
  celldetective/gui/help/Threshold-vs-DL.json,sha256=rrFnZT2DhyS7g1nIDWeUV8-HH7M2Sv8D7sDCGBU1M_0,934
@@ -55,6 +55,12 @@ celldetective/gui/help/preprocessing.json,sha256=M-AxW6zYB5oDiQdoc9wcky8C5p0m6uv
55
55
  celldetective/gui/help/propagate-classification.json,sha256=F7Ir1mtgRVTXWLN7n3ny3vrU01LFNeDh5dN2QBIXHqE,1227
56
56
  celldetective/gui/help/track-postprocessing.json,sha256=VaGd8EEkA33OL-EI3NXWZ8yHeWWyUeImDF5yAjsVYGA,3990
57
57
  celldetective/gui/help/tracking.json,sha256=yIAoOToqCSQ_XF4gwEZCcyXcvQ3mROju263ZPDvlUyY,776
58
+ celldetective/gui/processes/downloader.py,sha256=SuMTuM82QOZBqLfj36I14fhZ2k3NmLp0PBcGUHxnpXI,3287
59
+ celldetective/gui/processes/measure_cells.py,sha256=1nJNHhLKHBL7kVsmmPbWv0NHcar0D8Gihjj_AD1UxnI,12851
60
+ celldetective/gui/processes/segment_cells.py,sha256=AVdRGuDnoQcrevk7itiEu5xluBeqaqXRSFVZAd7q91g,11313
61
+ celldetective/gui/processes/track_cells.py,sha256=og23iqc7WyVbpqsdygltVjejLGUVIb5ocxAForGnhl0,9947
62
+ celldetective/gui/processes/train_segmentation_model.py,sha256=bvcPG19hBjhNY9hd6Ch5_wk2FOJYQg97Azoz4RKeP-0,10776
63
+ celldetective/gui/processes/train_signal_model.py,sha256=qqqkq9gdvNyvycYkmzWgRXWvsbEozyzNWP_POGvnlIs,3816
58
64
  celldetective/icons/logo-large.png,sha256=FXSwV3u6zEKcfpuSn4unnqB0oUnN9cHqQ9BCKWytrpg,36631
59
65
  celldetective/icons/logo.png,sha256=wV2OS8_dU5Td5cgdPbCOU3JpMpTwNuYLnfVcnQX0tJA,2437
60
66
  celldetective/icons/signals_icon.png,sha256=vEiKoqWTtN0-uJgVqtAlwCuP-f4QeWYOlO3sdp2tg2w,3969
@@ -100,9 +106,9 @@ tests/test_segmentation.py,sha256=k1b_zIZdlytEdJcHjAUQEO3gTBAHtv5WvrwQN2xD4kc,34
100
106
  tests/test_signals.py,sha256=No4cah6KxplhDcKXnU8RrA7eDla4hWw6ccf7xGnBokU,3599
101
107
  tests/test_tracking.py,sha256=8hebWSqEIuttD1ABn-6dKCT7EXKRR7-4RwyFWi1WPFo,8800
102
108
  tests/test_utils.py,sha256=NKRCAC1d89aBK5cWjTb7-pInYow901RrT-uBlIdz4KI,3692
103
- celldetective-1.3.7.post1.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
104
- celldetective-1.3.7.post1.dist-info/METADATA,sha256=HWoXnuZNCWSAXVbN9dyKLFOJHnt4lX-QjsFLtYSHB10,10563
105
- celldetective-1.3.7.post1.dist-info/WHEEL,sha256=A3WOREP4zgxI0fKrHUG8DC8013e3dK3n7a6HDbcEIwE,91
106
- celldetective-1.3.7.post1.dist-info/entry_points.txt,sha256=2NU6_EOByvPxqBbCvjwxlVlvnQreqZ3BKRCVIKEv3dg,62
107
- celldetective-1.3.7.post1.dist-info/top_level.txt,sha256=6rsIKKfGMKgud7HPuATcpq6EhdXwcg_yknBVWn9x4C4,20
108
- celldetective-1.3.7.post1.dist-info/RECORD,,
109
+ celldetective-1.3.8.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
110
+ celldetective-1.3.8.dist-info/METADATA,sha256=z9xNWbdnrXwtyVXG_C8WjV8GR3bCl3Ivs8T9erqRwDs,10747
111
+ celldetective-1.3.8.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
112
+ celldetective-1.3.8.dist-info/entry_points.txt,sha256=2NU6_EOByvPxqBbCvjwxlVlvnQreqZ3BKRCVIKEv3dg,62
113
+ celldetective-1.3.8.dist-info/top_level.txt,sha256=6rsIKKfGMKgud7HPuATcpq6EhdXwcg_yknBVWn9x4C4,20
114
+ celldetective-1.3.8.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.7.0)
2
+ Generator: setuptools (75.8.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5