microlive 1.0.24__tar.gz → 1.0.25__tar.gz

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 (27) hide show
  1. {microlive-1.0.24 → microlive-1.0.25}/PKG-INFO +1 -1
  2. {microlive-1.0.24 → microlive-1.0.25}/microlive/__init__.py +1 -1
  3. {microlive-1.0.24 → microlive-1.0.25}/microlive/gui/app.py +34 -10
  4. {microlive-1.0.24 → microlive-1.0.25}/.gitignore +0 -0
  5. {microlive-1.0.24 → microlive-1.0.25}/LICENSE +0 -0
  6. {microlive-1.0.24 → microlive-1.0.25}/README.md +0 -0
  7. {microlive-1.0.24 → microlive-1.0.25}/microlive/data/__init__.py +0 -0
  8. {microlive-1.0.24 → microlive-1.0.25}/microlive/data/icons/__init__.py +0 -0
  9. {microlive-1.0.24 → microlive-1.0.25}/microlive/data/icons/icon_micro.png +0 -0
  10. {microlive-1.0.24 → microlive-1.0.25}/microlive/data/models/__init__.py +0 -0
  11. {microlive-1.0.24 → microlive-1.0.25}/microlive/data/models/spot_detection_cnn.pth +0 -0
  12. {microlive-1.0.24 → microlive-1.0.25}/microlive/gui/__init__.py +0 -0
  13. {microlive-1.0.24 → microlive-1.0.25}/microlive/gui/main.py +0 -0
  14. {microlive-1.0.24 → microlive-1.0.25}/microlive/gui/micro_mac.command +0 -0
  15. {microlive-1.0.24 → microlive-1.0.25}/microlive/gui/micro_windows.bat +0 -0
  16. {microlive-1.0.24 → microlive-1.0.25}/microlive/imports.py +0 -0
  17. {microlive-1.0.24 → microlive-1.0.25}/microlive/microscopy.py +0 -0
  18. {microlive-1.0.24 → microlive-1.0.25}/microlive/ml_spot_detection.py +0 -0
  19. {microlive-1.0.24 → microlive-1.0.25}/microlive/pipelines/__init__.py +0 -0
  20. {microlive-1.0.24 → microlive-1.0.25}/microlive/pipelines/pipeline_FRAP.py +0 -0
  21. {microlive-1.0.24 → microlive-1.0.25}/microlive/pipelines/pipeline_folding_efficiency.py +0 -0
  22. {microlive-1.0.24 → microlive-1.0.25}/microlive/pipelines/pipeline_particle_tracking.py +0 -0
  23. {microlive-1.0.24 → microlive-1.0.25}/microlive/utils/__init__.py +0 -0
  24. {microlive-1.0.24 → microlive-1.0.25}/microlive/utils/device.py +0 -0
  25. {microlive-1.0.24 → microlive-1.0.25}/microlive/utils/model_downloader.py +0 -0
  26. {microlive-1.0.24 → microlive-1.0.25}/microlive/utils/resources.py +0 -0
  27. {microlive-1.0.24 → microlive-1.0.25}/pyproject.toml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: microlive
3
- Version: 1.0.24
3
+ Version: 1.0.25
4
4
  Summary: Live-cell microscopy image analysis and single-molecule measurements
5
5
  Project-URL: Homepage, https://github.com/ningzhaoAnschutz/microlive
6
6
  Project-URL: Documentation, https://github.com/ningzhaoAnschutz/microlive/blob/main/docs/user_guide.md
@@ -23,7 +23,7 @@ Authors:
23
23
  Nathan L. Nowling, Brian Munsky, Ning Zhao
24
24
  """
25
25
 
26
- __version__ = "1.0.24"
26
+ __version__ = "1.0.25"
27
27
  __author__ = "Luis U. Aguilera, William S. Raymond, Rhiannon M. Sears, Nathan L. Nowling, Brian Munsky, Ning Zhao"
28
28
 
29
29
  # Package name (for backward compatibility)
@@ -3405,6 +3405,13 @@ class GUI(QMainWindow):
3405
3405
  except Exception:
3406
3406
  pass
3407
3407
 
3408
+ # Clear any existing mask from other segmentation methods (e.g., watershed)
3409
+ # This ensures the user starts with a clean canvas for manual drawing
3410
+ current_mode = getattr(self, 'segmentation_mode', None)
3411
+ if current_mode != 'manual' and self.segmentation_mask is not None:
3412
+ self.segmentation_mask = None
3413
+ self._original_watershed_mask = None # Also clear the watershed backup
3414
+
3408
3415
  # Connect click handler for polygon vertices
3409
3416
  self.cid_manual = self.canvas_segmentation.mpl_connect(
3410
3417
  'button_press_event', self.on_polygon_click
@@ -6380,7 +6387,7 @@ class GUI(QMainWindow):
6380
6387
 
6381
6388
  self.cellpose_cyto_diameter_input = QDoubleSpinBox()
6382
6389
  self.cellpose_cyto_diameter_input.setRange(0, 1000)
6383
- self.cellpose_cyto_diameter_input.setValue(150)
6390
+ self.cellpose_cyto_diameter_input.setValue(350)
6384
6391
  cyto_layout.addRow("Diameter (px):", self.cellpose_cyto_diameter_input)
6385
6392
 
6386
6393
  self.chk_optimize_cyto = QCheckBox("Optimize Parameters")
@@ -9665,11 +9672,8 @@ class GUI(QMainWindow):
9665
9672
  self.display_correlation_plot()
9666
9673
  self.channels_spots = [self.current_channel]
9667
9674
  self.populate_colocalization_channels()
9668
- # Reset verification subtabs
9669
- if hasattr(self, 'verify_visual_scroll_area'):
9670
- self.verify_visual_scroll_area.setWidget(QWidget())
9671
- if hasattr(self, 'verify_distance_scroll_area'):
9672
- self.verify_distance_scroll_area.setWidget(QWidget())
9675
+ # Note: Verification subtabs (Verify Visual, Verify Distance) are already
9676
+ # reset at the start of perform_particle_tracking() via reset_colocalization_tab()
9673
9677
  self.MIN_FRAMES_MSD = 20
9674
9678
  self.MIN_PARTICLES_MSD = 10
9675
9679
 
@@ -11778,7 +11782,7 @@ class GUI(QMainWindow):
11778
11782
  num_z = image.shape[1]
11779
11783
  max_proj = np.max(image, axis=1, keepdims=True)
11780
11784
  image = np.repeat(max_proj, num_z, axis=1)
11781
- crop_size = int(self.yx_spot_size_in_px) + 5
11785
+ crop_size = int(self.yx_spot_size_in_px) + 7
11782
11786
  if crop_size % 2 == 0:
11783
11787
  crop_size += 1
11784
11788
 
@@ -12326,6 +12330,22 @@ class GUI(QMainWindow):
12326
12330
  self.dist_coloc_zoom_label.setText("🔍 Full View")
12327
12331
  self.dist_coloc_zoom_label.setStyleSheet("color: #888888; font-size: 10px;")
12328
12332
 
12333
+ # === Reset Verify Visual sub-tab ===
12334
+ if hasattr(self, 'verify_visual_scroll_area'):
12335
+ self.verify_visual_scroll_area.setWidget(QWidget())
12336
+ if hasattr(self, 'verify_visual_checkboxes'):
12337
+ self.verify_visual_checkboxes = []
12338
+ if hasattr(self, 'verify_visual_stats_label'):
12339
+ self.verify_visual_stats_label.setText("Run Visual colocalization first, then click Populate")
12340
+
12341
+ # === Reset Verify Distance sub-tab ===
12342
+ if hasattr(self, 'verify_distance_scroll_area'):
12343
+ self.verify_distance_scroll_area.setWidget(QWidget())
12344
+ if hasattr(self, 'verify_distance_checkboxes'):
12345
+ self.verify_distance_checkboxes = []
12346
+ if hasattr(self, 'verify_distance_stats_label'):
12347
+ self.verify_distance_stats_label.setText("Run Distance colocalization first, then click Populate")
12348
+
12329
12349
  # === Reset Manual Verify sub-tab ===
12330
12350
  self.reset_manual_colocalization()
12331
12351
 
@@ -13937,7 +13957,7 @@ class GUI(QMainWindow):
13937
13957
  return
13938
13958
 
13939
13959
  # Create crops and determine colocalization status
13940
- crop_size = int(getattr(self, 'yx_spot_size_in_px', 5)) + 5
13960
+ crop_size = int(getattr(self, 'yx_spot_size_in_px', 5)) + 7
13941
13961
  if crop_size % 2 == 0:
13942
13962
  crop_size += 1
13943
13963
 
@@ -14220,9 +14240,13 @@ class GUI(QMainWindow):
14220
14240
  for ch_idx, ch in enumerate(channels[:2]):
14221
14241
  if ch < crop_block.shape[-1]:
14222
14242
  channel_crop = crop_block[:, :, ch]
14223
- cmin, cmax = np.nanmin(channel_crop), np.nanmax(channel_crop)
14243
+ # Use 1st-99th percentile for normalization to reduce noise amplification
14244
+ cmin = np.nanpercentile(channel_crop, 1)
14245
+ cmax = np.nanpercentile(channel_crop, 99)
14224
14246
  if cmax > cmin:
14225
- norm = ((channel_crop - cmin) / (cmax - cmin) * 255).astype(np.uint8)
14247
+ # Clip values outside the percentile range
14248
+ clipped = np.clip(channel_crop, cmin, cmax)
14249
+ norm = ((clipped - cmin) / (cmax - cmin) * 255).astype(np.uint8)
14226
14250
  else:
14227
14251
  norm = np.zeros_like(channel_crop, np.uint8)
14228
14252
  h, w = norm.shape
File without changes
File without changes
File without changes
File without changes