AMS-BP 0.3.0__tar.gz → 0.4.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.
- {ams_bp-0.3.0 → ams_bp-0.4.0}/PKG-INFO +59 -34
- {ams_bp-0.3.0 → ams_bp-0.4.0}/README.md +54 -33
- {ams_bp-0.3.0 → ams_bp-0.4.0}/docs/API_Documentation/configio/configmodels.md +5 -5
- ams_bp-0.4.0/docs/API_Documentation/configio/convertconfig.md +193 -0
- ams_bp-0.4.0/docs/API_Documentation/main_cli.md +184 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/docs/API_Documentation/sim_config.md +1 -2
- ams_bp-0.4.0/docs/assets/buttons/ButtonFigure_FRAP.svg +862 -0
- ams_bp-0.4.0/docs/assets/buttons/ButtonFigure_fPALM_NPC.svg +1140 -0
- ams_bp-0.4.0/docs/assets/buttons/ButtonFigure_sptPALM_mmaple.svg +3150 -0
- ams_bp-0.4.0/docs/assets/buttons/ButtonFigure_zstack_twocolor_confocal.svg +1042 -0
- ams_bp-0.4.0/docs/assets/buttons/ButtonFigure_zstack_twocolor_widefield.svg +1022 -0
- ams_bp-0.4.0/examples/QuantitativeExperiments/FRAP/FRAP_methods.ipynb +1028 -0
- ams_bp-0.4.0/examples/QuantitativeExperiments/MotionModels/groundtruth_boundedfbm.ipynb +257 -0
- ams_bp-0.4.0/examples/QuantitativeExperiments/PALM/fPALM/export_full2_0039_039.csv +1229 -0
- ams_bp-0.4.0/examples/QuantitativeExperiments/PALM/fPALM/npc_palm.ipynb +1084 -0
- ams_bp-0.4.0/examples/QuantitativeExperiments/PALM/sptPALM/motionmodels_sptmmaple.ipynb +1152 -0
- ams_bp-0.4.0/examples/QuantitativeExperiments/TwoColor/Confocal/confocal_twocolor.ipynb +1407 -0
- ams_bp-0.4.0/examples/QuantitativeExperiments/TwoColor/Widefield/widefield_twocolor.ipynb +1436 -0
- ams_bp-0.4.0/examples/VisualizingIndividualModules/laser_modulation.ipynb +1087 -0
- ams_bp-0.4.0/examples/VisualizingIndividualModules/modules_explained.ipynb +1468 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/pyproject.toml +11 -1
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/__init__.py +1 -1
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/configio/configmodels.py +32 -18
- ams_bp-0.4.0/src/AMS_BP/configio/convertconfig.py +795 -0
- ams_bp-0.4.0/src/AMS_BP/gui/README.md +77 -0
- ams_bp-0.4.0/src/AMS_BP/gui/assets/drawing.svg +107 -0
- ams_bp-0.4.0/src/AMS_BP/gui/configuration_window.py +333 -0
- ams_bp-0.4.0/src/AMS_BP/gui/help_docs/cell_help.md +45 -0
- ams_bp-0.4.0/src/AMS_BP/gui/help_docs/channels_help.md +78 -0
- ams_bp-0.4.0/src/AMS_BP/gui/help_docs/condensate_help.md +59 -0
- ams_bp-0.4.0/src/AMS_BP/gui/help_docs/detector_help.md +57 -0
- ams_bp-0.4.0/src/AMS_BP/gui/help_docs/experiment_help.md +92 -0
- ams_bp-0.4.0/src/AMS_BP/gui/help_docs/fluorophore_help.md +128 -0
- ams_bp-0.4.0/src/AMS_BP/gui/help_docs/general_help.md +43 -0
- ams_bp-0.4.0/src/AMS_BP/gui/help_docs/global_help.md +47 -0
- ams_bp-0.4.0/src/AMS_BP/gui/help_docs/laser_help.md +76 -0
- ams_bp-0.4.0/src/AMS_BP/gui/help_docs/molecule_help.md +78 -0
- ams_bp-0.4.0/src/AMS_BP/gui/help_docs/output_help.md +5 -0
- ams_bp-0.4.0/src/AMS_BP/gui/help_docs/psf_help.md +51 -0
- ams_bp-0.4.0/src/AMS_BP/gui/help_window.py +26 -0
- ams_bp-0.4.0/src/AMS_BP/gui/logging_window.py +93 -0
- ams_bp-0.4.0/src/AMS_BP/gui/main.py +255 -0
- ams_bp-0.4.0/src/AMS_BP/gui/sim_worker.py +58 -0
- ams_bp-0.4.0/src/AMS_BP/gui/template_window_selection.py +100 -0
- ams_bp-0.4.0/src/AMS_BP/gui/widgets/camera_config_widget.py +213 -0
- ams_bp-0.4.0/src/AMS_BP/gui/widgets/cell_config_widget.py +225 -0
- ams_bp-0.4.0/src/AMS_BP/gui/widgets/channel_config_widget.py +307 -0
- ams_bp-0.4.0/src/AMS_BP/gui/widgets/condensate_config_widget.py +341 -0
- ams_bp-0.4.0/src/AMS_BP/gui/widgets/experiment_config_widget.py +259 -0
- ams_bp-0.4.0/src/AMS_BP/gui/widgets/flurophore_config_widget.py +513 -0
- ams_bp-0.4.0/src/AMS_BP/gui/widgets/general_config_widget.py +47 -0
- ams_bp-0.4.0/src/AMS_BP/gui/widgets/global_config_widget.py +142 -0
- ams_bp-0.4.0/src/AMS_BP/gui/widgets/laser_config_widget.py +255 -0
- ams_bp-0.4.0/src/AMS_BP/gui/widgets/molecule_config_widget.py +714 -0
- ams_bp-0.4.0/src/AMS_BP/gui/widgets/output_config_widget.py +61 -0
- ams_bp-0.4.0/src/AMS_BP/gui/widgets/psf_config_widget.py +128 -0
- ams_bp-0.4.0/src/AMS_BP/gui/widgets/utility_widgets/scinotation_widget.py +21 -0
- ams_bp-0.4.0/src/AMS_BP/gui/widgets/utility_widgets/spectrum_widget.py +115 -0
- ams_bp-0.4.0/src/AMS_BP/logging/logutil.py +83 -0
- ams_bp-0.4.0/src/AMS_BP/logging/setup_run_directory.py +35 -0
- ams_bp-0.3.0/src/AMS_BP/run_cell_simulation.py → ams_bp-0.4.0/src/AMS_BP/main_cli.py +27 -72
- ams_bp-0.4.0/src/AMS_BP/optics/__init__.py +0 -0
- ams_bp-0.4.0/src/AMS_BP/optics/filters/channels/__init__.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/optics/filters/filters.py +2 -0
- ams_bp-0.4.0/src/AMS_BP/photophysics/__init__.py +0 -0
- ams_bp-0.4.0/src/AMS_BP/probabilityfuncs/__init__.py +0 -0
- ams_bp-0.4.0/src/AMS_BP/resources/template_configs/metadata_configs.json +20 -0
- ams_bp-0.4.0/src/AMS_BP/resources/template_configs/sim_config.toml +408 -0
- ams_bp-0.4.0/src/AMS_BP/resources/template_configs/twocolor_widefield_timeseries_live.toml +399 -0
- ams_bp-0.4.0/src/AMS_BP/resources/template_configs/twocolor_widefield_zstack_fixed.toml +406 -0
- ams_bp-0.4.0/src/AMS_BP/resources/template_configs/twocolor_widefield_zstack_live.toml +408 -0
- ams_bp-0.4.0/src/AMS_BP/run_sim_util.py +76 -0
- ams_bp-0.4.0/src/AMS_BP/sample/__init__.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/sim_microscopy.py +2 -2
- ams_bp-0.4.0/src/AMS_BP/utils/__init__.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/uv.lock +1335 -33
- ams_bp-0.3.0/docs/API_Documentation/configio/convertconfig.md +0 -166
- ams_bp-0.3.0/docs/API_Documentation/run_cell_simulation.md +0 -140
- ams_bp-0.3.0/examples/QuantitativeExperiments/FRAP_methods.ipynb +0 -1030
- ams_bp-0.3.0/examples/VisualizingIndividualModules/laser_modulation.ipynb +0 -1089
- ams_bp-0.3.0/examples/VisualizingIndividualModules/modules_explained.ipynb +0 -1471
- ams_bp-0.3.0/src/AMS_BP/configio/convertconfig.py +0 -919
- {ams_bp-0.3.0 → ams_bp-0.4.0}/.github/workflows/lint.yml +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/.github/workflows/pages.yml +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/.github/workflows/publish_pypi.yml +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/.gitignore +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/LICENSE +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/docs/API_Documentation/configio/experiments.md +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/docs/API_Documentation/configio/saving.md +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/docs/API_Documentation/groundtruth_generators/nuclearporecomplexes.md +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/docs/API_Documentation/metadata/metadata.md +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/docs/API_Documentation/motion/condensate_movement.md +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/docs/API_Documentation/motion/movement/boundary_conditions.md +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/docs/API_Documentation/motion/movement/fbm_BP.md +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/docs/API_Documentation/motion/track_gen.md +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/docs/API_Documentation/optics/camera/detectors.md +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/docs/API_Documentation/optics/camera/quantum_eff.md +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/docs/API_Documentation/optics/filters/channels/channelschema.md +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/docs/API_Documentation/optics/filters/filters.md +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/docs/API_Documentation/optics/lasers/laser_profiles.md +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/docs/API_Documentation/optics/psf/psf_engine.md +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/docs/API_Documentation/photophysics/photon_physics.md +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/docs/API_Documentation/photophysics/state_kinetics.md +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/docs/API_Documentation/probabilityfuncs/markov_chain.md +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/docs/API_Documentation/probabilityfuncs/probability_functions.md +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/docs/API_Documentation/sample/flurophore/flurophore_schema.md +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/docs/API_Documentation/sample/sim_sampleplane.md +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/docs/API_Documentation/sim_microscopy.md +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/docs/API_Documentation/utils/constants.md +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/docs/API_Documentation/utils/errors.md +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/docs/API_Documentation/utils/util_functions.md +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/docs/assets/figures/Fig1_Schema.svg +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/docs/assets/icons/Cells-actin-like-a-tree-Jamie-Whitelaw-1.png +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/docs/assets/icons/drawing.pdf +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/docs/assets/icons/drawing.png +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/docs/assets/icons/drawing.svg +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/docs/index.md +0 -0
- {ams_bp-0.3.0/examples/QuantitativeExperiments → ams_bp-0.4.0/examples/QuantitativeExperiments/FRAP}/FRAP_base_[[0. 0.]].txt +0 -0
- {ams_bp-0.3.0/examples/QuantitativeExperiments → ams_bp-0.4.0/examples/QuantitativeExperiments/FRAP}/FRAP_base_[[0.04 0.04]].txt +0 -0
- {ams_bp-0.3.0/examples/QuantitativeExperiments → ams_bp-0.4.0/examples/QuantitativeExperiments/FRAP}/FRAP_base_[[0.1 0.1]].txt +0 -0
- {ams_bp-0.3.0/examples/QuantitativeExperiments → ams_bp-0.4.0/examples/QuantitativeExperiments/FRAP}/FRAP_base_[[0.4 0.4]].txt +0 -0
- {ams_bp-0.3.0/examples/QuantitativeExperiments → ams_bp-0.4.0/examples/QuantitativeExperiments/FRAP}/FRAP_data_[[0. 0.]].txt +0 -0
- {ams_bp-0.3.0/examples/QuantitativeExperiments → ams_bp-0.4.0/examples/QuantitativeExperiments/FRAP}/FRAP_data_[[0.04 0.04]].txt +0 -0
- {ams_bp-0.3.0/examples/QuantitativeExperiments → ams_bp-0.4.0/examples/QuantitativeExperiments/FRAP}/FRAP_data_[[0.1 0.1]].txt +0 -0
- {ams_bp-0.3.0/examples/QuantitativeExperiments → ams_bp-0.4.0/examples/QuantitativeExperiments/FRAP}/FRAP_data_[[0.4 0.4]].txt +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/mkdocs.yml +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/pytest.ini +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/cells/__init__.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/cells/budding_yeast_cell.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/cells/cell_factory.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/configio/__init__.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/configio/experiments.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/configio/saving.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/groundtruth_generators/__init__.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/groundtruth_generators/nuclearporecomplexes.py +0 -0
- {ams_bp-0.3.0/src/AMS_BP/metadata → ams_bp-0.4.0/src/AMS_BP/gui}/__init__.py +0 -0
- {ams_bp-0.3.0/src/AMS_BP/optics → ams_bp-0.4.0/src/AMS_BP/gui/assets}/__init__.py +0 -0
- {ams_bp-0.3.0/src/AMS_BP/optics/filters/channels → ams_bp-0.4.0/src/AMS_BP/gui/help_docs}/__init__.py +0 -0
- {ams_bp-0.3.0/src/AMS_BP/photophysics → ams_bp-0.4.0/src/AMS_BP/gui/widgets}/__init__.py +0 -0
- {ams_bp-0.3.0/src/AMS_BP/probabilityfuncs → ams_bp-0.4.0/src/AMS_BP/gui/widgets/utility_widgets}/__init__.py +0 -0
- {ams_bp-0.3.0/src/AMS_BP/sample → ams_bp-0.4.0/src/AMS_BP/logging}/__init__.py +0 -0
- {ams_bp-0.3.0/src/AMS_BP/utils → ams_bp-0.4.0/src/AMS_BP/metadata}/__init__.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/metadata/metadata.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/motion/__init__.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/motion/condensate_movement.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/motion/movement/__init__.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/motion/movement/boundary_conditions.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/motion/track_gen.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/optics/camera/__init__.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/optics/camera/detectors.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/optics/camera/quantum_eff.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/optics/filters/__init__.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/optics/filters/channels/channelschema.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/optics/lasers/__init__.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/optics/lasers/laser_profiles.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/optics/lasers/scanning_patterns.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/optics/psf/__init__.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/optics/psf/psf_engine.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/photophysics/photon_physics.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/photophysics/state_kinetics.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/probabilityfuncs/markov_chain.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/probabilityfuncs/probability_functions.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/sample/flurophores/__init__.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/sample/flurophores/flurophore_schema.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/sample/sim_sampleplane.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/sim_config.toml +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/utils/constants.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/utils/decorators.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/utils/errors.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/utils/maskMaker.py +0 -0
- {ams_bp-0.3.0 → ams_bp-0.4.0}/src/AMS_BP/utils/util_functions.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: AMS_BP
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.4.0
|
4
4
|
Summary: Advanced Microscopy Simulations developed for the Weber Lab by Baljyot Singh Parmar
|
5
5
|
Project-URL: Documentation, https://joemans3.github.io/AMS_BP/
|
6
6
|
Project-URL: Source code, https://github.com/joemans3/AMS_BP
|
@@ -11,12 +11,16 @@ Keywords: SMS
|
|
11
11
|
Requires-Python: >=3.12
|
12
12
|
Requires-Dist: boundedfbm>=0.4.0
|
13
13
|
Requires-Dist: jsonschema>=4.23.0
|
14
|
+
Requires-Dist: napari[all]>=0.5.6
|
14
15
|
Requires-Dist: numpy>=1.21.2
|
15
16
|
Requires-Dist: pydantic>=2.9.2
|
17
|
+
Requires-Dist: pyqt6>=6.9.0
|
16
18
|
Requires-Dist: pyvista>=0.44.2
|
17
19
|
Requires-Dist: scikit-image>=0.18.3
|
18
20
|
Requires-Dist: scipy>=1.7.1
|
21
|
+
Requires-Dist: tifffile>=2024.12.12
|
19
22
|
Requires-Dist: tomli>=2.0.2
|
23
|
+
Requires-Dist: tomlkit>=0.13.2
|
20
24
|
Requires-Dist: typer>=0.12.5
|
21
25
|
Description-Content-Type: text/markdown
|
22
26
|
|
@@ -29,11 +33,28 @@ Description-Content-Type: text/markdown
|
|
29
33
|
|
30
34
|
AMS-BP is a powerful simulation tool for advanced fluorescence microscopy experiments. This guide covers both command-line usage and library integration.
|
31
35
|
|
32
|
-
|
36
|
+
## Overview of Simulation Workflow
|
37
|
+
<img align = "left" src="./docs/assets/figures/Fig1_Schema.svg" width="500"/>
|
38
|
+
|
39
|
+
*A ground truth is created, **a**, with $`f_{n}`$ fluorophore types of $`N_{f_{n}}`$ molecules each. If applicable, the motion of these molecules is modelled using a 3D bounded FBM with fluctuating generalized diffusion coefficients and Hurst parameters. Variations are modelled as a Markov Chain and require rate constants as parameters. Different fluorophores can have different motion models. The resolution of the motion models is $`\Delta t`$ and cannot be smaller than 1 ms (for computational efficiency). Given the microscope parameters specific to the experimental procedure to simulate, at every time $`t_{j}`$, the excitation intensity for each channel (**b**) is calculated at each fluorophore's location, **c**. For $`t_{j} \rightarrow t_{j+\Delta t}`$, the photophysical state trajectory of the fluorophore is simulated using the light intensity at the molecule's location as input for any light-dependent transition rates, **d**. For the duration that the shutter is open and light is emitted from the sample, emission filters for each channel are applied before the convolution with PSF models, **e**. The incident photons on the detector are then converted to photoelectrons and finally to digital units using the detector models provided, **f**.*
|
40
|
+
|
41
|
+
## API Reference and Docs
|
42
|
+
Find detailed API references for the library at: [joemans3/github.io/AMS_BP](https://joemans3.github.io/AMS_BP/)
|
43
|
+
> A more detailed example is provided in the jupyter notebook in the examples. For starters refer to the [VisualizingIndividualModules](examples/VisualizingIndividualModules/modules_explained.ipynb). Then head over to the [laser modulation module](examples/VisualizingIndividualModules/laser_modulation.ipynb) which will show how to change the laser power over time in the simulations. Then view an example of a complex experiment setup for [FRAP](examples/QuantitativeExperiments/FRAP/FRAP_methods.ipynb) which is possible by the use of compositions of modules in this simulation library.
|
44
|
+
|
45
|
+
## Examples (Click on the image buttons to be taken to the Jupyter notebooks):
|
46
|
+
|
47
|
+
> !!ATTENTION!! - Please note that you NEED to install the developmental dependencies to run the examples in full. This is mainly for installing the Jupyter notebook extensions, matplotlib and other visualization packages.
|
33
48
|
|
49
|
+
[<img src="./docs/assets/buttons/ButtonFigure_FRAP.svg" width="300" height="120"/>](./examples/QuantitativeExperiments/FRAP/FRAP_methods.ipynb) [<img src="./docs/assets/buttons/ButtonFigure_fPALM_NPC.svg" width="300"/>](./examples/QuantitativeExperiments/FRAP/FRAP_methods.ipynb)
|
50
|
+
|
51
|
+
[<img src="./docs/assets/buttons/ButtonFigure_zstack_twocolor_widefield.svg" width="300"/>](./examples/QuantitativeExperiments/TwoColor/Widefield/widefield_twocolor.ipynb) [<img src="./docs/assets/buttons/ButtonFigure_zstack_twocolor_confocal.svg" width="300"/>](./examples/QuantitativeExperiments/TwoColor/Confocal/confocal_twocolor.ipynb)
|
52
|
+
|
53
|
+
[<img align="middle" src="./docs/assets/buttons/ButtonFigure_sptPALM_mmaple.svg" width="300"/>](./examples/QuantitativeExperiments/PALM/sptPALM/motionmodels_sptmmaple.ipynb)
|
34
54
|
## Table of Contents
|
35
55
|
- [Installation](#installation)
|
36
56
|
- [Command Line Interface](#command-line-interface)
|
57
|
+
- [GUI](#gui)
|
37
58
|
- [Configuration File](#configuration-file)
|
38
59
|
- [Running Experiments](#running-experiments)
|
39
60
|
- [Advanced Usage](#advanced-usage)
|
@@ -74,6 +95,9 @@ run_AMS_BP config [OPTIONS]
|
|
74
95
|
|
75
96
|
# Run a simulation using a configuration file
|
76
97
|
run_AMS_BP runsim CONFIG_FILE
|
98
|
+
|
99
|
+
#start the GUI
|
100
|
+
run_AMS_BP gui
|
77
101
|
```
|
78
102
|
|
79
103
|
### Config Command Options
|
@@ -81,13 +105,40 @@ run_AMS_BP runsim CONFIG_FILE
|
|
81
105
|
- `-o, --output_path PATH`: Specify the output directory for the configuration file
|
82
106
|
- `-r, --recursive_o`: Create output directory if it doesn't exist
|
83
107
|
|
84
|
-
##
|
85
|
-
|
86
|
-
*A ground truth is created, **a**, with $`f_{n}`$ fluorophore types of $`N_{f_{n}}`$ molecules each. If applicable, the motion of these molecules is modelled using a 3D bounded FBM with fluctuating generalized diffusion coefficients and Hurst parameters. Variations are modelled as a Markov Chain and require rate constants as parameters. Different fluorophores can have different motion models. The resolution of the motion models is $`\Delta t`$ and cannot be smaller than 1 ms (for computational efficiency). Given the microscope parameters specific to the experimental procedure to simulate, at every time $`t_{j}`$, the excitation intensity for each channel (**b**) is calculated at each fluorophore's location, **c**. For $`t_{j} \rightarrow t_{j+\Delta t}`$, the photophysical state trajectory of the fluorophore is simulated using the light intensity at the molecule's location as input for any light-dependent transition rates, **d**. For the duration that the shutter is open and light is emitted from the sample, emission filters for each channel are applied before the convolution with PSF models, **e**. The incident photons on the detector are then converted to photoelectrons and finally to digital units using the detector models provided, **f**.*
|
108
|
+
## GUI
|
109
|
+
In addition to the CLI and programmatic API, AMS-BP comes with a graphical interface to guide users through the configuration, simulation, and analysis pipeline.
|
87
110
|
|
111
|
+
### Main GUI Features
|
112
|
+
The GUI provides the following tools from a single interface:
|
88
113
|
|
114
|
+
**Create Configuration File** — Launches the visual configuration builder
|
115
|
+
**Run Simulation from Config** — Select a .toml file and run the simulation with logging and progress tracking
|
116
|
+
**Visualize Microscopy Data (Napari)** — Open TIFF, PNG, ND2, or Zarr image files and view with the Napari viewer
|
117
|
+
**Package Logs for Sharing** — Package run directories (e.g., run_2024_04_20_001) into a .zip file for archival or collaboration
|
89
118
|
|
119
|
+
### Launch the GUI
|
120
|
+
To start the GUI, run:
|
121
|
+
|
122
|
+
```bash
|
123
|
+
|
124
|
+
run_AMS_BP gui
|
125
|
+
```
|
126
|
+
#### Configuration Builder
|
127
|
+
Clicking "Create Configuration File" opens a template selector where you can choose a preconfigured simulation (with preview images), and then visually edit all configuration options through dedicated tabs.
|
90
128
|
|
129
|
+
Each section of the configuration is editable via structured UI forms, with contextual help and validation. Tabs include:
|
130
|
+
|
131
|
+
- Global/Cell/Molecule/Condensate/Fluorophore parameters
|
132
|
+
- Laser and optical configuration
|
133
|
+
- Camera and channel settings
|
134
|
+
- Experiment setup (e.g., z-stack vs time-series)
|
135
|
+
Once ready, click "Preview Configuration TOML" to inspect the final file, and "Save" to export.
|
136
|
+
|
137
|
+
#### Running Simulations from GUI
|
138
|
+
Clicking "Run Simulation from Config" lets you select any .toml configuration file. A real-time log viewer shows progress, and outputs are saved in a structured AMS_runs/run_*/ directory.
|
139
|
+
|
140
|
+
#### Sharing Logs
|
141
|
+
Run into an issue? Use the packge logs button to select the logs corresponding to the simulation you just ran, save them and send them over to us! It will help you diagnose the issue!
|
91
142
|
|
92
143
|
## Configuration File
|
93
144
|
|
@@ -166,35 +217,6 @@ run_AMS_BP config
|
|
166
217
|
run_AMS_BP runsim sim_config.toml
|
167
218
|
```
|
168
219
|
4. View the results in the newly created folder, whose name is defined in the config file.
|
169
|
-
## Advanced Usage
|
170
|
-
|
171
|
-
### Using AMS-BP as a Library
|
172
|
-
|
173
|
-
For programmatic control, you can import and use AMS-BP as a Python library:
|
174
|
-
|
175
|
-
```python
|
176
|
-
from AMS_BP.configio.convertconfig import ConfigLoader
|
177
|
-
|
178
|
-
# Configuration loader intialization
|
179
|
-
config_loader = ConfigLoader(config_path="path/to/config.toml")
|
180
|
-
|
181
|
-
# Setup microscope
|
182
|
-
setup_config = config_loader.setup_microscope()
|
183
|
-
microscope = setup_config["microscope"]
|
184
|
-
config_exp = setup_config["experiment_config"]
|
185
|
-
function_exp = setup_config["experiment_func"]
|
186
|
-
|
187
|
-
# Run simulation
|
188
|
-
frames, metadata = function_exp(microscope=microscope, config=config_exp)
|
189
|
-
|
190
|
-
# Save results
|
191
|
-
from AMS_BP.configio.saving import save_config_frames
|
192
|
-
save_config_frames(metadata, frames, setup_config["base_config"].OutputParameters)
|
193
|
-
```
|
194
|
-
|
195
|
-
## API Reference and Docs
|
196
|
-
Find detailed API references for the library at: [joemans3/github.io/AMS_BP](https://joemans3.github.io/AMS_BP/)
|
197
|
-
> A more detailed example is provided in the jupyter notebook in the examples. For starters refer to the [VisualizingIndividualModules](examples/VisualizingIndividualModules/modules_explained.ipynb). Then head over to the [laser modulation module](examples/VisualizingIndividualModules/laser_modulation.ipynb) which will show how to change the laser power over time in the simulations. Then view an example of a complex experiment setup for [FRAP](examples/QuantitativeExperiments/FRAP_methods.ipynb) which is possible by the use of compositions of modules in this simulation library.
|
198
220
|
|
199
221
|
## High Priority Features
|
200
222
|
~~1. Irregular cell shapes with motion models~~ (supported with release of v0.2.0)
|
@@ -202,3 +224,6 @@ Find detailed API references for the library at: [joemans3/github.io/AMS_BP](htt
|
|
202
224
|
3. STORM workflow examples
|
203
225
|
4. CTRW motion models
|
204
226
|
5. Simpler configurations
|
227
|
+
> **_NOTE:_** Please note that this application DOES NOT currently model the process of stimulated emission, and as such is not suitable for simulating stimulated emission microscopy ([STED](https://en.wikipedia.org/wiki/STED_microscopy))-type experiments. Work in this area is ongoing.
|
228
|
+
|
229
|
+
|
@@ -7,11 +7,28 @@
|
|
7
7
|
|
8
8
|
AMS-BP is a powerful simulation tool for advanced fluorescence microscopy experiments. This guide covers both command-line usage and library integration.
|
9
9
|
|
10
|
-
|
10
|
+
## Overview of Simulation Workflow
|
11
|
+
<img align = "left" src="./docs/assets/figures/Fig1_Schema.svg" width="500"/>
|
12
|
+
|
13
|
+
*A ground truth is created, **a**, with $`f_{n}`$ fluorophore types of $`N_{f_{n}}`$ molecules each. If applicable, the motion of these molecules is modelled using a 3D bounded FBM with fluctuating generalized diffusion coefficients and Hurst parameters. Variations are modelled as a Markov Chain and require rate constants as parameters. Different fluorophores can have different motion models. The resolution of the motion models is $`\Delta t`$ and cannot be smaller than 1 ms (for computational efficiency). Given the microscope parameters specific to the experimental procedure to simulate, at every time $`t_{j}`$, the excitation intensity for each channel (**b**) is calculated at each fluorophore's location, **c**. For $`t_{j} \rightarrow t_{j+\Delta t}`$, the photophysical state trajectory of the fluorophore is simulated using the light intensity at the molecule's location as input for any light-dependent transition rates, **d**. For the duration that the shutter is open and light is emitted from the sample, emission filters for each channel are applied before the convolution with PSF models, **e**. The incident photons on the detector are then converted to photoelectrons and finally to digital units using the detector models provided, **f**.*
|
14
|
+
|
15
|
+
## API Reference and Docs
|
16
|
+
Find detailed API references for the library at: [joemans3/github.io/AMS_BP](https://joemans3.github.io/AMS_BP/)
|
17
|
+
> A more detailed example is provided in the jupyter notebook in the examples. For starters refer to the [VisualizingIndividualModules](examples/VisualizingIndividualModules/modules_explained.ipynb). Then head over to the [laser modulation module](examples/VisualizingIndividualModules/laser_modulation.ipynb) which will show how to change the laser power over time in the simulations. Then view an example of a complex experiment setup for [FRAP](examples/QuantitativeExperiments/FRAP/FRAP_methods.ipynb) which is possible by the use of compositions of modules in this simulation library.
|
18
|
+
|
19
|
+
## Examples (Click on the image buttons to be taken to the Jupyter notebooks):
|
20
|
+
|
21
|
+
> !!ATTENTION!! - Please note that you NEED to install the developmental dependencies to run the examples in full. This is mainly for installing the Jupyter notebook extensions, matplotlib and other visualization packages.
|
11
22
|
|
23
|
+
[<img src="./docs/assets/buttons/ButtonFigure_FRAP.svg" width="300" height="120"/>](./examples/QuantitativeExperiments/FRAP/FRAP_methods.ipynb) [<img src="./docs/assets/buttons/ButtonFigure_fPALM_NPC.svg" width="300"/>](./examples/QuantitativeExperiments/FRAP/FRAP_methods.ipynb)
|
24
|
+
|
25
|
+
[<img src="./docs/assets/buttons/ButtonFigure_zstack_twocolor_widefield.svg" width="300"/>](./examples/QuantitativeExperiments/TwoColor/Widefield/widefield_twocolor.ipynb) [<img src="./docs/assets/buttons/ButtonFigure_zstack_twocolor_confocal.svg" width="300"/>](./examples/QuantitativeExperiments/TwoColor/Confocal/confocal_twocolor.ipynb)
|
26
|
+
|
27
|
+
[<img align="middle" src="./docs/assets/buttons/ButtonFigure_sptPALM_mmaple.svg" width="300"/>](./examples/QuantitativeExperiments/PALM/sptPALM/motionmodels_sptmmaple.ipynb)
|
12
28
|
## Table of Contents
|
13
29
|
- [Installation](#installation)
|
14
30
|
- [Command Line Interface](#command-line-interface)
|
31
|
+
- [GUI](#gui)
|
15
32
|
- [Configuration File](#configuration-file)
|
16
33
|
- [Running Experiments](#running-experiments)
|
17
34
|
- [Advanced Usage](#advanced-usage)
|
@@ -52,6 +69,9 @@ run_AMS_BP config [OPTIONS]
|
|
52
69
|
|
53
70
|
# Run a simulation using a configuration file
|
54
71
|
run_AMS_BP runsim CONFIG_FILE
|
72
|
+
|
73
|
+
#start the GUI
|
74
|
+
run_AMS_BP gui
|
55
75
|
```
|
56
76
|
|
57
77
|
### Config Command Options
|
@@ -59,13 +79,40 @@ run_AMS_BP runsim CONFIG_FILE
|
|
59
79
|
- `-o, --output_path PATH`: Specify the output directory for the configuration file
|
60
80
|
- `-r, --recursive_o`: Create output directory if it doesn't exist
|
61
81
|
|
62
|
-
##
|
63
|
-
|
64
|
-
*A ground truth is created, **a**, with $`f_{n}`$ fluorophore types of $`N_{f_{n}}`$ molecules each. If applicable, the motion of these molecules is modelled using a 3D bounded FBM with fluctuating generalized diffusion coefficients and Hurst parameters. Variations are modelled as a Markov Chain and require rate constants as parameters. Different fluorophores can have different motion models. The resolution of the motion models is $`\Delta t`$ and cannot be smaller than 1 ms (for computational efficiency). Given the microscope parameters specific to the experimental procedure to simulate, at every time $`t_{j}`$, the excitation intensity for each channel (**b**) is calculated at each fluorophore's location, **c**. For $`t_{j} \rightarrow t_{j+\Delta t}`$, the photophysical state trajectory of the fluorophore is simulated using the light intensity at the molecule's location as input for any light-dependent transition rates, **d**. For the duration that the shutter is open and light is emitted from the sample, emission filters for each channel are applied before the convolution with PSF models, **e**. The incident photons on the detector are then converted to photoelectrons and finally to digital units using the detector models provided, **f**.*
|
82
|
+
## GUI
|
83
|
+
In addition to the CLI and programmatic API, AMS-BP comes with a graphical interface to guide users through the configuration, simulation, and analysis pipeline.
|
65
84
|
|
85
|
+
### Main GUI Features
|
86
|
+
The GUI provides the following tools from a single interface:
|
66
87
|
|
88
|
+
**Create Configuration File** — Launches the visual configuration builder
|
89
|
+
**Run Simulation from Config** — Select a .toml file and run the simulation with logging and progress tracking
|
90
|
+
**Visualize Microscopy Data (Napari)** — Open TIFF, PNG, ND2, or Zarr image files and view with the Napari viewer
|
91
|
+
**Package Logs for Sharing** — Package run directories (e.g., run_2024_04_20_001) into a .zip file for archival or collaboration
|
67
92
|
|
93
|
+
### Launch the GUI
|
94
|
+
To start the GUI, run:
|
95
|
+
|
96
|
+
```bash
|
97
|
+
|
98
|
+
run_AMS_BP gui
|
99
|
+
```
|
100
|
+
#### Configuration Builder
|
101
|
+
Clicking "Create Configuration File" opens a template selector where you can choose a preconfigured simulation (with preview images), and then visually edit all configuration options through dedicated tabs.
|
68
102
|
|
103
|
+
Each section of the configuration is editable via structured UI forms, with contextual help and validation. Tabs include:
|
104
|
+
|
105
|
+
- Global/Cell/Molecule/Condensate/Fluorophore parameters
|
106
|
+
- Laser and optical configuration
|
107
|
+
- Camera and channel settings
|
108
|
+
- Experiment setup (e.g., z-stack vs time-series)
|
109
|
+
Once ready, click "Preview Configuration TOML" to inspect the final file, and "Save" to export.
|
110
|
+
|
111
|
+
#### Running Simulations from GUI
|
112
|
+
Clicking "Run Simulation from Config" lets you select any .toml configuration file. A real-time log viewer shows progress, and outputs are saved in a structured AMS_runs/run_*/ directory.
|
113
|
+
|
114
|
+
#### Sharing Logs
|
115
|
+
Run into an issue? Use the packge logs button to select the logs corresponding to the simulation you just ran, save them and send them over to us! It will help you diagnose the issue!
|
69
116
|
|
70
117
|
## Configuration File
|
71
118
|
|
@@ -144,35 +191,6 @@ run_AMS_BP config
|
|
144
191
|
run_AMS_BP runsim sim_config.toml
|
145
192
|
```
|
146
193
|
4. View the results in the newly created folder, whose name is defined in the config file.
|
147
|
-
## Advanced Usage
|
148
|
-
|
149
|
-
### Using AMS-BP as a Library
|
150
|
-
|
151
|
-
For programmatic control, you can import and use AMS-BP as a Python library:
|
152
|
-
|
153
|
-
```python
|
154
|
-
from AMS_BP.configio.convertconfig import ConfigLoader
|
155
|
-
|
156
|
-
# Configuration loader intialization
|
157
|
-
config_loader = ConfigLoader(config_path="path/to/config.toml")
|
158
|
-
|
159
|
-
# Setup microscope
|
160
|
-
setup_config = config_loader.setup_microscope()
|
161
|
-
microscope = setup_config["microscope"]
|
162
|
-
config_exp = setup_config["experiment_config"]
|
163
|
-
function_exp = setup_config["experiment_func"]
|
164
|
-
|
165
|
-
# Run simulation
|
166
|
-
frames, metadata = function_exp(microscope=microscope, config=config_exp)
|
167
|
-
|
168
|
-
# Save results
|
169
|
-
from AMS_BP.configio.saving import save_config_frames
|
170
|
-
save_config_frames(metadata, frames, setup_config["base_config"].OutputParameters)
|
171
|
-
```
|
172
|
-
|
173
|
-
## API Reference and Docs
|
174
|
-
Find detailed API references for the library at: [joemans3/github.io/AMS_BP](https://joemans3.github.io/AMS_BP/)
|
175
|
-
> A more detailed example is provided in the jupyter notebook in the examples. For starters refer to the [VisualizingIndividualModules](examples/VisualizingIndividualModules/modules_explained.ipynb). Then head over to the [laser modulation module](examples/VisualizingIndividualModules/laser_modulation.ipynb) which will show how to change the laser power over time in the simulations. Then view an example of a complex experiment setup for [FRAP](examples/QuantitativeExperiments/FRAP_methods.ipynb) which is possible by the use of compositions of modules in this simulation library.
|
176
194
|
|
177
195
|
## High Priority Features
|
178
196
|
~~1. Irregular cell shapes with motion models~~ (supported with release of v0.2.0)
|
@@ -180,3 +198,6 @@ Find detailed API references for the library at: [joemans3/github.io/AMS_BP](htt
|
|
180
198
|
3. STORM workflow examples
|
181
199
|
4. CTRW motion models
|
182
200
|
5. Simpler configurations
|
201
|
+
> **_NOTE:_** Please note that this application DOES NOT currently model the process of stimulated emission, and as such is not suitable for simulating stimulated emission microscopy ([STED](https://en.wikipedia.org/wiki/STED_microscopy))-type experiments. Work in this area is ongoing.
|
202
|
+
|
203
|
+
|
@@ -204,30 +204,30 @@ All models include automatic validation and conversion:
|
|
204
204
|
```python
|
205
205
|
# Create configuration instance
|
206
206
|
config = ConfigList(
|
207
|
-
|
207
|
+
CellParameter=CellParameters(
|
208
208
|
cell_space=[[0, 10], [0, 10]],
|
209
209
|
cell_axial_radius=5.0
|
210
210
|
),
|
211
|
-
|
211
|
+
MoleculeParameter=MoleculeParameters(
|
212
212
|
num_molecules=[100],
|
213
213
|
track_type=["fbm"],
|
214
214
|
# ... other required fields ...
|
215
215
|
),
|
216
|
-
|
216
|
+
GlobalParameter=GlobalParameters(
|
217
217
|
sample_plane_dim=[20.0, 20.0],
|
218
218
|
cycle_count=100,
|
219
219
|
exposure_time=100,
|
220
220
|
interval_time=100,
|
221
221
|
oversample_motion_time=10
|
222
222
|
),
|
223
|
-
|
223
|
+
CondensateParameter=CondensateParameters(
|
224
224
|
initial_centers=[[[5.0, 5.0]]],
|
225
225
|
initial_scale=[[2.0]],
|
226
226
|
diffusion_coefficient=[[0.1]],
|
227
227
|
hurst_exponent=[[0.7]],
|
228
228
|
density_dif=[2]
|
229
229
|
),
|
230
|
-
|
230
|
+
OutputParameter=OutputParameters(
|
231
231
|
output_path="./output",
|
232
232
|
output_name="simulation",
|
233
233
|
subsegment_type="uniform",
|
@@ -0,0 +1,193 @@
|
|
1
|
+
# Virtual Microscope Configuration Parser Documentation
|
2
|
+
|
3
|
+
## Overview
|
4
|
+
|
5
|
+
This module provides functionality to parse TOML configuration files and set up a virtual microscope simulation environment. It handles all aspects of configuration including global parameters, cell parameters, molecule parameters, condensate parameters, fluorophores, PSF (Point Spread Function), lasers, filters, channels, detectors, and experimental settings.
|
6
|
+
|
7
|
+
## Key Components
|
8
|
+
|
9
|
+
### Configuration Loading
|
10
|
+
|
11
|
+
```python
|
12
|
+
load_config(config_path: Union[str, Path]) -> Dict[str, Any]
|
13
|
+
```
|
14
|
+
|
15
|
+
Loads and parses a TOML configuration file from the specified path.
|
16
|
+
|
17
|
+
### Data Model Schema Population
|
18
|
+
|
19
|
+
```python
|
20
|
+
populate_dataclass_schema(config: Dict[str, Any]) -> Tuple[GlobalParameters, CellParameters, MoleculeParameters, CondensateParameters, OutputParameters]
|
21
|
+
```
|
22
|
+
|
23
|
+
Populates Pydantic schema models from configuration data, returning structured parameter objects.
|
24
|
+
|
25
|
+
### Experiment Configuration
|
26
|
+
|
27
|
+
```python
|
28
|
+
create_experiment_from_config(config: Dict[str, Any]) -> Tuple[BaseExpConfig, Callable]
|
29
|
+
```
|
30
|
+
|
31
|
+
Creates an experiment configuration and associated callable function based on the experiment type (time-series or z-stack).
|
32
|
+
|
33
|
+
### Fluorophore Configuration
|
34
|
+
|
35
|
+
```python
|
36
|
+
create_fluorophores_from_config(config: Dict[str, Any]) -> List[Fluorophore]
|
37
|
+
```
|
38
|
+
|
39
|
+
Creates a list of fluorophore objects from configuration data, including states and transitions.
|
40
|
+
|
41
|
+
### PSF (Point Spread Function) Configuration
|
42
|
+
|
43
|
+
```python
|
44
|
+
create_psf_from_config(config: Dict[str, Any]) -> Tuple[Callable, Dict[str, Any]]
|
45
|
+
```
|
46
|
+
|
47
|
+
Creates a PSF engine function and additional configuration from the config data.
|
48
|
+
|
49
|
+
### Laser Configuration
|
50
|
+
|
51
|
+
```python
|
52
|
+
create_lasers_from_config(config: Dict[str, Any]) -> Dict[str, LaserProfile]
|
53
|
+
```
|
54
|
+
|
55
|
+
Creates laser profile instances (Gaussian, Widefield, HiLo) from configuration data.
|
56
|
+
|
57
|
+
### Filter Configuration
|
58
|
+
|
59
|
+
```python
|
60
|
+
create_filter_set_from_config(config: Dict[str, Any]) -> FilterSet
|
61
|
+
```
|
62
|
+
|
63
|
+
Creates a filter set (excitation, emission, dichroic) from configuration data.
|
64
|
+
|
65
|
+
### Channel Configuration
|
66
|
+
|
67
|
+
```python
|
68
|
+
create_channels(config: Dict[str, Any]) -> Channels
|
69
|
+
```
|
70
|
+
|
71
|
+
Creates channel objects from configuration data.
|
72
|
+
|
73
|
+
### Detector Configuration
|
74
|
+
|
75
|
+
```python
|
76
|
+
create_detector_from_config(config: Dict[str, Any]) -> Tuple[Detector, QuantumEfficiency]
|
77
|
+
```
|
78
|
+
|
79
|
+
Creates a detector instance (CMOS or EMCCD) and quantum efficiency from configuration data.
|
80
|
+
|
81
|
+
### Cell Creation
|
82
|
+
|
83
|
+
```python
|
84
|
+
create_cell_from_params(cell_params) -> BaseCell
|
85
|
+
```
|
86
|
+
|
87
|
+
Creates a cell object based on cell parameters.
|
88
|
+
|
89
|
+
### Sample Plane Creation
|
90
|
+
|
91
|
+
```python
|
92
|
+
create_sample_plane(global_params: GlobalParameters, cell: BaseCell) -> SamplePlane
|
93
|
+
```
|
94
|
+
|
95
|
+
Creates a sample plane object based on global parameters and cell information.
|
96
|
+
|
97
|
+
### Condensate Configuration
|
98
|
+
|
99
|
+
```python
|
100
|
+
create_condensates_dict(condensate_params: CondensateParameters, cell: BaseCell) -> List[dict]
|
101
|
+
```
|
102
|
+
|
103
|
+
Creates a list of condensate dictionaries based on condensate parameters.
|
104
|
+
|
105
|
+
### Sampling Function Creation
|
106
|
+
|
107
|
+
```python
|
108
|
+
create_sampling_functions(condensate_params, cell) -> List[Callable]
|
109
|
+
```
|
110
|
+
|
111
|
+
Creates sampling functions for initial molecule positions.
|
112
|
+
|
113
|
+
### Molecule Position Generation
|
114
|
+
|
115
|
+
```python
|
116
|
+
generate_initial_positions(molecule_params: MoleculeParameters, cell: BaseCell, condensate_params: CondensateParameters, sampling_functions: List[Callable]) -> List
|
117
|
+
```
|
118
|
+
|
119
|
+
Generates initial positions for molecules.
|
120
|
+
|
121
|
+
### Track Generation
|
122
|
+
|
123
|
+
```python
|
124
|
+
create_track_generator(global_params: GlobalParameters, cell: BaseCell) -> Track_generator
|
125
|
+
```
|
126
|
+
|
127
|
+
Creates a track generator object for molecule motion.
|
128
|
+
|
129
|
+
```python
|
130
|
+
get_tracks(molecule_params: MoleculeParameters, global_params: GlobalParameters, initial_positions: List, track_generator: Track_generator) -> Tuple[List, List]
|
131
|
+
```
|
132
|
+
|
133
|
+
Generates tracks for molecules based on parameters.
|
134
|
+
|
135
|
+
### Sample Creation
|
136
|
+
|
137
|
+
```python
|
138
|
+
add_tracks_to_sample(tracks: List, sample_plane: SamplePlane, fluorophore: List[Fluorophore], ID_counter=0) -> SamplePlane
|
139
|
+
```
|
140
|
+
|
141
|
+
Adds tracks to the sample plane.
|
142
|
+
|
143
|
+
### Microscope Setup
|
144
|
+
|
145
|
+
```python
|
146
|
+
setup_microscope(config: Dict[str, Any]) -> dict
|
147
|
+
```
|
148
|
+
|
149
|
+
The main function that orchestrates the entire setup process and returns a dictionary containing all created components including:
|
150
|
+
- Virtual microscope instance
|
151
|
+
- Base configuration
|
152
|
+
- PSF engine and configuration
|
153
|
+
- Channels
|
154
|
+
- Lasers
|
155
|
+
- Sample plane
|
156
|
+
- Tracks
|
157
|
+
- Points per time
|
158
|
+
- Condensate dictionary
|
159
|
+
- Cell
|
160
|
+
- Experiment configuration
|
161
|
+
- Experiment function
|
162
|
+
|
163
|
+
## Usage
|
164
|
+
|
165
|
+
To use this module, create a TOML configuration file with all necessary parameters and call the `setup_microscope` function:
|
166
|
+
|
167
|
+
```python
|
168
|
+
config = load_config("path/to/config.toml")
|
169
|
+
microscope_setup = setup_microscope(config)
|
170
|
+
|
171
|
+
# Access the virtual microscope instance
|
172
|
+
vm = microscope_setup["microscope"]
|
173
|
+
|
174
|
+
# Run an experiment
|
175
|
+
experiment_func = microscope_setup["experiment_func"]
|
176
|
+
experiment_config = microscope_setup["experiment_config"]
|
177
|
+
results = experiment_func(vm, experiment_config)
|
178
|
+
```
|
179
|
+
|
180
|
+
## Configuration Structure
|
181
|
+
|
182
|
+
The TOML configuration file should contain the following sections:
|
183
|
+
- Global_Parameters: General simulation parameters
|
184
|
+
- Cell_Parameters: Cell-specific parameters
|
185
|
+
- Molecule_Parameters: Molecule-specific parameters
|
186
|
+
- Condensate_Parameters: Condensate-specific parameters
|
187
|
+
- Output_Parameters: Output and saving parameters
|
188
|
+
- experiment: Experiment-specific parameters
|
189
|
+
- fluorophores: Fluorophore definitions
|
190
|
+
- psf: PSF configuration
|
191
|
+
- lasers: Laser configurations
|
192
|
+
- channels: Channel configurations
|
193
|
+
- camera: Camera and detector configurations
|