AMS-BP 0.2.0__tar.gz → 0.3.1__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.2.0 → ams_bp-0.3.1}/.github/workflows/pages.yml +1 -1
- {ams_bp-0.2.0 → ams_bp-0.3.1}/PKG-INFO +32 -16
- {ams_bp-0.2.0 → ams_bp-0.3.1}/README.md +30 -14
- {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/configio/configmodels.md +6 -5
- {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/sim_config.md +0 -1
- ams_bp-0.3.1/docs/assets/buttons/ButtonFigure_FRAP.svg +862 -0
- ams_bp-0.3.1/docs/assets/buttons/ButtonFigure_fPALM_NPC.svg +1140 -0
- ams_bp-0.3.1/docs/assets/buttons/ButtonFigure_sptPALM_mmaple.svg +3150 -0
- ams_bp-0.3.1/docs/assets/buttons/ButtonFigure_zstack_twocolor_confocal.svg +1042 -0
- ams_bp-0.3.1/docs/assets/buttons/ButtonFigure_zstack_twocolor_widefield.svg +1022 -0
- ams_bp-0.3.1/examples/QuantitativeExperiments/FRAP/FRAP_methods.ipynb +1028 -0
- ams_bp-0.3.1/examples/QuantitativeExperiments/MotionModels/groundtruth_boundedfbm.ipynb +257 -0
- ams_bp-0.3.1/examples/QuantitativeExperiments/PALM/fPALM/export_full2_0039_039.csv +1229 -0
- ams_bp-0.3.1/examples/QuantitativeExperiments/PALM/fPALM/npc_palm.ipynb +1084 -0
- ams_bp-0.3.1/examples/QuantitativeExperiments/PALM/sptPALM/motionmodels_sptmmaple.ipynb +1152 -0
- ams_bp-0.3.1/examples/QuantitativeExperiments/TwoColor/Confocal/confocal_twocolor.ipynb +1407 -0
- ams_bp-0.3.1/examples/QuantitativeExperiments/TwoColor/Widefield/widefield_twocolor.ipynb +1436 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/pyproject.toml +7 -1
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/__init__.py +1 -1
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/cells/budding_yeast_cell.py +1 -1
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/cells/cell_factory.py +1 -1
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/configio/configmodels.py +6 -6
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/configio/convertconfig.py +14 -14
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/run_cell_simulation.py +1 -1
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/sim_microscopy.py +2 -2
- {ams_bp-0.2.0 → ams_bp-0.3.1}/uv.lock +323 -20
- ams_bp-0.2.0/examples/QuantitativeExperiments/FRAP_methods.ipynb +0 -1030
- {ams_bp-0.2.0 → ams_bp-0.3.1}/.github/workflows/lint.yml +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/.github/workflows/publish_pypi.yml +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/.gitignore +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/LICENSE +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/configio/convertconfig.md +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/configio/experiments.md +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/configio/saving.md +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/groundtruth_generators/nuclearporecomplexes.md +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/metadata/metadata.md +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/motion/condensate_movement.md +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/motion/movement/boundary_conditions.md +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/motion/movement/fbm_BP.md +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/motion/track_gen.md +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/optics/camera/detectors.md +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/optics/camera/quantum_eff.md +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/optics/filters/channels/channelschema.md +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/optics/filters/filters.md +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/optics/lasers/laser_profiles.md +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/optics/psf/psf_engine.md +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/photophysics/photon_physics.md +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/photophysics/state_kinetics.md +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/probabilityfuncs/markov_chain.md +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/probabilityfuncs/probability_functions.md +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/run_cell_simulation.md +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/sample/flurophore/flurophore_schema.md +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/sample/sim_sampleplane.md +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/sim_microscopy.md +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/utils/constants.md +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/utils/errors.md +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/utils/util_functions.md +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/assets/figures/Fig1_Schema.svg +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/assets/icons/Cells-actin-like-a-tree-Jamie-Whitelaw-1.png +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/assets/icons/drawing.pdf +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/assets/icons/drawing.png +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/assets/icons/drawing.svg +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/index.md +0 -0
- {ams_bp-0.2.0/examples/QuantitativeExperiments → ams_bp-0.3.1/examples/QuantitativeExperiments/FRAP}/FRAP_base_[[0. 0.]].txt +0 -0
- {ams_bp-0.2.0/examples/QuantitativeExperiments → ams_bp-0.3.1/examples/QuantitativeExperiments/FRAP}/FRAP_base_[[0.04 0.04]].txt +0 -0
- {ams_bp-0.2.0/examples/QuantitativeExperiments → ams_bp-0.3.1/examples/QuantitativeExperiments/FRAP}/FRAP_base_[[0.1 0.1]].txt +0 -0
- {ams_bp-0.2.0/examples/QuantitativeExperiments → ams_bp-0.3.1/examples/QuantitativeExperiments/FRAP}/FRAP_base_[[0.4 0.4]].txt +0 -0
- {ams_bp-0.2.0/examples/QuantitativeExperiments → ams_bp-0.3.1/examples/QuantitativeExperiments/FRAP}/FRAP_data_[[0. 0.]].txt +0 -0
- {ams_bp-0.2.0/examples/QuantitativeExperiments → ams_bp-0.3.1/examples/QuantitativeExperiments/FRAP}/FRAP_data_[[0.04 0.04]].txt +0 -0
- {ams_bp-0.2.0/examples/QuantitativeExperiments → ams_bp-0.3.1/examples/QuantitativeExperiments/FRAP}/FRAP_data_[[0.1 0.1]].txt +0 -0
- {ams_bp-0.2.0/examples/QuantitativeExperiments → ams_bp-0.3.1/examples/QuantitativeExperiments/FRAP}/FRAP_data_[[0.4 0.4]].txt +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/examples/VisualizingIndividualModules/laser_modulation.ipynb +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/examples/VisualizingIndividualModules/modules_explained.ipynb +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/mkdocs.yml +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/pytest.ini +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/cells/__init__.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/configio/__init__.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/configio/experiments.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/configio/saving.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/groundtruth_generators/__init__.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/groundtruth_generators/nuclearporecomplexes.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/metadata/__init__.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/metadata/metadata.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/motion/__init__.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/motion/condensate_movement.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/motion/movement/__init__.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/motion/movement/boundary_conditions.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/motion/track_gen.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/optics/__init__.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/optics/camera/__init__.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/optics/camera/detectors.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/optics/camera/quantum_eff.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/optics/filters/__init__.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/optics/filters/channels/__init__.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/optics/filters/channels/channelschema.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/optics/filters/filters.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/optics/lasers/__init__.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/optics/lasers/laser_profiles.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/optics/lasers/scanning_patterns.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/optics/psf/__init__.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/optics/psf/psf_engine.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/photophysics/__init__.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/photophysics/photon_physics.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/photophysics/state_kinetics.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/probabilityfuncs/__init__.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/probabilityfuncs/markov_chain.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/probabilityfuncs/probability_functions.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/sample/__init__.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/sample/flurophores/__init__.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/sample/flurophores/flurophore_schema.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/sample/sim_sampleplane.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/sim_config.toml +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/utils/__init__.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/utils/constants.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/utils/decorators.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/utils/errors.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/utils/maskMaker.py +0 -0
- {ams_bp-0.2.0 → ams_bp-0.3.1}/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.3.1
|
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
|
@@ -9,7 +9,7 @@ Maintainer-email: Baljyot Singh Parmar <baljyotparmar@hotmail.com>
|
|
9
9
|
License-File: LICENSE
|
10
10
|
Keywords: SMS
|
11
11
|
Requires-Python: >=3.12
|
12
|
-
Requires-Dist: boundedfbm>=0.
|
12
|
+
Requires-Dist: boundedfbm>=0.4.0
|
13
13
|
Requires-Dist: jsonschema>=4.23.0
|
14
14
|
Requires-Dist: numpy>=1.21.2
|
15
15
|
Requires-Dist: pydantic>=2.9.2
|
@@ -29,8 +29,24 @@ Description-Content-Type: text/markdown
|
|
29
29
|
|
30
30
|
AMS-BP is a powerful simulation tool for advanced fluorescence microscopy experiments. This guide covers both command-line usage and library integration.
|
31
31
|
|
32
|
-
|
32
|
+
## Overview of Simulation Workflow
|
33
|
+
<img align = "left" src="./docs/assets/figures/Fig1_Schema.svg" width="500"/>
|
34
|
+
|
35
|
+
*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**.*
|
36
|
+
|
37
|
+
## API Reference and Docs
|
38
|
+
Find detailed API references for the library at: [joemans3/github.io/AMS_BP](https://joemans3.github.io/AMS_BP/)
|
39
|
+
> 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.
|
33
40
|
|
41
|
+
## Examples (Click on the image buttons to be taken to the Jupyter notebooks):
|
42
|
+
|
43
|
+
> !!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.
|
44
|
+
|
45
|
+
[<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)
|
46
|
+
|
47
|
+
[<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)
|
48
|
+
|
49
|
+
[<img align="middle" src="./docs/assets/buttons/ButtonFigure_sptPALM_mmaple.svg" width="300"/>](./examples/QuantitativeExperiments/PALM/sptPALM/motionmodels_sptmmaple.ipynb)
|
34
50
|
## Table of Contents
|
35
51
|
- [Installation](#installation)
|
36
52
|
- [Command Line Interface](#command-line-interface)
|
@@ -81,13 +97,6 @@ run_AMS_BP runsim CONFIG_FILE
|
|
81
97
|
- `-o, --output_path PATH`: Specify the output directory for the configuration file
|
82
98
|
- `-r, --recursive_o`: Create output directory if it doesn't exist
|
83
99
|
|
84
|
-
## Overview of Simulation Workflow
|
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**.*
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
100
|
|
92
101
|
## Configuration File
|
93
102
|
|
@@ -155,7 +164,17 @@ laser_names_active = ["red", "blue"]
|
|
155
164
|
laser_powers_active = [0.5, 0.05]
|
156
165
|
laser_positions_active = [[5, 5, 0], [5, 5, 0]]
|
157
166
|
```
|
158
|
-
|
167
|
+
To run the default configuration:
|
168
|
+
1. Make sure you followed the uv tool installation.
|
169
|
+
2. Make a copy of the default configuration file using the command:
|
170
|
+
```bash
|
171
|
+
run_AMS_BP config
|
172
|
+
```
|
173
|
+
3. Run the sim:
|
174
|
+
```bash
|
175
|
+
run_AMS_BP runsim sim_config.toml
|
176
|
+
```
|
177
|
+
4. View the results in the newly created folder, whose name is defined in the config file.
|
159
178
|
## Advanced Usage
|
160
179
|
|
161
180
|
### Using AMS-BP as a Library
|
@@ -181,13 +200,10 @@ frames, metadata = function_exp(microscope=microscope, config=config_exp)
|
|
181
200
|
from AMS_BP.configio.saving import save_config_frames
|
182
201
|
save_config_frames(metadata, frames, setup_config["base_config"].OutputParameters)
|
183
202
|
```
|
184
|
-
|
185
|
-
## API Reference and Docs
|
186
|
-
Find detailed API references for the library at: [joemans3/github.io/AMS_BP](https://joemans3.github.io/AMS_BP/)
|
187
|
-
> 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.
|
203
|
+
> **_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.
|
188
204
|
|
189
205
|
## High Priority Features
|
190
|
-
1. Irregular cell shapes with motion models
|
206
|
+
~~1. Irregular cell shapes with motion models~~ (supported with release of v0.2.0)
|
191
207
|
2. Stimulated Emission models
|
192
208
|
3. STORM workflow examples
|
193
209
|
4. CTRW motion models
|
@@ -7,8 +7,24 @@
|
|
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.
|
11
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.
|
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)
|
@@ -59,13 +75,6 @@ run_AMS_BP runsim CONFIG_FILE
|
|
59
75
|
- `-o, --output_path PATH`: Specify the output directory for the configuration file
|
60
76
|
- `-r, --recursive_o`: Create output directory if it doesn't exist
|
61
77
|
|
62
|
-
## Overview of Simulation Workflow
|
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**.*
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
78
|
|
70
79
|
## Configuration File
|
71
80
|
|
@@ -133,7 +142,17 @@ laser_names_active = ["red", "blue"]
|
|
133
142
|
laser_powers_active = [0.5, 0.05]
|
134
143
|
laser_positions_active = [[5, 5, 0], [5, 5, 0]]
|
135
144
|
```
|
136
|
-
|
145
|
+
To run the default configuration:
|
146
|
+
1. Make sure you followed the uv tool installation.
|
147
|
+
2. Make a copy of the default configuration file using the command:
|
148
|
+
```bash
|
149
|
+
run_AMS_BP config
|
150
|
+
```
|
151
|
+
3. Run the sim:
|
152
|
+
```bash
|
153
|
+
run_AMS_BP runsim sim_config.toml
|
154
|
+
```
|
155
|
+
4. View the results in the newly created folder, whose name is defined in the config file.
|
137
156
|
## Advanced Usage
|
138
157
|
|
139
158
|
### Using AMS-BP as a Library
|
@@ -159,13 +178,10 @@ frames, metadata = function_exp(microscope=microscope, config=config_exp)
|
|
159
178
|
from AMS_BP.configio.saving import save_config_frames
|
160
179
|
save_config_frames(metadata, frames, setup_config["base_config"].OutputParameters)
|
161
180
|
```
|
162
|
-
|
163
|
-
## API Reference and Docs
|
164
|
-
Find detailed API references for the library at: [joemans3/github.io/AMS_BP](https://joemans3.github.io/AMS_BP/)
|
165
|
-
> 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.
|
181
|
+
> **_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.
|
166
182
|
|
167
183
|
## High Priority Features
|
168
|
-
1. Irregular cell shapes with motion models
|
184
|
+
~~1. Irregular cell shapes with motion models~~ (supported with release of v0.2.0)
|
169
185
|
2. Stimulated Emission models
|
170
186
|
3. STORM workflow examples
|
171
187
|
4. CTRW motion models
|
@@ -5,6 +5,7 @@ The configuration models module defines Pydantic BaseModel classes for validatin
|
|
5
5
|
|
6
6
|
## Models
|
7
7
|
|
8
|
+
|
8
9
|
### CellParameters
|
9
10
|
Defines the physical parameters of the cell being simulated.
|
10
11
|
|
@@ -203,30 +204,30 @@ All models include automatic validation and conversion:
|
|
203
204
|
```python
|
204
205
|
# Create configuration instance
|
205
206
|
config = ConfigList(
|
206
|
-
|
207
|
+
CellParameter=CellParameters(
|
207
208
|
cell_space=[[0, 10], [0, 10]],
|
208
209
|
cell_axial_radius=5.0
|
209
210
|
),
|
210
|
-
|
211
|
+
MoleculeParameter=MoleculeParameters(
|
211
212
|
num_molecules=[100],
|
212
213
|
track_type=["fbm"],
|
213
214
|
# ... other required fields ...
|
214
215
|
),
|
215
|
-
|
216
|
+
GlobalParameter=GlobalParameters(
|
216
217
|
sample_plane_dim=[20.0, 20.0],
|
217
218
|
cycle_count=100,
|
218
219
|
exposure_time=100,
|
219
220
|
interval_time=100,
|
220
221
|
oversample_motion_time=10
|
221
222
|
),
|
222
|
-
|
223
|
+
CondensateParameter=CondensateParameters(
|
223
224
|
initial_centers=[[[5.0, 5.0]]],
|
224
225
|
initial_scale=[[2.0]],
|
225
226
|
diffusion_coefficient=[[0.1]],
|
226
227
|
hurst_exponent=[[0.7]],
|
227
228
|
density_dif=[2]
|
228
229
|
),
|
229
|
-
|
230
|
+
OutputParameter=OutputParameters(
|
230
231
|
output_path="./output",
|
231
232
|
output_name="simulation",
|
232
233
|
subsegment_type="uniform",
|
@@ -71,7 +71,6 @@ params = {
|
|
71
71
|
# OvoidCell
|
72
72
|
params = {
|
73
73
|
"center": [0, 0, 0], # 3D center coordinates
|
74
|
-
"direction": [0, 0, 1], # Direction vector (will be normalized)
|
75
74
|
"xradius": 10.0, # Radius in x-direction
|
76
75
|
"yradius": 15.0, # Radius in y-direction
|
77
76
|
"zradius": 20.0 # Radius in z-direction
|