closed-loop-microscopy 1.1.0__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 (73) hide show
  1. closed_loop_microscopy-1.1.0/LICENSE.md +7 -0
  2. closed_loop_microscopy-1.1.0/PKG-INFO +118 -0
  3. closed_loop_microscopy-1.1.0/README.md +76 -0
  4. closed_loop_microscopy-1.1.0/pyproject.toml +141 -0
  5. closed_loop_microscopy-1.1.0/src/pyclm/__init__.py +26 -0
  6. closed_loop_microscopy-1.1.0/src/pyclm/__main__.py +8 -0
  7. closed_loop_microscopy-1.1.0/src/pyclm/check.py +931 -0
  8. closed_loop_microscopy-1.1.0/src/pyclm/cli.py +256 -0
  9. closed_loop_microscopy-1.1.0/src/pyclm/commands.py +183 -0
  10. closed_loop_microscopy-1.1.0/src/pyclm/controller.py +447 -0
  11. closed_loop_microscopy-1.1.0/src/pyclm/convert_hdf5s.py +273 -0
  12. closed_loop_microscopy-1.1.0/src/pyclm/core/__init__.py +20 -0
  13. closed_loop_microscopy-1.1.0/src/pyclm/core/base_process.py +166 -0
  14. closed_loop_microscopy-1.1.0/src/pyclm/core/core_interface.py +47 -0
  15. closed_loop_microscopy-1.1.0/src/pyclm/core/datatypes.py +142 -0
  16. closed_loop_microscopy-1.1.0/src/pyclm/core/events.py +194 -0
  17. closed_loop_microscopy-1.1.0/src/pyclm/core/experiments.py +403 -0
  18. closed_loop_microscopy-1.1.0/src/pyclm/core/grid.py +272 -0
  19. closed_loop_microscopy-1.1.0/src/pyclm/core/kinds.py +42 -0
  20. closed_loop_microscopy-1.1.0/src/pyclm/core/manager.py +861 -0
  21. closed_loop_microscopy-1.1.0/src/pyclm/core/measure.py +266 -0
  22. closed_loop_microscopy-1.1.0/src/pyclm/core/messages.py +124 -0
  23. closed_loop_microscopy-1.1.0/src/pyclm/core/microscope.py +504 -0
  24. closed_loop_microscopy-1.1.0/src/pyclm/core/pattern_process.py +282 -0
  25. closed_loop_microscopy-1.1.0/src/pyclm/core/patterns/__init__.py +60 -0
  26. closed_loop_microscopy-1.1.0/src/pyclm/core/patterns/bar_patterns.py +259 -0
  27. closed_loop_microscopy-1.1.0/src/pyclm/core/patterns/cell_intensity_patterns.py +181 -0
  28. closed_loop_microscopy-1.1.0/src/pyclm/core/patterns/composite.py +220 -0
  29. closed_loop_microscopy-1.1.0/src/pyclm/core/patterns/embryo_patterns.py +90 -0
  30. closed_loop_microscopy-1.1.0/src/pyclm/core/patterns/fbc_cell_movement.py +295 -0
  31. closed_loop_microscopy-1.1.0/src/pyclm/core/patterns/pattern.py +610 -0
  32. closed_loop_microscopy-1.1.0/src/pyclm/core/patterns/pulse_patterns.py +261 -0
  33. closed_loop_microscopy-1.1.0/src/pyclm/core/patterns/static_patterns.py +58 -0
  34. closed_loop_microscopy-1.1.0/src/pyclm/core/patterns/wave_patterns.py +95 -0
  35. closed_loop_microscopy-1.1.0/src/pyclm/core/patterns/zoo.py +231 -0
  36. closed_loop_microscopy-1.1.0/src/pyclm/core/plan.py +623 -0
  37. closed_loop_microscopy-1.1.0/src/pyclm/core/position_mover.py +185 -0
  38. closed_loop_microscopy-1.1.0/src/pyclm/core/queues.py +41 -0
  39. closed_loop_microscopy-1.1.0/src/pyclm/core/real_core.py +158 -0
  40. closed_loop_microscopy-1.1.0/src/pyclm/core/router.py +422 -0
  41. closed_loop_microscopy-1.1.0/src/pyclm/core/segmentation/__init__.py +2 -0
  42. closed_loop_microscopy-1.1.0/src/pyclm/core/segmentation/cellpose_segmentation.py +113 -0
  43. closed_loop_microscopy-1.1.0/src/pyclm/core/segmentation/segmentation.py +48 -0
  44. closed_loop_microscopy-1.1.0/src/pyclm/core/segmentation_process.py +179 -0
  45. closed_loop_microscopy-1.1.0/src/pyclm/core/settings.py +120 -0
  46. closed_loop_microscopy-1.1.0/src/pyclm/core/storage/__init__.py +37 -0
  47. closed_loop_microscopy-1.1.0/src/pyclm/core/storage/base.py +234 -0
  48. closed_loop_microscopy-1.1.0/src/pyclm/core/storage/events.py +130 -0
  49. closed_loop_microscopy-1.1.0/src/pyclm/core/storage/hdf5_v1.py +337 -0
  50. closed_loop_microscopy-1.1.0/src/pyclm/core/storage/ome_zarr.py +861 -0
  51. closed_loop_microscopy-1.1.0/src/pyclm/core/tracking/__init__.py +28 -0
  52. closed_loop_microscopy-1.1.0/src/pyclm/core/tracking/centroid.py +75 -0
  53. closed_loop_microscopy-1.1.0/src/pyclm/core/tracking/tracking.py +124 -0
  54. closed_loop_microscopy-1.1.0/src/pyclm/core/tracking_process.py +106 -0
  55. closed_loop_microscopy-1.1.0/src/pyclm/core/virtual_microscope/__init__.py +0 -0
  56. closed_loop_microscopy-1.1.0/src/pyclm/core/virtual_microscope/simulated_core.py +262 -0
  57. closed_loop_microscopy-1.1.0/src/pyclm/core/virtual_microscope/simulated_source.py +206 -0
  58. closed_loop_microscopy-1.1.0/src/pyclm/core/writer_process.py +130 -0
  59. closed_loop_microscopy-1.1.0/src/pyclm/demo.py +225 -0
  60. closed_loop_microscopy-1.1.0/src/pyclm/directories.py +563 -0
  61. closed_loop_microscopy-1.1.0/src/pyclm/gui/__init__.py +28 -0
  62. closed_loop_microscopy-1.1.0/src/pyclm/gui/debug_viewer.py +41 -0
  63. closed_loop_microscopy-1.1.0/src/pyclm/gui/gui_controller.py +551 -0
  64. closed_loop_microscopy-1.1.0/src/pyclm/gui/widgets.py +292 -0
  65. closed_loop_microscopy-1.1.0/src/pyclm/io/__init__.py +29 -0
  66. closed_loop_microscopy-1.1.0/src/pyclm/io/export.py +202 -0
  67. closed_loop_microscopy-1.1.0/src/pyclm/io/readers.py +589 -0
  68. closed_loop_microscopy-1.1.0/src/pyclm/methods.py +249 -0
  69. closed_loop_microscopy-1.1.0/src/pyclm/mmconfig.py +143 -0
  70. closed_loop_microscopy-1.1.0/src/pyclm/preview.py +414 -0
  71. closed_loop_microscopy-1.1.0/src/pyclm/run_pyclm.py +298 -0
  72. closed_loop_microscopy-1.1.0/src/pyclm/schema.py +806 -0
  73. closed_loop_microscopy-1.1.0/src/pyclm/templates.py +165 -0
@@ -0,0 +1,7 @@
1
+ Copyright (c) 2025
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,118 @@
1
+ Metadata-Version: 2.4
2
+ Name: closed-loop-microscopy
3
+ Version: 1.1.0
4
+ Summary: Closed-loop feedback control for optogenetic microscopy in Python
5
+ Keywords: microscopy,optogenetics,closed-loop,micro-manager,DMD
6
+ Author: Harrison-Oatman
7
+ Author-email: Harrison-Oatman <ho6729@princeton.edu>
8
+ License-Expression: MIT
9
+ License-File: LICENSE.md
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Intended Audience :: Science/Research
12
+ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
13
+ Classifier: Topic :: Scientific/Engineering :: Image Processing
14
+ Requires-Dist: h5py>=3.14.0
15
+ Requires-Dist: natsort>=8.4.0
16
+ Requires-Dist: numpy
17
+ Requires-Dist: opencv-python-headless>=4.12.0.88
18
+ Requires-Dist: pyarrow>=15
19
+ Requires-Dist: pydantic>=2
20
+ Requires-Dist: pymmcore-plus>=0.14.0
21
+ Requires-Dist: pymmcore>=11.2.1.71.0
22
+ Requires-Dist: pyyaml>=6.0.3
23
+ Requires-Dist: scikit-image>=0.25.2
24
+ Requires-Dist: scipy
25
+ Requires-Dist: tifffile>=2025.9.20
26
+ Requires-Dist: useq-schema>=0.9.2
27
+ Requires-Dist: zarr>=3.0
28
+ Requires-Dist: pycromanager>=1.0.2 ; extra == 'calibration'
29
+ Requires-Dist: cellpose>=4.0.6 ; extra == 'cellpose'
30
+ Requires-Dist: torch ; extra == 'cellpose'
31
+ Requires-Dist: torchvision ; extra == 'cellpose'
32
+ Requires-Dist: napari>=0.9.0 ; extra == 'gui'
33
+ Requires-Dist: pyside6>=6.10.2 ; extra == 'gui'
34
+ Requires-Python: >=3.11
35
+ Project-URL: Documentation, https://pyclm.readthedocs.io
36
+ Project-URL: Homepage, https://github.com/Harrison-Oatman/PyCLM
37
+ Project-URL: Issues, https://github.com/Harrison-Oatman/PyCLM/issues
38
+ Provides-Extra: calibration
39
+ Provides-Extra: cellpose
40
+ Provides-Extra: gui
41
+ Description-Content-Type: text/markdown
42
+
43
+ # PyCLM
44
+
45
+ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.20385964.svg)](https://doi.org/10.5281/zenodo.20385964)
46
+
47
+ A Modular Closed-Loop Microscopy Software in Python
48
+
49
+ Please see our documentation at [readthedocs](https://pyclm.readthedocs.io/en/latest/first_time_setup.html)
50
+
51
+ ![](documentation/imgs/Figure%201.png "PyCLM Overview")
52
+
53
+ ## Overview
54
+
55
+ PyCLM is a python-based closed-loop microscopy software designed for running many dynamic and/or feedback-controlled optogenetic experiments simultaneously. Through PyCLM, it is possible to design spatial light patterns that change over time, follow individual cell positions, or change in response to cell features.
56
+
57
+ This approach to closed-loop microscopy is oriented around three major goals:
58
+
59
+ 1. **Efficiency.**
60
+ Ideally, the number of possible simultaneous experiments should be limited only by the physical constraints of the microscopy system.
61
+ - Microscope control, data export, image segmentation, and pattern generation are split into separate processes that run in parallel, minimizing unneeded microscope downtime.
62
+
63
+ 2. **(Re)usability.** Re-running experiments, combining multiple experiments, or changing experimental parameters should be as quick as possible, without requiring any programming experience.
64
+ - Descriptive and intuitively organized .toml files are used for experiment configuration, and can be reused or quickly edited for later experiments.
65
+ - Several common use-case configurations are provided for dynamic light input and feedback control experiments.
66
+
67
+ 3. **Extensibility.** It should be possible to implement a wide range of new segmentation and stimulation methods on top of the existing software.
68
+ - Segmentation and stimulation methods inherit from a base class, and are required to implement three straightforward functions.
69
+
70
+ ## Installation
71
+
72
+ ```bash
73
+ pip install "closed-loop-microscopy[gui]"
74
+ ```
75
+
76
+ The package is `closed-loop-microscopy`; the import name and the command are
77
+ `pyclm`. Leave out `[gui]` for a headless install (checking, previews, dry
78
+ runs, reading data). For development, clone the repository and run
79
+ `uv sync`.
80
+
81
+ Try it without a microscope:
82
+
83
+ ```bash
84
+ pyclm new demo --demo
85
+ pyclm run demo --dry --gui
86
+ ```
87
+
88
+ The demo runs two experiments on the virtual microscope with synthetic cells:
89
+ a sweeping bar of light, and a closed loop that segments the cells with a
90
+ method the directory brings along (`demo_methods.py`) and lights the outward
91
+ half of each.
92
+
93
+ See [First-Time Setup Guide](https://pyclm.readthedocs.io/en/latest/first_time_setup.html) to get started.
94
+
95
+ ### Hardware requirement: Micro-Manager
96
+
97
+ PyCLM controls hardware through [pymmcore-plus](https://github.com/pymmcore-plus/pymmcore-plus), which wraps the [Micro-Manager](https://micro-manager.org) C++ core. The Python package installs without issue, but running a real experiment requires:
98
+
99
+ 1. **Install Micro-Manager** — download the nightly build for your platform from [micro-manager.org](https://micro-manager.org/wiki/Download_Micro-Manager_Latest_Release).
100
+ 2. **Point PyCLM at your MM installation** — set the `config_path` field in `pyclm_config.toml` to your Micro-Manager `.cfg` hardware configuration file.
101
+
102
+ Importing the package and using the dry-run (`--dry`) mode work without a Micro-Manager installation.
103
+
104
+
105
+ ## Citation
106
+
107
+ If you use PyCLM in your research, please cite:
108
+
109
+ > Oatman HR, Lad BC, Nguyen L, Gubbens JH, Toettcher JE. An optogenetic smart
110
+ > microscopy platform reveals signaling dynamics-dependent control over
111
+ > collective cell migration. *Cell Systems* 17(9) (2026).
112
+ > [doi:10.1016/j.cels.2026.101674](https://doi.org/10.1016/j.cels.2026.101674)
113
+
114
+ The paper describes version 1.0.1. To record the version you used, also cite
115
+ that release: every release has its own DOI on Zenodo, all listed under
116
+ [doi:10.5281/zenodo.20385964](https://doi.org/10.5281/zenodo.20385964)
117
+ (which always resolves to the latest). GitHub's "Cite this repository" button
118
+ gives both, from `CITATION.cff`.
@@ -0,0 +1,76 @@
1
+ # PyCLM
2
+
3
+ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.20385964.svg)](https://doi.org/10.5281/zenodo.20385964)
4
+
5
+ A Modular Closed-Loop Microscopy Software in Python
6
+
7
+ Please see our documentation at [readthedocs](https://pyclm.readthedocs.io/en/latest/first_time_setup.html)
8
+
9
+ ![](documentation/imgs/Figure%201.png "PyCLM Overview")
10
+
11
+ ## Overview
12
+
13
+ PyCLM is a python-based closed-loop microscopy software designed for running many dynamic and/or feedback-controlled optogenetic experiments simultaneously. Through PyCLM, it is possible to design spatial light patterns that change over time, follow individual cell positions, or change in response to cell features.
14
+
15
+ This approach to closed-loop microscopy is oriented around three major goals:
16
+
17
+ 1. **Efficiency.**
18
+ Ideally, the number of possible simultaneous experiments should be limited only by the physical constraints of the microscopy system.
19
+ - Microscope control, data export, image segmentation, and pattern generation are split into separate processes that run in parallel, minimizing unneeded microscope downtime.
20
+
21
+ 2. **(Re)usability.** Re-running experiments, combining multiple experiments, or changing experimental parameters should be as quick as possible, without requiring any programming experience.
22
+ - Descriptive and intuitively organized .toml files are used for experiment configuration, and can be reused or quickly edited for later experiments.
23
+ - Several common use-case configurations are provided for dynamic light input and feedback control experiments.
24
+
25
+ 3. **Extensibility.** It should be possible to implement a wide range of new segmentation and stimulation methods on top of the existing software.
26
+ - Segmentation and stimulation methods inherit from a base class, and are required to implement three straightforward functions.
27
+
28
+ ## Installation
29
+
30
+ ```bash
31
+ pip install "closed-loop-microscopy[gui]"
32
+ ```
33
+
34
+ The package is `closed-loop-microscopy`; the import name and the command are
35
+ `pyclm`. Leave out `[gui]` for a headless install (checking, previews, dry
36
+ runs, reading data). For development, clone the repository and run
37
+ `uv sync`.
38
+
39
+ Try it without a microscope:
40
+
41
+ ```bash
42
+ pyclm new demo --demo
43
+ pyclm run demo --dry --gui
44
+ ```
45
+
46
+ The demo runs two experiments on the virtual microscope with synthetic cells:
47
+ a sweeping bar of light, and a closed loop that segments the cells with a
48
+ method the directory brings along (`demo_methods.py`) and lights the outward
49
+ half of each.
50
+
51
+ See [First-Time Setup Guide](https://pyclm.readthedocs.io/en/latest/first_time_setup.html) to get started.
52
+
53
+ ### Hardware requirement: Micro-Manager
54
+
55
+ PyCLM controls hardware through [pymmcore-plus](https://github.com/pymmcore-plus/pymmcore-plus), which wraps the [Micro-Manager](https://micro-manager.org) C++ core. The Python package installs without issue, but running a real experiment requires:
56
+
57
+ 1. **Install Micro-Manager** — download the nightly build for your platform from [micro-manager.org](https://micro-manager.org/wiki/Download_Micro-Manager_Latest_Release).
58
+ 2. **Point PyCLM at your MM installation** — set the `config_path` field in `pyclm_config.toml` to your Micro-Manager `.cfg` hardware configuration file.
59
+
60
+ Importing the package and using the dry-run (`--dry`) mode work without a Micro-Manager installation.
61
+
62
+
63
+ ## Citation
64
+
65
+ If you use PyCLM in your research, please cite:
66
+
67
+ > Oatman HR, Lad BC, Nguyen L, Gubbens JH, Toettcher JE. An optogenetic smart
68
+ > microscopy platform reveals signaling dynamics-dependent control over
69
+ > collective cell migration. *Cell Systems* 17(9) (2026).
70
+ > [doi:10.1016/j.cels.2026.101674](https://doi.org/10.1016/j.cels.2026.101674)
71
+
72
+ The paper describes version 1.0.1. To record the version you used, also cite
73
+ that release: every release has its own DOI on Zenodo, all listed under
74
+ [doi:10.5281/zenodo.20385964](https://doi.org/10.5281/zenodo.20385964)
75
+ (which always resolves to the latest). GitHub's "Cite this repository" button
76
+ gives both, from `CITATION.cff`.
@@ -0,0 +1,141 @@
1
+ [project]
2
+ name = "closed-loop-microscopy"
3
+ version = "1.1.0"
4
+ description = "Closed-loop feedback control for optogenetic microscopy in Python"
5
+ readme = "README.md"
6
+ license = "MIT"
7
+ license-files = ["LICENSE.md"]
8
+ authors = [
9
+ { name = "Harrison-Oatman", email = "ho6729@princeton.edu" }
10
+ ]
11
+ requires-python = ">=3.11"
12
+ keywords = ["microscopy", "optogenetics", "closed-loop", "micro-manager", "DMD"]
13
+ classifiers = [
14
+ "Programming Language :: Python :: 3",
15
+ "Intended Audience :: Science/Research",
16
+ "Topic :: Scientific/Engineering :: Bio-Informatics",
17
+ "Topic :: Scientific/Engineering :: Image Processing",
18
+ ]
19
+ # The core: running (headless), checking, previewing, dry runs, reading and
20
+ # exporting data. The live viewer is the `gui` extra.
21
+ dependencies = [
22
+ "h5py>=3.14.0",
23
+ "natsort>=8.4.0",
24
+ "numpy",
25
+ "opencv-python-headless>=4.12.0.88",
26
+ "pyarrow>=15",
27
+ "pydantic>=2",
28
+ "pymmcore-plus>=0.14.0",
29
+ "pymmcore>=11.2.1.71.0",
30
+ "pyyaml>=6.0.3",
31
+ "scikit-image>=0.25.2",
32
+ "scipy",
33
+ "tifffile>=2025.9.20",
34
+ "useq-schema>=0.9.2",
35
+ "zarr>=3.0",
36
+ ]
37
+
38
+ [project.urls]
39
+ Homepage = "https://github.com/Harrison-Oatman/PyCLM"
40
+ Documentation = "https://pyclm.readthedocs.io"
41
+ Issues = "https://github.com/Harrison-Oatman/PyCLM/issues"
42
+
43
+ # The lab's microscope: pymmcore must speak the same Micro-Manager device
44
+ # interface as the installed device adapters. The Mightex Polygon DMD adapter
45
+ # is a closed vendor DLL built for interface 71, so uv.lock resolves to the
46
+ # last interface-71 stack (pymmcore 11.2.1.71.0 with the newest pymmcore-plus
47
+ # that actually runs on it; 0.15.0 declares support but fails on import).
48
+ # The version ranges above stay open: `pip install` elsewhere gets the current
49
+ # stack (interface 75, suite verified on pymmcore 12.5 / pymmcore-plus 0.18.1
50
+ # ). To move this lock, delete these two lines and
51
+ # run `uv lock`. See docs/stage5b-interactivity-design.md, "Device interface".
52
+ [tool.uv]
53
+ constraint-dependencies = [
54
+ "pymmcore==11.2.1.71.0",
55
+ "pymmcore-plus==0.14.0",
56
+ ]
57
+
58
+ [project.optional-dependencies]
59
+ gui = [
60
+ "napari>=0.9.0",
61
+ "pyside6>=6.10.2",
62
+ ]
63
+
64
+ cellpose = [
65
+ "cellpose>=4.0.6",
66
+ "torch",
67
+ "torchvision",
68
+ ]
69
+
70
+ calibration = [
71
+ "pycromanager>=1.0.2",
72
+ ]
73
+
74
+ [dependency-groups]
75
+
76
+ analysis = [
77
+ "laptrack>=0.17.0",
78
+ "notebook>=7.5.1",
79
+ "matplotlib>=3.10.6",
80
+ "pandas>=2.3.2",
81
+ "tqdm>=4.67.1",
82
+ "statannotations>=0.7.2",
83
+ ]
84
+
85
+ docs = [
86
+ "matplotlib>=3.10.6",
87
+ "myst-parser",
88
+ "nox>=2025.2.9",
89
+ "pytest>=8.4.2",
90
+ "scipy>=1.15.0",
91
+ "sphinx",
92
+ "sphinx-rtd-theme",
93
+ ]
94
+
95
+ dev = [
96
+ { include-group = "analysis" },
97
+ { include-group = "docs" },
98
+ { include-group = "test" },
99
+ "pandas-stubs==2.3.2.250827",
100
+ ]
101
+ # the viewer tests need napari; the group repeats the gui extra
102
+ test = [
103
+ "pytest>=8.4.2",
104
+ "napari>=0.9.0",
105
+ "pyside6>=6.10.2",
106
+ ]
107
+
108
+ [tool.uv.sources]
109
+ torch = [
110
+ { index = "pytorch-cu128" },
111
+ ]
112
+ torchvision = [
113
+ { index = "pytorch-cu128" },
114
+ ]
115
+
116
+ [[tool.uv.index]]
117
+ name = "pytorch-cu128"
118
+ url = "https://download.pytorch.org/whl/cu128"
119
+ explicit = true
120
+
121
+ [tool.ruff.lint]
122
+ select = [
123
+ "B",
124
+ "I",
125
+ "RUF",
126
+ "PT",
127
+ "UP",
128
+ ]
129
+
130
+ [project.scripts]
131
+ pyclm = "pyclm.__main__:main"
132
+ convert_hdf5s = "pyclm.convert_hdf5s:main"
133
+ gui = "pyclm.gui.gui_controller:main"
134
+
135
+
136
+ [tool.uv.build-backend]
137
+ module-name = "pyclm"
138
+
139
+ [build-system]
140
+ requires = ["uv_build>=0.8.14,<0.9.0"]
141
+ build-backend = "uv_build"
@@ -0,0 +1,26 @@
1
+ import os
2
+
3
+ os.environ["HDF5_USE_FILE_LOCKING"] = "FALSE"
4
+
5
+ from importlib.metadata import PackageNotFoundError
6
+ from importlib.metadata import version as _version
7
+
8
+ try:
9
+ # the distribution is closed-loop-microscopy; the import name is pyclm
10
+ __version__ = _version("closed-loop-microscopy")
11
+ except PackageNotFoundError: # a source tree that was never installed
12
+ __version__ = "unknown"
13
+
14
+ from .controller import Controller
15
+ from .core import (
16
+ AcquisitionPlan,
17
+ MicroscopePosition,
18
+ PatternContext,
19
+ PatternMethod,
20
+ SegmentationMethod,
21
+ TrackingMethod,
22
+ Tracks,
23
+ )
24
+ from .core.measure import PerTrack, Regions, nuclear_cytosolic_ratio
25
+ from .core.position_mover import BasicPositionMover, PFSPositionMover, PositionMover
26
+ from .run_pyclm import run_pyclm
@@ -0,0 +1,8 @@
1
+ """``python -m pyclm`` and the ``pyclm`` command: see :mod:`pyclm.cli`."""
2
+
3
+ import sys
4
+
5
+ from .cli import main
6
+
7
+ if __name__ == "__main__":
8
+ sys.exit(main())