closed-loop-microscopy 1.1.0__tar.gz → 1.2.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.
- closed_loop_microscopy-1.2.0/PKG-INFO +139 -0
- closed_loop_microscopy-1.2.0/README.md +97 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/pyproject.toml +4 -5
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/check.py +263 -34
- closed_loop_microscopy-1.2.0/src/pyclm/cli.py +600 -0
- closed_loop_microscopy-1.2.0/src/pyclm/console.py +17 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/controller.py +122 -17
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/core_interface.py +14 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/datatypes.py +9 -1
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/events.py +13 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/experiments.py +38 -4
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/grid.py +5 -5
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/manager.py +198 -33
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/measure.py +1 -1
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/microscope.py +284 -18
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/pattern_process.py +77 -3
- closed_loop_microscopy-1.2.0/src/pyclm/core/patterns/__init__.py +112 -0
- closed_loop_microscopy-1.2.0/src/pyclm/core/patterns/adaptive.py +457 -0
- closed_loop_microscopy-1.2.0/src/pyclm/core/patterns/bar_patterns.py +390 -0
- closed_loop_microscopy-1.2.0/src/pyclm/core/patterns/cell_intensity_patterns.py +573 -0
- closed_loop_microscopy-1.2.0/src/pyclm/core/patterns/cell_selection.py +270 -0
- closed_loop_microscopy-1.2.0/src/pyclm/core/patterns/composite.py +396 -0
- closed_loop_microscopy-1.2.0/src/pyclm/core/patterns/diagnostic.py +137 -0
- closed_loop_microscopy-1.2.0/src/pyclm/core/patterns/dose.py +65 -0
- closed_loop_microscopy-1.2.0/src/pyclm/core/patterns/embryo_patterns.py +120 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/patterns/fbc_cell_movement.py +93 -21
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/patterns/pattern.py +218 -13
- closed_loop_microscopy-1.2.0/src/pyclm/core/patterns/pulse_patterns.py +597 -0
- closed_loop_microscopy-1.2.0/src/pyclm/core/patterns/static_patterns.py +328 -0
- closed_loop_microscopy-1.2.0/src/pyclm/core/patterns/wave_patterns.py +121 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/patterns/zoo.py +92 -55
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/plan.py +7 -1
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/queues.py +7 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/real_core.py +41 -1
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/router.py +23 -11
- closed_loop_microscopy-1.2.0/src/pyclm/core/segmentation/cellpose_segmentation.py +208 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/segmentation/segmentation.py +9 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/segmentation_process.py +104 -14
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/storage/base.py +9 -2
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/storage/hdf5_v1.py +5 -4
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/storage/ome_zarr.py +88 -30
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/tracking/__init__.py +1 -1
- closed_loop_microscopy-1.2.0/src/pyclm/core/tracking/centroid.py +142 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/tracking/tracking.py +11 -2
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/tracking_process.py +44 -1
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/virtual_microscope/simulated_core.py +49 -3
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/writer_process.py +3 -1
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/demo.py +3 -3
- closed_loop_microscopy-1.2.0/src/pyclm/detach.py +194 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/directories.py +1 -1
- closed_loop_microscopy-1.2.0/src/pyclm/fix.py +244 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/gui/gui_controller.py +4 -4
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/gui/widgets.py +6 -2
- closed_loop_microscopy-1.2.0/src/pyclm/io/movies.py +273 -0
- closed_loop_microscopy-1.2.0/src/pyclm/lock.py +157 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/methods.py +24 -1
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/mmconfig.py +41 -0
- closed_loop_microscopy-1.2.0/src/pyclm/pack.py +322 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/preview.py +247 -43
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/run_pyclm.py +146 -107
- closed_loop_microscopy-1.2.0/src/pyclm/run_record.py +262 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/schema.py +218 -17
- closed_loop_microscopy-1.2.0/src/pyclm/stitch.py +235 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/templates.py +3 -3
- closed_loop_microscopy-1.2.0/src/pyclm/watch.py +461 -0
- closed_loop_microscopy-1.1.0/PKG-INFO +0 -118
- closed_loop_microscopy-1.1.0/README.md +0 -76
- closed_loop_microscopy-1.1.0/src/pyclm/cli.py +0 -256
- closed_loop_microscopy-1.1.0/src/pyclm/core/patterns/__init__.py +0 -60
- closed_loop_microscopy-1.1.0/src/pyclm/core/patterns/bar_patterns.py +0 -259
- closed_loop_microscopy-1.1.0/src/pyclm/core/patterns/cell_intensity_patterns.py +0 -181
- closed_loop_microscopy-1.1.0/src/pyclm/core/patterns/composite.py +0 -220
- closed_loop_microscopy-1.1.0/src/pyclm/core/patterns/embryo_patterns.py +0 -90
- closed_loop_microscopy-1.1.0/src/pyclm/core/patterns/pulse_patterns.py +0 -261
- closed_loop_microscopy-1.1.0/src/pyclm/core/patterns/static_patterns.py +0 -58
- closed_loop_microscopy-1.1.0/src/pyclm/core/patterns/wave_patterns.py +0 -95
- closed_loop_microscopy-1.1.0/src/pyclm/core/segmentation/cellpose_segmentation.py +0 -113
- closed_loop_microscopy-1.1.0/src/pyclm/core/tracking/centroid.py +0 -75
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/LICENSE.md +0 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/__init__.py +0 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/__main__.py +0 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/commands.py +0 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/convert_hdf5s.py +0 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/__init__.py +0 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/base_process.py +0 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/kinds.py +0 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/messages.py +0 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/position_mover.py +0 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/segmentation/__init__.py +0 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/settings.py +0 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/storage/__init__.py +0 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/storage/events.py +0 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/virtual_microscope/__init__.py +0 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/core/virtual_microscope/simulated_source.py +0 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/gui/__init__.py +0 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/gui/debug_viewer.py +0 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/io/__init__.py +0 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/io/export.py +0 -0
- {closed_loop_microscopy-1.1.0 → closed_loop_microscopy-1.2.0}/src/pyclm/io/readers.py +0 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: closed-loop-microscopy
|
|
3
|
+
Version: 1.2.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.2.0 ; 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/toettchlab/PyCLM
|
|
37
|
+
Project-URL: Issues, https://github.com/toettchlab/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
|
+
[](https://doi.org/10.5281/zenodo.20385964)
|
|
46
|
+
[](https://pyclm.readthedocs.io/en/latest/)
|
|
47
|
+
|
|
48
|
+
A modular closed-loop microscopy software in Python.
|
|
49
|
+
|
|
50
|
+
PyCLM runs many optogenetic experiments at once on one microscope. Each
|
|
51
|
+
imaging position gets its own light pattern, projected through a DMD, that
|
|
52
|
+
can be fixed, change over time, follow individual cells, or respond to what
|
|
53
|
+
the cells are doing.
|
|
54
|
+
|
|
55
|
+
## Using PyCLM with Claude Code
|
|
56
|
+
|
|
57
|
+
PyCLM ships a plugin for [Claude Code](https://claude.com/claude-code) that
|
|
58
|
+
sets PyCLM up on a microscope and designs, checks, runs, follows and exports
|
|
59
|
+
experiments with you, using the `pyclm` commands below. On the microscope PC,
|
|
60
|
+
with Claude Code installed:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
claude plugin marketplace add toettchlab/PyCLM
|
|
64
|
+
claude plugin install pyclm@pyclm-plugins
|
|
65
|
+
claude
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+

|
|
69
|
+
|
|
70
|
+
[Using PyCLM with Claude Code](https://pyclm.readthedocs.io/en/latest/agent_skills.html)
|
|
71
|
+
covers setup, launching on a shared microscope PC, each step of a run,
|
|
72
|
+
Remote Control from a Claude project, and a worked example.
|
|
73
|
+
|
|
74
|
+
## How PyCLM works
|
|
75
|
+
|
|
76
|
+
Experiments are written as short TOML files, so running a new one needs no
|
|
77
|
+
programming; a new kind of light rule is a small Python class. Microscope
|
|
78
|
+
control, segmentation, tracking, pattern generation and saving run as
|
|
79
|
+
separate processes in parallel, so the microscope rarely waits and the
|
|
80
|
+
number of simultaneous experiments is limited mainly by the hardware. Data
|
|
81
|
+
is written as the run goes (OME-Zarr by default), and ImageJ hyperstacks are
|
|
82
|
+
exported at the end.
|
|
83
|
+
|
|
84
|
+

|
|
85
|
+
|
|
86
|
+
## Start here
|
|
87
|
+
|
|
88
|
+
| I want to... | Go to |
|
|
89
|
+
|---|---|
|
|
90
|
+
| Set up and run experiments with Claude Code | **[Using PyCLM with Claude Code](https://pyclm.readthedocs.io/en/latest/agent_skills.html)** |
|
|
91
|
+
| See what light patterns PyCLM can make | **[Method zoo](https://pyclm.readthedocs.io/en/latest/method_zoo.html)**: every built-in pattern method on a sample image, with a `[pattern]` table to copy |
|
|
92
|
+
| Try it without a microscope | The demo below |
|
|
93
|
+
| Set PyCLM up on my microscope | [First-time setup](https://pyclm.readthedocs.io/en/latest/first_time_setup.html) |
|
|
94
|
+
| Write an experiment | [Experiment TOMLs](https://pyclm.readthedocs.io/en/latest/experiment_tomls.html) and [the `pyclm` command](https://pyclm.readthedocs.io/en/latest/command_line.html) |
|
|
95
|
+
| Write my own light rule | [Custom pattern methods](https://pyclm.readthedocs.io/en/latest/custom_pattern_methods.html) |
|
|
96
|
+
| Open the data from a run | [Data format and export](https://pyclm.readthedocs.io/en/latest/data_format.html) |
|
|
97
|
+
|
|
98
|
+
The full documentation is at [pyclm.readthedocs.io](https://pyclm.readthedocs.io/en/latest/).
|
|
99
|
+
|
|
100
|
+
## Install and try it yourself
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
pip install "closed-loop-microscopy[gui]"
|
|
104
|
+
pyclm new demo --demo
|
|
105
|
+
pyclm run demo --dry --gui
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
The package is `closed-loop-microscopy`; the import name and the command are
|
|
109
|
+
`pyclm`. Leave out `[gui]` for a headless install (checking, previews, dry
|
|
110
|
+
runs, reading data). For development, clone the repository and run `uv sync`.
|
|
111
|
+
|
|
112
|
+
The demo runs two experiments on the virtual microscope (`--dry`) with
|
|
113
|
+
synthetic cells: a sweeping bar of light, and a closed loop that segments the
|
|
114
|
+
cells and lights the outward half of each. Pick a method from the
|
|
115
|
+
[zoo](https://pyclm.readthedocs.io/en/latest/method_zoo.html), paste its
|
|
116
|
+
`[pattern]` table over the one in `demo/cells.toml` (keep `channel = "545"`,
|
|
117
|
+
the demo's channel), and run it again.
|
|
118
|
+
|
|
119
|
+
Running on a real microscope needs [Micro-Manager](https://micro-manager.org),
|
|
120
|
+
which PyCLM drives through
|
|
121
|
+
[pymmcore-plus](https://github.com/pymmcore-plus/pymmcore-plus); point
|
|
122
|
+
`config_path` in `pyclm_config.toml` at your Micro-Manager `.cfg` file. The
|
|
123
|
+
[installation page](https://pyclm.readthedocs.io/en/latest/installation.html)
|
|
124
|
+
covers the extras and matching the Micro-Manager device interface.
|
|
125
|
+
|
|
126
|
+
## Citation
|
|
127
|
+
|
|
128
|
+
If you use PyCLM in your research, please cite:
|
|
129
|
+
|
|
130
|
+
> Oatman HR, Lad BC, Nguyen L, Gubbens JH, Toettcher JE. An optogenetic smart
|
|
131
|
+
> microscopy platform reveals signaling dynamics-dependent control over
|
|
132
|
+
> collective cell migration. *Cell Systems* 17(9) (2026).
|
|
133
|
+
> [doi:10.1016/j.cels.2026.101674](https://doi.org/10.1016/j.cels.2026.101674)
|
|
134
|
+
|
|
135
|
+
The paper describes version 1.0.1. To record the version you used, also cite
|
|
136
|
+
that release: every release has its own DOI on Zenodo, all listed under
|
|
137
|
+
[doi:10.5281/zenodo.20385964](https://doi.org/10.5281/zenodo.20385964)
|
|
138
|
+
(which always resolves to the latest). GitHub's "Cite this repository" button
|
|
139
|
+
gives both, from `CITATION.cff`.
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# PyCLM
|
|
2
|
+
|
|
3
|
+
[](https://doi.org/10.5281/zenodo.20385964)
|
|
4
|
+
[](https://pyclm.readthedocs.io/en/latest/)
|
|
5
|
+
|
|
6
|
+
A modular closed-loop microscopy software in Python.
|
|
7
|
+
|
|
8
|
+
PyCLM runs many optogenetic experiments at once on one microscope. Each
|
|
9
|
+
imaging position gets its own light pattern, projected through a DMD, that
|
|
10
|
+
can be fixed, change over time, follow individual cells, or respond to what
|
|
11
|
+
the cells are doing.
|
|
12
|
+
|
|
13
|
+
## Using PyCLM with Claude Code
|
|
14
|
+
|
|
15
|
+
PyCLM ships a plugin for [Claude Code](https://claude.com/claude-code) that
|
|
16
|
+
sets PyCLM up on a microscope and designs, checks, runs, follows and exports
|
|
17
|
+
experiments with you, using the `pyclm` commands below. On the microscope PC,
|
|
18
|
+
with Claude Code installed:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
claude plugin marketplace add toettchlab/PyCLM
|
|
22
|
+
claude plugin install pyclm@pyclm-plugins
|
|
23
|
+
claude
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+

|
|
27
|
+
|
|
28
|
+
[Using PyCLM with Claude Code](https://pyclm.readthedocs.io/en/latest/agent_skills.html)
|
|
29
|
+
covers setup, launching on a shared microscope PC, each step of a run,
|
|
30
|
+
Remote Control from a Claude project, and a worked example.
|
|
31
|
+
|
|
32
|
+
## How PyCLM works
|
|
33
|
+
|
|
34
|
+
Experiments are written as short TOML files, so running a new one needs no
|
|
35
|
+
programming; a new kind of light rule is a small Python class. Microscope
|
|
36
|
+
control, segmentation, tracking, pattern generation and saving run as
|
|
37
|
+
separate processes in parallel, so the microscope rarely waits and the
|
|
38
|
+
number of simultaneous experiments is limited mainly by the hardware. Data
|
|
39
|
+
is written as the run goes (OME-Zarr by default), and ImageJ hyperstacks are
|
|
40
|
+
exported at the end.
|
|
41
|
+
|
|
42
|
+

|
|
43
|
+
|
|
44
|
+
## Start here
|
|
45
|
+
|
|
46
|
+
| I want to... | Go to |
|
|
47
|
+
|---|---|
|
|
48
|
+
| Set up and run experiments with Claude Code | **[Using PyCLM with Claude Code](https://pyclm.readthedocs.io/en/latest/agent_skills.html)** |
|
|
49
|
+
| See what light patterns PyCLM can make | **[Method zoo](https://pyclm.readthedocs.io/en/latest/method_zoo.html)**: every built-in pattern method on a sample image, with a `[pattern]` table to copy |
|
|
50
|
+
| Try it without a microscope | The demo below |
|
|
51
|
+
| Set PyCLM up on my microscope | [First-time setup](https://pyclm.readthedocs.io/en/latest/first_time_setup.html) |
|
|
52
|
+
| Write an experiment | [Experiment TOMLs](https://pyclm.readthedocs.io/en/latest/experiment_tomls.html) and [the `pyclm` command](https://pyclm.readthedocs.io/en/latest/command_line.html) |
|
|
53
|
+
| Write my own light rule | [Custom pattern methods](https://pyclm.readthedocs.io/en/latest/custom_pattern_methods.html) |
|
|
54
|
+
| Open the data from a run | [Data format and export](https://pyclm.readthedocs.io/en/latest/data_format.html) |
|
|
55
|
+
|
|
56
|
+
The full documentation is at [pyclm.readthedocs.io](https://pyclm.readthedocs.io/en/latest/).
|
|
57
|
+
|
|
58
|
+
## Install and try it yourself
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
pip install "closed-loop-microscopy[gui]"
|
|
62
|
+
pyclm new demo --demo
|
|
63
|
+
pyclm run demo --dry --gui
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
The package is `closed-loop-microscopy`; the import name and the command are
|
|
67
|
+
`pyclm`. Leave out `[gui]` for a headless install (checking, previews, dry
|
|
68
|
+
runs, reading data). For development, clone the repository and run `uv sync`.
|
|
69
|
+
|
|
70
|
+
The demo runs two experiments on the virtual microscope (`--dry`) with
|
|
71
|
+
synthetic cells: a sweeping bar of light, and a closed loop that segments the
|
|
72
|
+
cells and lights the outward half of each. Pick a method from the
|
|
73
|
+
[zoo](https://pyclm.readthedocs.io/en/latest/method_zoo.html), paste its
|
|
74
|
+
`[pattern]` table over the one in `demo/cells.toml` (keep `channel = "545"`,
|
|
75
|
+
the demo's channel), and run it again.
|
|
76
|
+
|
|
77
|
+
Running on a real microscope needs [Micro-Manager](https://micro-manager.org),
|
|
78
|
+
which PyCLM drives through
|
|
79
|
+
[pymmcore-plus](https://github.com/pymmcore-plus/pymmcore-plus); point
|
|
80
|
+
`config_path` in `pyclm_config.toml` at your Micro-Manager `.cfg` file. The
|
|
81
|
+
[installation page](https://pyclm.readthedocs.io/en/latest/installation.html)
|
|
82
|
+
covers the extras and matching the Micro-Manager device interface.
|
|
83
|
+
|
|
84
|
+
## Citation
|
|
85
|
+
|
|
86
|
+
If you use PyCLM in your research, please cite:
|
|
87
|
+
|
|
88
|
+
> Oatman HR, Lad BC, Nguyen L, Gubbens JH, Toettcher JE. An optogenetic smart
|
|
89
|
+
> microscopy platform reveals signaling dynamics-dependent control over
|
|
90
|
+
> collective cell migration. *Cell Systems* 17(9) (2026).
|
|
91
|
+
> [doi:10.1016/j.cels.2026.101674](https://doi.org/10.1016/j.cels.2026.101674)
|
|
92
|
+
|
|
93
|
+
The paper describes version 1.0.1. To record the version you used, also cite
|
|
94
|
+
that release: every release has its own DOI on Zenodo, all listed under
|
|
95
|
+
[doi:10.5281/zenodo.20385964](https://doi.org/10.5281/zenodo.20385964)
|
|
96
|
+
(which always resolves to the latest). GitHub's "Cite this repository" button
|
|
97
|
+
gives both, from `CITATION.cff`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "closed-loop-microscopy"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.2.0"
|
|
4
4
|
description = "Closed-loop feedback control for optogenetic microscopy in Python"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = "MIT"
|
|
@@ -36,9 +36,9 @@ dependencies = [
|
|
|
36
36
|
]
|
|
37
37
|
|
|
38
38
|
[project.urls]
|
|
39
|
-
Homepage = "https://github.com/
|
|
39
|
+
Homepage = "https://github.com/toettchlab/PyCLM"
|
|
40
40
|
Documentation = "https://pyclm.readthedocs.io"
|
|
41
|
-
Issues = "https://github.com/
|
|
41
|
+
Issues = "https://github.com/toettchlab/PyCLM/issues"
|
|
42
42
|
|
|
43
43
|
# The lab's microscope: pymmcore must speak the same Micro-Manager device
|
|
44
44
|
# interface as the installed device adapters. The Mightex Polygon DMD adapter
|
|
@@ -62,7 +62,7 @@ gui = [
|
|
|
62
62
|
]
|
|
63
63
|
|
|
64
64
|
cellpose = [
|
|
65
|
-
"cellpose>=4.0
|
|
65
|
+
"cellpose>=4.2.0",
|
|
66
66
|
"torch",
|
|
67
67
|
"torchvision",
|
|
68
68
|
]
|
|
@@ -130,7 +130,6 @@ select = [
|
|
|
130
130
|
[project.scripts]
|
|
131
131
|
pyclm = "pyclm.__main__:main"
|
|
132
132
|
convert_hdf5s = "pyclm.convert_hdf5s:main"
|
|
133
|
-
gui = "pyclm.gui.gui_controller:main"
|
|
134
133
|
|
|
135
134
|
|
|
136
135
|
[tool.uv.build-backend]
|