AMS-BP 0.0.2__py3-none-any.whl → 0.0.11__py3-none-any.whl
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/__init__.py +1 -1
- AMS_BP/configio/configmodels.py +11 -14
- AMS_BP/configio/convertconfig.py +22 -30
- AMS_BP/sim_config.toml +11 -40
- {ams_bp-0.0.2.dist-info → ams_bp-0.0.11.dist-info}/METADATA +42 -18
- {ams_bp-0.0.2.dist-info → ams_bp-0.0.11.dist-info}/RECORD +9 -9
- {ams_bp-0.0.2.dist-info → ams_bp-0.0.11.dist-info}/WHEEL +0 -0
- {ams_bp-0.0.2.dist-info → ams_bp-0.0.11.dist-info}/entry_points.txt +0 -0
- {ams_bp-0.0.2.dist-info → ams_bp-0.0.11.dist-info}/licenses/LICENSE +0 -0
AMS_BP/__init__.py
CHANGED
AMS_BP/configio/configmodels.py
CHANGED
@@ -60,22 +60,19 @@ class GlobalParameters(BaseModel):
|
|
60
60
|
|
61
61
|
|
62
62
|
class CondensateParameters(BaseModel):
|
63
|
-
initial_centers: List[List[
|
64
|
-
|
65
|
-
|
66
|
-
initial_scale: List[List[float]] = Field(description="Initial scale in um")
|
67
|
-
diffusion_coefficient: List[List[float]] = Field(
|
63
|
+
initial_centers: List[List[float]] = Field(description="Initial centers in um")
|
64
|
+
initial_scale: List[float] = Field(description="Initial scale in um")
|
65
|
+
diffusion_coefficient: List[float] = Field(
|
68
66
|
description="Diffusion coefficients in um^2/s"
|
69
67
|
)
|
70
|
-
hurst_exponent: List[
|
71
|
-
density_dif:
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
#
|
68
|
+
hurst_exponent: List[float]
|
69
|
+
density_dif: int
|
70
|
+
|
71
|
+
@field_validator(
|
72
|
+
"initial_centers", "initial_scale", "diffusion_coefficient", "hurst_exponent"
|
73
|
+
)
|
74
|
+
def convert_to_array(cls, v):
|
75
|
+
return np.array(v)
|
79
76
|
|
80
77
|
|
81
78
|
class OutputParameters(BaseModel):
|
AMS_BP/configio/convertconfig.py
CHANGED
@@ -680,7 +680,7 @@ class ConfigLoader:
|
|
680
680
|
)
|
681
681
|
|
682
682
|
# make sampling function
|
683
|
-
|
683
|
+
sampling_function = make_samplingfunction(
|
684
684
|
condensate_params=base_config.CondensateParameters, cell=cell
|
685
685
|
)
|
686
686
|
|
@@ -689,7 +689,7 @@ class ConfigLoader:
|
|
689
689
|
molecule_params=base_config.MoleculeParameters,
|
690
690
|
cell=cell,
|
691
691
|
condensate_params=base_config.CondensateParameters,
|
692
|
-
|
692
|
+
sampling_function=sampling_function,
|
693
693
|
)
|
694
694
|
|
695
695
|
# create the track generator
|
@@ -776,42 +776,34 @@ def make_sample(global_params, cell_params) -> SamplePlane:
|
|
776
776
|
return sample_plane
|
777
777
|
|
778
778
|
|
779
|
-
def make_condensatedict(condensate_params, cell) ->
|
780
|
-
condensates_dict =
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
hurst_exponent=condensate_params.hurst_exponent[i],
|
788
|
-
cell=cell,
|
789
|
-
)
|
790
|
-
)
|
779
|
+
def make_condensatedict(condensate_params, cell) -> dict:
|
780
|
+
condensates_dict = create_condensate_dict(
|
781
|
+
initial_centers=condensate_params.initial_centers,
|
782
|
+
initial_scale=condensate_params.initial_scale,
|
783
|
+
diffusion_coefficient=condensate_params.diffusion_coefficient,
|
784
|
+
hurst_exponent=condensate_params.hurst_exponent,
|
785
|
+
cell=cell,
|
786
|
+
)
|
791
787
|
return condensates_dict
|
792
788
|
|
793
789
|
|
794
|
-
def make_samplingfunction(condensate_params, cell) ->
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
cell=cell,
|
804
|
-
)
|
805
|
-
)
|
806
|
-
return sampling_functions
|
790
|
+
def make_samplingfunction(condensate_params, cell) -> Callable:
|
791
|
+
sampling_function = tp(
|
792
|
+
num_subspace=len(condensate_params.initial_centers),
|
793
|
+
subspace_centers=condensate_params.initial_centers,
|
794
|
+
subspace_radius=condensate_params.initial_scale,
|
795
|
+
density_dif=condensate_params.density_dif,
|
796
|
+
cell=cell,
|
797
|
+
)
|
798
|
+
return sampling_function
|
807
799
|
|
808
800
|
|
809
|
-
def gen_initial_positions(molecule_params, cell, condensate_params,
|
801
|
+
def gen_initial_positions(molecule_params, cell, condensate_params, sampling_function):
|
810
802
|
initials = []
|
811
803
|
for i in range(len(molecule_params.num_molecules)):
|
812
804
|
num_molecules = molecule_params.num_molecules[i]
|
813
805
|
initial_positions = gen_points(
|
814
|
-
pdf=
|
806
|
+
pdf=sampling_function,
|
815
807
|
total_points=num_molecules,
|
816
808
|
min_x=cell.origin[0],
|
817
809
|
max_x=cell.origin[0] + cell.dimensions[0],
|
@@ -819,7 +811,7 @@ def gen_initial_positions(molecule_params, cell, condensate_params, sampling_fun
|
|
819
811
|
max_y=cell.origin[1] + cell.dimensions[1],
|
820
812
|
min_z=-cell.dimensions[2] / 2,
|
821
813
|
max_z=cell.dimensions[2] / 2,
|
822
|
-
density_dif=condensate_params.density_dif
|
814
|
+
density_dif=condensate_params.density_dif,
|
823
815
|
)
|
824
816
|
initials.append(initial_positions)
|
825
817
|
return initials
|
AMS_BP/sim_config.toml
CHANGED
@@ -77,49 +77,20 @@ oversample_motion_time = 20 # ms
|
|
77
77
|
[Condensate_Parameters]
|
78
78
|
initial_centers = [
|
79
79
|
[
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
0.05,
|
84
|
-
],
|
85
|
-
[
|
86
|
-
5,
|
87
|
-
5,
|
88
|
-
-0.15,
|
89
|
-
],
|
90
|
-
[
|
91
|
-
5,
|
92
|
-
6,
|
93
|
-
-0.15,
|
94
|
-
],
|
95
|
-
[
|
96
|
-
5,
|
97
|
-
5.5,
|
98
|
-
-0.15,
|
99
|
-
],
|
100
|
-
[
|
101
|
-
6,
|
102
|
-
5.5,
|
103
|
-
-0.15,
|
104
|
-
],
|
80
|
+
5.5,
|
81
|
+
5,
|
82
|
+
0.05,
|
105
83
|
],
|
106
84
|
[
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
0.05,
|
111
|
-
],
|
112
|
-
[
|
113
|
-
5,
|
114
|
-
7,
|
115
|
-
-0.15,
|
116
|
-
],
|
85
|
+
5,
|
86
|
+
7,
|
87
|
+
-0.15,
|
117
88
|
],
|
118
|
-
] # um
|
119
|
-
initial_scale = [
|
120
|
-
diffusion_coefficient = [
|
121
|
-
hurst_exponent = [
|
122
|
-
density_dif =
|
89
|
+
] # um, first dimension is the # of condentates. center = [x,y,z]
|
90
|
+
initial_scale = [0.26, 0.26] # um
|
91
|
+
diffusion_coefficient = [0, 0] # um^2/s
|
92
|
+
hurst_exponent = [0.2, 0.2]
|
93
|
+
density_dif = 10 # density of the condensate vs the background.
|
123
94
|
|
124
95
|
[Output_Parameters]
|
125
96
|
output_path = "<YOUR-PATH-HERE-CAN-BE-ABSOLUTE-OR-RELATIVE>"
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: AMS_BP
|
3
|
-
Version: 0.0.
|
4
|
-
Summary: Advanced Microscopy Simulations developed for the Weber Lab by Baljyot Singh Parmar
|
3
|
+
Version: 0.0.11
|
4
|
+
Summary: Advanced Molecule Simulations and 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
|
7
7
|
Author-email: Baljyot Singh Parmar <baljyotparmar@hotmail.com>
|
@@ -19,16 +19,11 @@ Requires-Dist: tomli>=2.0.2
|
|
19
19
|
Requires-Dist: typer>=0.12.5
|
20
20
|
Description-Content-Type: text/markdown
|
21
21
|
|
22
|
-
# AMS-BP
|
23
|
-
|
24
|
-
<img src="./docs/assets/icons/drawing.svg" alt="AMS-BP Logo" width="500" height="200">
|
25
|
-
</p>
|
26
|
-
## Advanced Fluorescence Microscopy Simulation Tool
|
22
|
+
# AMS-BP User Guide
|
23
|
+
## Advanced Molecule Simulation Tool
|
27
24
|
|
28
25
|
AMS-BP is a powerful simulation tool for advanced fluorescence microscopy experiments. This guide covers both command-line usage and library integration.
|
29
26
|
|
30
|
-
> **_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.
|
31
|
-
|
32
27
|
## Table of Contents
|
33
28
|
- [Installation](#installation)
|
34
29
|
- [Command Line Interface](#command-line-interface)
|
@@ -54,14 +49,6 @@ uv tool install AMS_BP
|
|
54
49
|
- `run_AMS_BP config` : This is a helper tool to generate a template config file for the simulation. (see `run_AMS_BP config --help` for more details)
|
55
50
|
- Note: using `run_AMS_BP --help` will show you all the available commands.
|
56
51
|
4. You can now use these tools (they are isolated in their own env created by uv, which is cool).
|
57
|
-
|
58
|
-
### ***PyPi***
|
59
|
-
|
60
|
-
1. Run:
|
61
|
-
```bash
|
62
|
-
pip install AMS_BP
|
63
|
-
```
|
64
|
-
|
65
52
|
## Command Line Interface
|
66
53
|
|
67
54
|
AMS-BP provides a command-line interface with two main commands:
|
@@ -83,7 +70,7 @@ run_AMS_BP runsim CONFIG_FILE
|
|
83
70
|
|
84
71
|
The configuration file (sim_config.toml) is divided into several key sections:
|
85
72
|
|
86
|
-
#### For a detailed description of the configuration file, refer to the [Configuration File Reference](
|
73
|
+
#### For a detailed description of the configuration file, refer to the [Configuration File Reference](./API_Documentation/sim_config.md).
|
87
74
|
### Basic Units
|
88
75
|
```toml
|
89
76
|
version = "0.1"
|
@@ -171,3 +158,40 @@ frames, metadata = function_exp(microscope=microscope, config=config_exp)
|
|
171
158
|
from AMS_BP.configio.saving import save_config_frames
|
172
159
|
save_config_frames(metadata, frames, setup_config["base_config"].OutputParameters)
|
173
160
|
```
|
161
|
+
|
162
|
+
### Key Components When Using as Library
|
163
|
+
|
164
|
+
1. **ConfigLoader**: Handles configuration file parsing and validation
|
165
|
+
2. **Microscope**: Represents the virtual microscope setup
|
166
|
+
3. **Experiment Functions**: Control experiment execution
|
167
|
+
4. **Save Functions**: Handle data output
|
168
|
+
|
169
|
+
### Custom Experiment Types
|
170
|
+
|
171
|
+
When using AMS-BP as a library, you can create custom experiment types by:
|
172
|
+
|
173
|
+
1. Extending the base experiment class
|
174
|
+
2. Implementing custom scanning patterns
|
175
|
+
3. Defining new molecule behaviors
|
176
|
+
4. Creating specialized analysis routines
|
177
|
+
|
178
|
+
## Tips and Best Practices
|
179
|
+
|
180
|
+
1. **Configuration Management**
|
181
|
+
- Keep separate config files for different experiment types
|
182
|
+
- Version control your configurations
|
183
|
+
- Document any custom modifications
|
184
|
+
|
185
|
+
2. **Resource Usage**
|
186
|
+
- Monitor memory usage for large simulations
|
187
|
+
- Use appropriate sampling rates
|
188
|
+
|
189
|
+
3. **Data Output**
|
190
|
+
- Set appropriate output paths
|
191
|
+
- Use meaningful naming conventions
|
192
|
+
- Consider data format requirements for analysis
|
193
|
+
|
194
|
+
## Troubleshooting
|
195
|
+
|
196
|
+
Common issues and their solutions:
|
197
|
+
TODO
|
@@ -1,6 +1,6 @@
|
|
1
|
-
AMS_BP/__init__.py,sha256=
|
1
|
+
AMS_BP/__init__.py,sha256=RIbrP3fesid1_nRkAUmjla1c4p2K5T-2exkbTTssitg,327
|
2
2
|
AMS_BP/run_cell_simulation.py,sha256=fPU1Tuu7hBupGtMk07j2t8QYo_TjFLMJRU9fwmAgU9c,7502
|
3
|
-
AMS_BP/sim_config.toml,sha256=
|
3
|
+
AMS_BP/sim_config.toml,sha256=raxr-VSoVdTbaQX09rkLEiMWY2UfPShpv9v5MSVB4_g,11383
|
4
4
|
AMS_BP/sim_microscopy.py,sha256=7JQ6NQlgNZCvFE-FC1f9Ehh6DoJgn7bLzeqS_Mamq9Y,18619
|
5
5
|
AMS_BP/cells/__init__.py,sha256=yWFScBC1uOGDkeC8i1m1ZBtIREcyt4JHxYa72LxbBZU,177
|
6
6
|
AMS_BP/cells/base_cell.py,sha256=FIPB9J8F40tb53vv7C6qG-SaAFLOI8-MGIk1mmZ-gnI,1503
|
@@ -8,8 +8,8 @@ AMS_BP/cells/rectangular_cell.py,sha256=5yGxvTXYvgldLXyWXpE_SD9Zx2NLerC-I2j02reH
|
|
8
8
|
AMS_BP/cells/rod_cell.py,sha256=jQ1kLEk74Pv2rcXPRJ6-QJJhux-mYiDSytzqlxCNWfA,3181
|
9
9
|
AMS_BP/cells/spherical_cell.py,sha256=n3ou3tW0nCxXIwv6uLkVKHkYCfgoNn8VI6CVTLBIll0,2140
|
10
10
|
AMS_BP/configio/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
11
|
-
AMS_BP/configio/configmodels.py,sha256=
|
12
|
-
AMS_BP/configio/convertconfig.py,sha256=
|
11
|
+
AMS_BP/configio/configmodels.py,sha256=KK5A9aFzRuXBWlwEGr84_x3LY60p7cddRgBsSkx5iS8,2986
|
12
|
+
AMS_BP/configio/convertconfig.py,sha256=OHm9GnKXXObGWIEpeFfHOYJTHNWhjZKhoopLG85zWgY,34271
|
13
13
|
AMS_BP/configio/experiments.py,sha256=HdfaSi0gPPJ_wLF87XcW5ICja19Uezx7-ygFEwNzi30,3995
|
14
14
|
AMS_BP/configio/saving.py,sha256=596QgAadV32rzsN4B2FngGFcBWCzCDnLFN-qtQsv3bM,857
|
15
15
|
AMS_BP/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -48,8 +48,8 @@ AMS_BP/utils/decorators.py,sha256=4qFdvzPJne0dhkhD1znPxRln1Rfr5NX8rdcCDcbATRU,62
|
|
48
48
|
AMS_BP/utils/errors.py,sha256=7BOd-L4_YeKmWn3Q4EOdTnNF3Bj_exDa3eg5X0yCZrc,759
|
49
49
|
AMS_BP/utils/maskMaker.py,sha256=2ca3n2nc8rFtUh1LurKXOJJsUmhrOpWbRnVX7fjRVvs,335
|
50
50
|
AMS_BP/utils/util_functions.py,sha256=jI6WBh09_khdABnEoVK7SK1WRvCLHuw40f5ALyflzlc,9478
|
51
|
-
ams_bp-0.0.
|
52
|
-
ams_bp-0.0.
|
53
|
-
ams_bp-0.0.
|
54
|
-
ams_bp-0.0.
|
55
|
-
ams_bp-0.0.
|
51
|
+
ams_bp-0.0.11.dist-info/METADATA,sha256=unqrYIrskb0xGCrHhqiJtQ8VNxvSRvAzjizx4WUSWxg,5918
|
52
|
+
ams_bp-0.0.11.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
53
|
+
ams_bp-0.0.11.dist-info/entry_points.txt,sha256=MFUK9bZWW61djfsavqopMqiVPVn4lJtt6v8qzyEFyNM,76
|
54
|
+
ams_bp-0.0.11.dist-info/licenses/LICENSE,sha256=k_-JV1DQKvO0FR8WjvOisqdTl0kp6VJ7RFM3YZhao0c,1071
|
55
|
+
ams_bp-0.0.11.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|