AMS-BP 0.0.21__tar.gz → 0.0.24__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 (99) hide show
  1. {ams_bp-0.0.21 → ams_bp-0.0.24}/.github/workflows/lint.yml +0 -1
  2. {ams_bp-0.0.21 → ams_bp-0.0.24}/PKG-INFO +3 -2
  3. {ams_bp-0.0.21 → ams_bp-0.0.24}/README.md +2 -0
  4. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/API_Documentation/configio/configmodels.md +0 -8
  5. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/API_Documentation/optics/psf/psf_engine.md +42 -3
  6. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/API_Documentation/sim_config.md +1 -0
  7. ams_bp-0.0.24/examples/VisualizingIndividualModules/laser_modulation.ipynb +1094 -0
  8. ams_bp-0.0.24/examples/VisualizingIndividualModules/modules_explained.ipynb +1466 -0
  9. {ams_bp-0.0.21 → ams_bp-0.0.24}/pyproject.toml +2 -1
  10. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/__init__.py +1 -1
  11. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/configio/configmodels.py +0 -4
  12. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/configio/convertconfig.py +2 -1
  13. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/metadata/metadata.py +2 -2
  14. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/motion/condensate_movement.py +0 -45
  15. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/optics/camera/detectors.py +1 -1
  16. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/optics/lasers/laser_profiles.py +4 -1
  17. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/optics/psf/psf_engine.py +86 -35
  18. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/photophysics/state_kinetics.py +4 -1
  19. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/run_cell_simulation.py +3 -3
  20. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/sim_config.toml +2 -17
  21. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/sim_microscopy.py +1 -1
  22. {ams_bp-0.0.21 → ams_bp-0.0.24}/uv.lock +1143 -77
  23. {ams_bp-0.0.21 → ams_bp-0.0.24}/.github/workflows/pages.yml +0 -0
  24. {ams_bp-0.0.21 → ams_bp-0.0.24}/.github/workflows/publish_pypi.yml +0 -0
  25. {ams_bp-0.0.21 → ams_bp-0.0.24}/.gitignore +0 -0
  26. {ams_bp-0.0.21 → ams_bp-0.0.24}/LICENSE +0 -0
  27. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/API_Documentation/cells/base_cell.md +0 -0
  28. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/API_Documentation/cells/rectangular_cell.md +0 -0
  29. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/API_Documentation/cells/rod_cell.md +0 -0
  30. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/API_Documentation/cells/spherical_cell.md +0 -0
  31. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/API_Documentation/configio/convertconfig.md +0 -0
  32. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/API_Documentation/configio/experiments.md +0 -0
  33. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/API_Documentation/configio/saving.md +0 -0
  34. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/API_Documentation/metadata/metadata.md +0 -0
  35. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/API_Documentation/motion/condensate_movement.md +0 -0
  36. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/API_Documentation/motion/movement/boundary_conditions.md +0 -0
  37. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/API_Documentation/motion/movement/fbm_BP.md +0 -0
  38. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/API_Documentation/motion/track_gen.md +0 -0
  39. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/API_Documentation/optics/camera/detectors.md +0 -0
  40. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/API_Documentation/optics/camera/quantum_eff.md +0 -0
  41. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/API_Documentation/optics/filters/channels/channelschema.md +0 -0
  42. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/API_Documentation/optics/filters/filters.md +0 -0
  43. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/API_Documentation/optics/lasers/laser_profiles.md +0 -0
  44. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/API_Documentation/photophysics/photon_physics.md +0 -0
  45. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/API_Documentation/photophysics/state_kinetics.md +0 -0
  46. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/API_Documentation/probabilityfuncs/markov_chain.md +0 -0
  47. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/API_Documentation/probabilityfuncs/probability_functions.md +0 -0
  48. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/API_Documentation/run_cell_simulation.md +0 -0
  49. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/API_Documentation/sample/flurophore/flurophore_schema.md +0 -0
  50. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/API_Documentation/sample/sim_sampleplane.md +0 -0
  51. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/API_Documentation/sim_microscopy.md +0 -0
  52. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/API_Documentation/utils/constants.md +0 -0
  53. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/API_Documentation/utils/errors.md +0 -0
  54. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/API_Documentation/utils/util_functions.md +0 -0
  55. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/assets/icons/Cells-actin-like-a-tree-Jamie-Whitelaw-1.png +0 -0
  56. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/assets/icons/drawing.pdf +0 -0
  57. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/assets/icons/drawing.png +0 -0
  58. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/assets/icons/drawing.svg +0 -0
  59. {ams_bp-0.0.21 → ams_bp-0.0.24}/docs/index.md +0 -0
  60. {ams_bp-0.0.21 → ams_bp-0.0.24}/mkdocs.yml +0 -0
  61. {ams_bp-0.0.21 → ams_bp-0.0.24}/pytest.ini +0 -0
  62. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/cells/__init__.py +0 -0
  63. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/cells/base_cell.py +0 -0
  64. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/cells/rectangular_cell.py +0 -0
  65. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/cells/rod_cell.py +0 -0
  66. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/cells/spherical_cell.py +0 -0
  67. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/configio/__init__.py +0 -0
  68. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/configio/experiments.py +0 -0
  69. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/configio/saving.py +0 -0
  70. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/metadata/__init__.py +0 -0
  71. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/motion/__init__.py +0 -0
  72. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/motion/movement/__init__.py +0 -0
  73. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/motion/movement/boundary_conditions.py +0 -0
  74. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/motion/movement/fbm_BP.py +0 -0
  75. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/motion/track_gen.py +0 -0
  76. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/optics/__init__.py +0 -0
  77. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/optics/camera/__init__.py +0 -0
  78. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/optics/camera/quantum_eff.py +0 -0
  79. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/optics/filters/__init__.py +0 -0
  80. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/optics/filters/channels/__init__.py +0 -0
  81. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/optics/filters/channels/channelschema.py +0 -0
  82. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/optics/filters/filters.py +0 -0
  83. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/optics/lasers/__init__.py +0 -0
  84. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/optics/psf/__init__.py +0 -0
  85. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/photophysics/__init__.py +0 -0
  86. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/photophysics/photon_physics.py +0 -0
  87. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/probabilityfuncs/__init__.py +0 -0
  88. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/probabilityfuncs/markov_chain.py +0 -0
  89. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/probabilityfuncs/probability_functions.py +0 -0
  90. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/sample/__init__.py +0 -0
  91. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/sample/flurophores/__init__.py +0 -0
  92. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/sample/flurophores/flurophore_schema.py +0 -0
  93. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/sample/sim_sampleplane.py +0 -0
  94. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/utils/__init__.py +0 -0
  95. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/utils/constants.py +0 -0
  96. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/utils/decorators.py +0 -0
  97. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/utils/errors.py +0 -0
  98. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/utils/maskMaker.py +0 -0
  99. {ams_bp-0.0.21 → ams_bp-0.0.24}/src/AMS_BP/utils/util_functions.py +0 -0
@@ -21,6 +21,5 @@ jobs:
21
21
  # Update output format to enable automatic inline annotations.
22
22
  - name: Run Ruff
23
23
  run: |
24
- ruff check --fix
25
24
  ruff format
26
25
  ruff format --check --diff
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: AMS_BP
3
- Version: 0.0.21
3
+ Version: 0.0.24
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
@@ -10,7 +10,6 @@ License-File: LICENSE
10
10
  Keywords: SMS
11
11
  Requires-Python: >=3.10
12
12
  Requires-Dist: jsonschema>=4.23.0
13
- Requires-Dist: matplotlib>=3.6.0
14
13
  Requires-Dist: numpy>=1.21.2
15
14
  Requires-Dist: pydantic>=2.9.2
16
15
  Requires-Dist: scikit-image>=0.18.3
@@ -172,3 +171,5 @@ frames, metadata = function_exp(microscope=microscope, config=config_exp)
172
171
  from AMS_BP.configio.saving import save_config_frames
173
172
  save_config_frames(metadata, frames, setup_config["base_config"].OutputParameters)
174
173
  ```
174
+
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)
@@ -151,3 +151,5 @@ frames, metadata = function_exp(microscope=microscope, config=config_exp)
151
151
  from AMS_BP.configio.saving import save_config_frames
152
152
  save_config_frames(metadata, frames, setup_config["base_config"].OutputParameters)
153
153
  ```
154
+
155
+ > A more detailed example is provided in the jupyter notebook in the examples. For starters refer to the [VisualizingIndividualModules](examples/VisualizingIndividualModules/modules_explained.ipynb)
@@ -41,18 +41,10 @@ class MoleculeParameters(BaseModel)
41
41
  - Description: Diffusion coefficients in μm²/s
42
42
  - 2D array automatically converted to numpy array
43
43
 
44
- - `diffusion_track_amount: List[List[float]]`
45
- - Description: Amount of diffusive tracking for each state
46
- - 2D array automatically converted to numpy array
47
-
48
44
  - `hurst_exponent: List[List[float]]`
49
45
  - Description: Hurst exponents for fractional Brownian motion
50
46
  - 2D array automatically converted to numpy array
51
47
 
52
- - `hurst_track_amount: List[List[float]]`
53
- - Description: Amount of Hurst tracking for each state
54
- - 2D array automatically converted to numpy array
55
-
56
48
  - `allow_transition_probability: List[bool]`
57
49
  - Description: Whether to allow state transitions
58
50
 
@@ -12,14 +12,35 @@ This module provides functionality for generating Point Spread Functions (PSFs)
12
12
  - [_calculate_sigma_z](#_calculate_sigma_z)
13
13
  - [_generate_grid](#_generate_grid)
14
14
  - [calculate_psf_size](#calculate_psf_size)
15
+ - [_generate_pinhole_mask](#_generate_pinhole_mask)
15
16
 
16
17
  ---
17
18
 
18
19
  ## Classes
19
20
 
20
21
  ### `PSFParameters`
21
-
22
-
22
+ #### Description
23
+ This is a frozen dataclass (enum-ish?) with the following parameters / cached properties
24
+ ```python
25
+ emission_wavelength: float
26
+ numerical_aperture: float
27
+ pixel_size: float
28
+ z_step: float
29
+ refractive_index: float = 1.0
30
+ pinhole_diameter: Optional[float] = None # um
31
+
32
+ @cached_property
33
+ def wavelength_um(self) -> float:
34
+ """Emission wavelength in micrometers."""
35
+ return self.emission_wavelength / 1000.0
36
+ @cached_property
37
+ def pinhole_radius(self) -> Optional[float]:
38
+ """Pinhole radius in micrometers."""
39
+ return (
40
+ self.pinhole_diameter / 2.0 if self.pinhole_diameter is not None else None
41
+ )
42
+ ```
43
+ ### `PSFEngine`
23
44
  #### Methods
24
45
 
25
46
  - **`__init__`**: Initializes the PSF engine with the given parameters.
@@ -29,6 +50,7 @@ This module provides functionality for generating Point Spread Functions (PSFs)
29
50
  - **`_3d_normalization_A`**: Computes the normalization factor for a 3D Gaussian PSF.
30
51
  - **`_2d_normalization_A`**: Computes the normalization factor for a 2D Gaussian PSF.
31
52
  - **`normalize_psf`**: Normalizes the PSF using different schemes.
53
+ - **`_generate_pinhole_mask`**: Generate a binary mask representing the pinhole's spatial filtering.
32
54
 
33
55
  ---
34
56
 
@@ -105,4 +127,21 @@ Calculates the appropriate PSF size based on physical parameters.
105
127
 
106
128
  #### Returns
107
129
 
108
- - **`Tuple[int, ...]`**: Tuple of dimensions (z, y, x) or (y, x) for the PSF calculation.
130
+ - **`Tuple[int, ...]`**: Tuple of dimensions (z, y, x) or (y, x) for the PSF calculation.
131
+
132
+ ---
133
+
134
+ ### `_generate_pinhole_mask`
135
+
136
+
137
+ #### Description
138
+
139
+ Generate a binary mask representing the pinhole's spatial filtering.
140
+
141
+ The pinhole blocks emission light based on position in the image plane,
142
+ affecting what portion of the diffracted light reaches the detector.
143
+
144
+ #### Parameters
145
+ #### Returns
146
+
147
+ - **`NDArray[np.float64]`**: Same dimensions as the psf generated but with binary values (0,1) indicating the transmittance of the psf due to the pinhole. Note, if the pinhole size is smaller than 1*airy disk diameter, then diffraction due to the pinhole is NOT non negligiable and diffraction effects will be introduced. A ValueError is thrown if this is the case.
@@ -224,6 +224,7 @@ Each fluorophore has transitions defined with the following parameters:
224
224
  - **Properties**:
225
225
  - **`numerical_aperture`**: The numerical aperture (typical range: 0.1 - 1.5).
226
226
  - **`refractive_index`**: The refractive index (default is air: 1.0).
227
+ - **`pinhole_diameter`**: None or float. In units of um. None = no pinhole before the detector.
227
228
 
228
229
  ---
229
230