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.
Files changed (118) hide show
  1. {ams_bp-0.2.0 → ams_bp-0.3.1}/.github/workflows/pages.yml +1 -1
  2. {ams_bp-0.2.0 → ams_bp-0.3.1}/PKG-INFO +32 -16
  3. {ams_bp-0.2.0 → ams_bp-0.3.1}/README.md +30 -14
  4. {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/configio/configmodels.md +6 -5
  5. {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/sim_config.md +0 -1
  6. ams_bp-0.3.1/docs/assets/buttons/ButtonFigure_FRAP.svg +862 -0
  7. ams_bp-0.3.1/docs/assets/buttons/ButtonFigure_fPALM_NPC.svg +1140 -0
  8. ams_bp-0.3.1/docs/assets/buttons/ButtonFigure_sptPALM_mmaple.svg +3150 -0
  9. ams_bp-0.3.1/docs/assets/buttons/ButtonFigure_zstack_twocolor_confocal.svg +1042 -0
  10. ams_bp-0.3.1/docs/assets/buttons/ButtonFigure_zstack_twocolor_widefield.svg +1022 -0
  11. ams_bp-0.3.1/examples/QuantitativeExperiments/FRAP/FRAP_methods.ipynb +1028 -0
  12. ams_bp-0.3.1/examples/QuantitativeExperiments/MotionModels/groundtruth_boundedfbm.ipynb +257 -0
  13. ams_bp-0.3.1/examples/QuantitativeExperiments/PALM/fPALM/export_full2_0039_039.csv +1229 -0
  14. ams_bp-0.3.1/examples/QuantitativeExperiments/PALM/fPALM/npc_palm.ipynb +1084 -0
  15. ams_bp-0.3.1/examples/QuantitativeExperiments/PALM/sptPALM/motionmodels_sptmmaple.ipynb +1152 -0
  16. ams_bp-0.3.1/examples/QuantitativeExperiments/TwoColor/Confocal/confocal_twocolor.ipynb +1407 -0
  17. ams_bp-0.3.1/examples/QuantitativeExperiments/TwoColor/Widefield/widefield_twocolor.ipynb +1436 -0
  18. {ams_bp-0.2.0 → ams_bp-0.3.1}/pyproject.toml +7 -1
  19. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/__init__.py +1 -1
  20. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/cells/budding_yeast_cell.py +1 -1
  21. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/cells/cell_factory.py +1 -1
  22. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/configio/configmodels.py +6 -6
  23. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/configio/convertconfig.py +14 -14
  24. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/run_cell_simulation.py +1 -1
  25. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/sim_microscopy.py +2 -2
  26. {ams_bp-0.2.0 → ams_bp-0.3.1}/uv.lock +323 -20
  27. ams_bp-0.2.0/examples/QuantitativeExperiments/FRAP_methods.ipynb +0 -1030
  28. {ams_bp-0.2.0 → ams_bp-0.3.1}/.github/workflows/lint.yml +0 -0
  29. {ams_bp-0.2.0 → ams_bp-0.3.1}/.github/workflows/publish_pypi.yml +0 -0
  30. {ams_bp-0.2.0 → ams_bp-0.3.1}/.gitignore +0 -0
  31. {ams_bp-0.2.0 → ams_bp-0.3.1}/LICENSE +0 -0
  32. {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/configio/convertconfig.md +0 -0
  33. {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/configio/experiments.md +0 -0
  34. {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/configio/saving.md +0 -0
  35. {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/groundtruth_generators/nuclearporecomplexes.md +0 -0
  36. {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/metadata/metadata.md +0 -0
  37. {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/motion/condensate_movement.md +0 -0
  38. {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/motion/movement/boundary_conditions.md +0 -0
  39. {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/motion/movement/fbm_BP.md +0 -0
  40. {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/motion/track_gen.md +0 -0
  41. {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/optics/camera/detectors.md +0 -0
  42. {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/optics/camera/quantum_eff.md +0 -0
  43. {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/optics/filters/channels/channelschema.md +0 -0
  44. {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/optics/filters/filters.md +0 -0
  45. {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/optics/lasers/laser_profiles.md +0 -0
  46. {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/optics/psf/psf_engine.md +0 -0
  47. {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/photophysics/photon_physics.md +0 -0
  48. {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/photophysics/state_kinetics.md +0 -0
  49. {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/probabilityfuncs/markov_chain.md +0 -0
  50. {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/probabilityfuncs/probability_functions.md +0 -0
  51. {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/run_cell_simulation.md +0 -0
  52. {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/sample/flurophore/flurophore_schema.md +0 -0
  53. {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/sample/sim_sampleplane.md +0 -0
  54. {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/sim_microscopy.md +0 -0
  55. {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/utils/constants.md +0 -0
  56. {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/utils/errors.md +0 -0
  57. {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/API_Documentation/utils/util_functions.md +0 -0
  58. {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/assets/figures/Fig1_Schema.svg +0 -0
  59. {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/assets/icons/Cells-actin-like-a-tree-Jamie-Whitelaw-1.png +0 -0
  60. {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/assets/icons/drawing.pdf +0 -0
  61. {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/assets/icons/drawing.png +0 -0
  62. {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/assets/icons/drawing.svg +0 -0
  63. {ams_bp-0.2.0 → ams_bp-0.3.1}/docs/index.md +0 -0
  64. {ams_bp-0.2.0/examples/QuantitativeExperiments → ams_bp-0.3.1/examples/QuantitativeExperiments/FRAP}/FRAP_base_[[0. 0.]].txt +0 -0
  65. {ams_bp-0.2.0/examples/QuantitativeExperiments → ams_bp-0.3.1/examples/QuantitativeExperiments/FRAP}/FRAP_base_[[0.04 0.04]].txt +0 -0
  66. {ams_bp-0.2.0/examples/QuantitativeExperiments → ams_bp-0.3.1/examples/QuantitativeExperiments/FRAP}/FRAP_base_[[0.1 0.1]].txt +0 -0
  67. {ams_bp-0.2.0/examples/QuantitativeExperiments → ams_bp-0.3.1/examples/QuantitativeExperiments/FRAP}/FRAP_base_[[0.4 0.4]].txt +0 -0
  68. {ams_bp-0.2.0/examples/QuantitativeExperiments → ams_bp-0.3.1/examples/QuantitativeExperiments/FRAP}/FRAP_data_[[0. 0.]].txt +0 -0
  69. {ams_bp-0.2.0/examples/QuantitativeExperiments → ams_bp-0.3.1/examples/QuantitativeExperiments/FRAP}/FRAP_data_[[0.04 0.04]].txt +0 -0
  70. {ams_bp-0.2.0/examples/QuantitativeExperiments → ams_bp-0.3.1/examples/QuantitativeExperiments/FRAP}/FRAP_data_[[0.1 0.1]].txt +0 -0
  71. {ams_bp-0.2.0/examples/QuantitativeExperiments → ams_bp-0.3.1/examples/QuantitativeExperiments/FRAP}/FRAP_data_[[0.4 0.4]].txt +0 -0
  72. {ams_bp-0.2.0 → ams_bp-0.3.1}/examples/VisualizingIndividualModules/laser_modulation.ipynb +0 -0
  73. {ams_bp-0.2.0 → ams_bp-0.3.1}/examples/VisualizingIndividualModules/modules_explained.ipynb +0 -0
  74. {ams_bp-0.2.0 → ams_bp-0.3.1}/mkdocs.yml +0 -0
  75. {ams_bp-0.2.0 → ams_bp-0.3.1}/pytest.ini +0 -0
  76. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/cells/__init__.py +0 -0
  77. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/configio/__init__.py +0 -0
  78. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/configio/experiments.py +0 -0
  79. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/configio/saving.py +0 -0
  80. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/groundtruth_generators/__init__.py +0 -0
  81. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/groundtruth_generators/nuclearporecomplexes.py +0 -0
  82. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/metadata/__init__.py +0 -0
  83. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/metadata/metadata.py +0 -0
  84. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/motion/__init__.py +0 -0
  85. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/motion/condensate_movement.py +0 -0
  86. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/motion/movement/__init__.py +0 -0
  87. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/motion/movement/boundary_conditions.py +0 -0
  88. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/motion/track_gen.py +0 -0
  89. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/optics/__init__.py +0 -0
  90. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/optics/camera/__init__.py +0 -0
  91. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/optics/camera/detectors.py +0 -0
  92. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/optics/camera/quantum_eff.py +0 -0
  93. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/optics/filters/__init__.py +0 -0
  94. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/optics/filters/channels/__init__.py +0 -0
  95. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/optics/filters/channels/channelschema.py +0 -0
  96. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/optics/filters/filters.py +0 -0
  97. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/optics/lasers/__init__.py +0 -0
  98. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/optics/lasers/laser_profiles.py +0 -0
  99. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/optics/lasers/scanning_patterns.py +0 -0
  100. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/optics/psf/__init__.py +0 -0
  101. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/optics/psf/psf_engine.py +0 -0
  102. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/photophysics/__init__.py +0 -0
  103. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/photophysics/photon_physics.py +0 -0
  104. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/photophysics/state_kinetics.py +0 -0
  105. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/probabilityfuncs/__init__.py +0 -0
  106. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/probabilityfuncs/markov_chain.py +0 -0
  107. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/probabilityfuncs/probability_functions.py +0 -0
  108. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/sample/__init__.py +0 -0
  109. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/sample/flurophores/__init__.py +0 -0
  110. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/sample/flurophores/flurophore_schema.py +0 -0
  111. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/sample/sim_sampleplane.py +0 -0
  112. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/sim_config.toml +0 -0
  113. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/utils/__init__.py +0 -0
  114. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/utils/constants.py +0 -0
  115. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/utils/decorators.py +0 -0
  116. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/utils/errors.py +0 -0
  117. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/utils/maskMaker.py +0 -0
  118. {ams_bp-0.2.0 → ams_bp-0.3.1}/src/AMS_BP/utils/util_functions.py +0 -0
@@ -13,7 +13,7 @@ jobs:
13
13
  strategy:
14
14
  fail-fast: false
15
15
  matrix:
16
- python-version: ["3.10.13"]
16
+ python-version: ["3.12"]
17
17
 
18
18
  steps:
19
19
  - uses: actions/checkout@v4
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: AMS_BP
3
- Version: 0.2.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.2.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
- > **_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.
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
- ![Overview Schematic](./docs/assets/figures/Fig1_Schema.svg)
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
- > **_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.
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
- ![Overview Schematic](./docs/assets/figures/Fig1_Schema.svg)
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
- CellParameters=CellParameters(
207
+ CellParameter=CellParameters(
207
208
  cell_space=[[0, 10], [0, 10]],
208
209
  cell_axial_radius=5.0
209
210
  ),
210
- MoleculeParameters=MoleculeParameters(
211
+ MoleculeParameter=MoleculeParameters(
211
212
  num_molecules=[100],
212
213
  track_type=["fbm"],
213
214
  # ... other required fields ...
214
215
  ),
215
- GlobalParameters=GlobalParameters(
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
- CondensateParameters=CondensateParameters(
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
- OutputParameters=OutputParameters(
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