AMS-BP 0.3.1__py3-none-any.whl → 0.4.0__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 +26 -12
- AMS_BP/configio/convertconfig.py +508 -632
- AMS_BP/gui/README.md +77 -0
- AMS_BP/gui/__init__.py +0 -0
- AMS_BP/gui/assets/__init__.py +0 -0
- AMS_BP/gui/assets/drawing.svg +107 -0
- AMS_BP/gui/configuration_window.py +333 -0
- AMS_BP/gui/help_docs/__init__.py +0 -0
- AMS_BP/gui/help_docs/cell_help.md +45 -0
- AMS_BP/gui/help_docs/channels_help.md +78 -0
- AMS_BP/gui/help_docs/condensate_help.md +59 -0
- AMS_BP/gui/help_docs/detector_help.md +57 -0
- AMS_BP/gui/help_docs/experiment_help.md +92 -0
- AMS_BP/gui/help_docs/fluorophore_help.md +128 -0
- AMS_BP/gui/help_docs/general_help.md +43 -0
- AMS_BP/gui/help_docs/global_help.md +47 -0
- AMS_BP/gui/help_docs/laser_help.md +76 -0
- AMS_BP/gui/help_docs/molecule_help.md +78 -0
- AMS_BP/gui/help_docs/output_help.md +5 -0
- AMS_BP/gui/help_docs/psf_help.md +51 -0
- AMS_BP/gui/help_window.py +26 -0
- AMS_BP/gui/logging_window.py +93 -0
- AMS_BP/gui/main.py +255 -0
- AMS_BP/gui/sim_worker.py +58 -0
- AMS_BP/gui/template_window_selection.py +100 -0
- AMS_BP/gui/widgets/__init__.py +0 -0
- AMS_BP/gui/widgets/camera_config_widget.py +213 -0
- AMS_BP/gui/widgets/cell_config_widget.py +225 -0
- AMS_BP/gui/widgets/channel_config_widget.py +307 -0
- AMS_BP/gui/widgets/condensate_config_widget.py +341 -0
- AMS_BP/gui/widgets/experiment_config_widget.py +259 -0
- AMS_BP/gui/widgets/flurophore_config_widget.py +513 -0
- AMS_BP/gui/widgets/general_config_widget.py +47 -0
- AMS_BP/gui/widgets/global_config_widget.py +142 -0
- AMS_BP/gui/widgets/laser_config_widget.py +255 -0
- AMS_BP/gui/widgets/molecule_config_widget.py +714 -0
- AMS_BP/gui/widgets/output_config_widget.py +61 -0
- AMS_BP/gui/widgets/psf_config_widget.py +128 -0
- AMS_BP/gui/widgets/utility_widgets/__init__.py +0 -0
- AMS_BP/gui/widgets/utility_widgets/scinotation_widget.py +21 -0
- AMS_BP/gui/widgets/utility_widgets/spectrum_widget.py +115 -0
- AMS_BP/logging/__init__.py +0 -0
- AMS_BP/logging/logutil.py +83 -0
- AMS_BP/logging/setup_run_directory.py +35 -0
- AMS_BP/{run_cell_simulation.py → main_cli.py} +27 -72
- AMS_BP/optics/filters/filters.py +2 -0
- AMS_BP/resources/template_configs/metadata_configs.json +20 -0
- AMS_BP/resources/template_configs/sim_config.toml +408 -0
- AMS_BP/resources/template_configs/twocolor_widefield_timeseries_live.toml +399 -0
- AMS_BP/resources/template_configs/twocolor_widefield_zstack_fixed.toml +406 -0
- AMS_BP/resources/template_configs/twocolor_widefield_zstack_live.toml +408 -0
- AMS_BP/run_sim_util.py +76 -0
- {ams_bp-0.3.1.dist-info → ams_bp-0.4.0.dist-info}/METADATA +46 -27
- ams_bp-0.4.0.dist-info/RECORD +103 -0
- ams_bp-0.4.0.dist-info/entry_points.txt +2 -0
- ams_bp-0.3.1.dist-info/RECORD +0 -55
- ams_bp-0.3.1.dist-info/entry_points.txt +0 -2
- {ams_bp-0.3.1.dist-info → ams_bp-0.4.0.dist-info}/WHEEL +0 -0
- {ams_bp-0.3.1.dist-info → ams_bp-0.4.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,408 @@
|
|
1
|
+
version = "0.2"
|
2
|
+
length_unit = "um" # always um.
|
3
|
+
time_unit = "ms" # always ms
|
4
|
+
diffusion_unit = "um^2/s" # always um^2/s
|
5
|
+
|
6
|
+
[Cell_Parameters]
|
7
|
+
cell_type = "RodCell" # any of RectangularCell, SphericalCell, OvoidCell, RodCell, BuddingCell
|
8
|
+
[Cell_Parameters.params] # see docs for parameters for each cell type
|
9
|
+
center = [5, 5, 0]
|
10
|
+
direction = [1, 0, 0]
|
11
|
+
radius = 1.0
|
12
|
+
height = 4.0
|
13
|
+
# bounds = [[3, 7], [3, 9], [-1, 1]]
|
14
|
+
|
15
|
+
[Molecule_Parameters]
|
16
|
+
num_molecules = [
|
17
|
+
5000,
|
18
|
+
5000,
|
19
|
+
] # size of array tells the types of molecules (must be same as num_of_fluorophores below). All of the Molecule_Parameters are of the same first dimension as this.
|
20
|
+
track_type = ["fbm", "fbm"] # "constant", "fbm"
|
21
|
+
diffusion_coefficient = [
|
22
|
+
[
|
23
|
+
0.2,
|
24
|
+
0.4,
|
25
|
+
],
|
26
|
+
[
|
27
|
+
0.2,
|
28
|
+
0.4,
|
29
|
+
],
|
30
|
+
] # um^2/s, size of each index (eg. len(...[0]) is the # of diffusion coefficients the system can explore.
|
31
|
+
|
32
|
+
hurst_exponent = [[0.5], [0.5]]
|
33
|
+
allow_transition_probability = [true, true] # bool
|
34
|
+
transition_matrix_time_step = [
|
35
|
+
20,
|
36
|
+
20,
|
37
|
+
] # ms, the time at which the probabilities in the below are presented.
|
38
|
+
diffusion_transition_matrix = [
|
39
|
+
[
|
40
|
+
[
|
41
|
+
0.992,
|
42
|
+
0.008,
|
43
|
+
],
|
44
|
+
[
|
45
|
+
0.0273,
|
46
|
+
0.9727,
|
47
|
+
],
|
48
|
+
],
|
49
|
+
[
|
50
|
+
[
|
51
|
+
0.992,
|
52
|
+
0.008,
|
53
|
+
],
|
54
|
+
[
|
55
|
+
0.0273,
|
56
|
+
0.9727,
|
57
|
+
],
|
58
|
+
],
|
59
|
+
]
|
60
|
+
hurst_transition_matrix = [[[0.1]], [[0.1]]]
|
61
|
+
state_probability_diffusion = [[0.5, 0.5], [0.5, 0.5]]
|
62
|
+
state_probability_hurst = [[1], [1]]
|
63
|
+
|
64
|
+
|
65
|
+
[Global_Parameters]
|
66
|
+
sample_plane_dim = [10, 10] # um
|
67
|
+
cycle_count = 50 # cycles of exposure_time + interval_time
|
68
|
+
exposure_time = 20 # ms
|
69
|
+
interval_time = 0 # ms
|
70
|
+
oversample_motion_time = 20 # ms
|
71
|
+
|
72
|
+
[Condensate_Parameters]
|
73
|
+
initial_centers = [
|
74
|
+
[
|
75
|
+
[
|
76
|
+
5.5,
|
77
|
+
5,
|
78
|
+
0.05,
|
79
|
+
],
|
80
|
+
[
|
81
|
+
5,
|
82
|
+
5,
|
83
|
+
-0.15,
|
84
|
+
],
|
85
|
+
[
|
86
|
+
5,
|
87
|
+
6,
|
88
|
+
-0.15,
|
89
|
+
],
|
90
|
+
[
|
91
|
+
5,
|
92
|
+
5.5,
|
93
|
+
-0.15,
|
94
|
+
],
|
95
|
+
[
|
96
|
+
6,
|
97
|
+
5.5,
|
98
|
+
-0.15,
|
99
|
+
],
|
100
|
+
],
|
101
|
+
[
|
102
|
+
[
|
103
|
+
5.5,
|
104
|
+
5,
|
105
|
+
0.05,
|
106
|
+
],
|
107
|
+
[
|
108
|
+
5,
|
109
|
+
7,
|
110
|
+
-0.15,
|
111
|
+
],
|
112
|
+
],
|
113
|
+
] # um. First dimension is the types of molecules as in Molecule Parameters.num_molecules. second dimension is the # of condentates. center = [x,y,z]
|
114
|
+
initial_scale = [[0.26, 0.26, 0.13, 0.13, 0.26], [0.26, 0.26]] # um
|
115
|
+
diffusion_coefficient = [[0, 0, 0, 0, 0], [0, 0]] # um^2/s
|
116
|
+
hurst_exponent = [[0.2, 0.2, 0.2, 0.2, 0.2], [0.2, 0.2]]
|
117
|
+
density_dif = [10, 10] # density of the condensate vs the background.
|
118
|
+
|
119
|
+
[Output_Parameters]
|
120
|
+
output_path = "<YOUR-PATH-HERE-CAN-BE-ABSOLUTE-OR-RELATIVE>"
|
121
|
+
output_name = "Cell_Movie_Test_001"
|
122
|
+
subsegment_type = "mean" # not implemented yet, use any string
|
123
|
+
subsegment_number = 5 # not implemented yet, use any integer
|
124
|
+
|
125
|
+
|
126
|
+
[fluorophores]
|
127
|
+
num_of_fluorophores = 2
|
128
|
+
fluorophore_names = ["PAmCherry", "EGFP"]
|
129
|
+
|
130
|
+
# PAmCherry name
|
131
|
+
[fluorophores.PAmCherry]
|
132
|
+
name = "PAmCherry"
|
133
|
+
initial_state = "dark" # flurophore will start with this state in the simulation (all of them), must be valid name from ones provided below.
|
134
|
+
|
135
|
+
# States definition
|
136
|
+
[fluorophores.PAmCherry.states.bright]
|
137
|
+
name = "bright"
|
138
|
+
state_type = "fluorescent" # any of fluorescent, dark, bleached
|
139
|
+
quantum_yield = 0.46 # from 0-1
|
140
|
+
extinction_coefficient = 18000 # M^-1 cm^-1
|
141
|
+
fluorescent_lifetime = 0.000000001 # seconds
|
142
|
+
# Spectral data for bright state
|
143
|
+
[fluorophores.PAmCherry.states.bright.excitation_spectrum]
|
144
|
+
wavelengths = [310.0, 311.0, 411.0, 511.0, 611.0, 612.0]
|
145
|
+
intensities = [0.00, 0.047, 0.0043, 0.6, 0.06, 0.00]
|
146
|
+
[fluorophores.PAmCherry.states.bright.emission_spectrum]
|
147
|
+
wavelengths = [530.0, 529.0, 600.0, 650.0, 700.0, 797.0, 799.0]
|
148
|
+
intensities = [0.00, 0.02, 0.98, 0.28, 0.05, 0.003, 0.00]
|
149
|
+
|
150
|
+
[fluorophores.PAmCherry.states.dark]
|
151
|
+
name = "dark"
|
152
|
+
state_type = "dark"
|
153
|
+
|
154
|
+
[fluorophores.PAmCherry.states.triplet]
|
155
|
+
name = "triplet"
|
156
|
+
state_type = "dark"
|
157
|
+
|
158
|
+
[fluorophores.PAmCherry.states.bleached]
|
159
|
+
name = "bleached"
|
160
|
+
state_type = "bleached"
|
161
|
+
|
162
|
+
# State transitions
|
163
|
+
|
164
|
+
[fluorophores.PAmCherry.transitions.dark_to_bright]
|
165
|
+
from_state = "dark"
|
166
|
+
to_state = "bright"
|
167
|
+
photon_dependent = true
|
168
|
+
[fluorophores.PAmCherry.transitions.dark_to_bright.spectrum]
|
169
|
+
wavelengths = [308.0, 309.0, 359.0, 403.0, 440.0, 484.0, 485.0]
|
170
|
+
intensities = [0.00, 0.04, 0.11, 1.0, 0.07, 0.0004, 0.00]
|
171
|
+
extinction_coefficient = 6500 # M^-1 cm^-1
|
172
|
+
quantum_yield = 0.000005 # switching events per photons absorbed
|
173
|
+
|
174
|
+
|
175
|
+
[fluorophores.PAmCherry.transitions.bright_to_bleached]
|
176
|
+
from_state = "bright"
|
177
|
+
to_state = "bleached"
|
178
|
+
photon_dependent = true
|
179
|
+
[fluorophores.PAmCherry.transitions.bright_to_bleached.spectrum]
|
180
|
+
wavelengths = [310.0, 311.0, 411.0, 511.0, 611.0, 612.0]
|
181
|
+
intensities = [0.00, 0.047, 0.0043, 0.6, 0.06, 0.00]
|
182
|
+
extinction_coefficient = 18000 # M^-1 cm^-1
|
183
|
+
quantum_yield = 0.000005 # switching events per photons absorbed
|
184
|
+
|
185
|
+
[fluorophores.PAmCherry.transitions.bright_to_triplet]
|
186
|
+
from_state = "bright"
|
187
|
+
to_state = "triplet"
|
188
|
+
photon_dependent = false
|
189
|
+
base_rate = 1 # 1/s
|
190
|
+
|
191
|
+
[fluorophores.PAmCherry.transitions.triplet_to_dark]
|
192
|
+
from_state = "triplet"
|
193
|
+
to_state = "dark"
|
194
|
+
photon_dependent = false
|
195
|
+
base_rate = 1 # 1/s
|
196
|
+
|
197
|
+
|
198
|
+
# EGFP name
|
199
|
+
[fluorophores.EGFP]
|
200
|
+
name = "EGFP"
|
201
|
+
initial_state = "bright" # flurophore will start with this state in the simulation (all of them), must be valid name from ones provided below.
|
202
|
+
|
203
|
+
# States definition
|
204
|
+
[fluorophores.EGFP.states.bright]
|
205
|
+
name = "bright"
|
206
|
+
state_type = "fluorescent" # any of fluorescent, dark, bleached
|
207
|
+
quantum_yield = 0.6 # from 0-1
|
208
|
+
extinction_coefficient = 55900 # M^-1 cm^-1
|
209
|
+
fluorescent_lifetime = 0.0000000026 # seconds
|
210
|
+
# Spectral data for bright state
|
211
|
+
[fluorophores.EGFP.states.bright.excitation_spectrum]
|
212
|
+
wavelengths = [300.0, 337.0, 488.0, 501.0, 522.0, 540.0]
|
213
|
+
intensities = [0.1, 0.03, 1.00, 0.69, 0.03, 0.00]
|
214
|
+
[fluorophores.EGFP.states.bright.emission_spectrum]
|
215
|
+
wavelengths = [463.0, 494.0, 503.0, 510.0, 528.0, 549.0, 700.0]
|
216
|
+
intensities = [0.00, 0.33, 0.82, 1.00, 0.51, 0.30, 0.00]
|
217
|
+
|
218
|
+
|
219
|
+
[fluorophores.EGFP.states.triplet]
|
220
|
+
name = "triplet"
|
221
|
+
state_type = "dark"
|
222
|
+
|
223
|
+
[fluorophores.EGFP.states.bleached]
|
224
|
+
name = "bleached"
|
225
|
+
state_type = "bleached"
|
226
|
+
|
227
|
+
# State transitions
|
228
|
+
[fluorophores.EGFP.transitions.bright_to_bleached]
|
229
|
+
from_state = "bright"
|
230
|
+
to_state = "bleached"
|
231
|
+
photon_dependent = true
|
232
|
+
[fluorophores.EGFP.transitions.bright_to_bleached.spectrum]
|
233
|
+
wavelengths = [300.0, 337.0, 488.0, 501.0, 522.0, 540.0]
|
234
|
+
intensities = [0.1, 0.03, 1.00, 0.69, 0.03, 0.00]
|
235
|
+
extinction_coefficient = 55900 # M^-1 cm^-1
|
236
|
+
quantum_yield = 0.0000025 # switching events per photons absorbed
|
237
|
+
|
238
|
+
[fluorophores.EGFP.transitions.bright_to_triplet]
|
239
|
+
from_state = "bright"
|
240
|
+
to_state = "triplet"
|
241
|
+
photon_dependent = true
|
242
|
+
[fluorophores.EGFP.transitions.bright_to_triplet.spectrum]
|
243
|
+
wavelengths = [300.0, 337.0, 488.0, 501.0, 522.0, 540.0]
|
244
|
+
intensities = [0.1, 0.03, 1.00, 0.69, 0.03, 0.00]
|
245
|
+
extinction_coefficient = 55900 # M^-1 cm^-1
|
246
|
+
quantum_yield = 0.0000025 # switching events per photons absorbed
|
247
|
+
|
248
|
+
[fluorophores.EGFP.transitions.triplet_to_bleached]
|
249
|
+
from_state = "triplet"
|
250
|
+
to_state = "bleached"
|
251
|
+
photon_dependent = false
|
252
|
+
base_rate = 1 # 1/s
|
253
|
+
|
254
|
+
|
255
|
+
# PSF Configuration
|
256
|
+
|
257
|
+
[psf]
|
258
|
+
# PSF type: "gaussian"
|
259
|
+
type = "gaussian"
|
260
|
+
|
261
|
+
# If type is "custom", specify the path to the PSF file # not supported currently
|
262
|
+
custom_path = ""
|
263
|
+
|
264
|
+
[psf.parameters]
|
265
|
+
numerical_aperture = 1.4 # typical range: 0.1 - 1.5
|
266
|
+
refractive_index = 1.0 # default is air (1.0)
|
267
|
+
#pinhole_diameter = 1.0 # Do not include for no pinhole else float in um units
|
268
|
+
|
269
|
+
# Multiple Laser Configuration File
|
270
|
+
|
271
|
+
[lasers]
|
272
|
+
active = ["red", "blue"] # List of active lasers provided in setup
|
273
|
+
|
274
|
+
[lasers.red]
|
275
|
+
type = "widefield" # "gaussian" or "hilo" or "widefield"
|
276
|
+
preset = "red_633" # description
|
277
|
+
|
278
|
+
[lasers.red.parameters]
|
279
|
+
power = 50000 # Power in watts
|
280
|
+
wavelength = 600 # Wavelength in nanometers
|
281
|
+
beam_width = 5.0 # 1/e² beam width at waist in microns
|
282
|
+
numerical_aperture = 1.4 # NA of focusing lens
|
283
|
+
refractive_index = 1.518
|
284
|
+
inclination_angle = 67.0 # degrees, only for HiLo
|
285
|
+
|
286
|
+
[lasers.blue]
|
287
|
+
type = "widefield"
|
288
|
+
preset = "blue_405"
|
289
|
+
|
290
|
+
[lasers.blue.parameters]
|
291
|
+
power = 5
|
292
|
+
wavelength = 405
|
293
|
+
beam_width = 5.0
|
294
|
+
numerical_aperture = 1.4
|
295
|
+
refractive_index = 1.518
|
296
|
+
|
297
|
+
|
298
|
+
[channels]
|
299
|
+
num_of_channels = 2
|
300
|
+
channel_names = ["red", "green"]
|
301
|
+
split_efficiency = [
|
302
|
+
1.0,
|
303
|
+
1.0,
|
304
|
+
] # 1.0 is 100% efficiency. Physically represents the efficiency of the channel splitter for each channel. max: 1.0 = equal to the original emission light.
|
305
|
+
# Filter Set Configuration
|
306
|
+
[channels.filters]
|
307
|
+
[channels.filters.red] # .red , .green etc, must be of channel_name.
|
308
|
+
filter_set_name = "Red Filter Set"
|
309
|
+
filter_set_description = "Sample Red filter set configuration"
|
310
|
+
|
311
|
+
[channels.filters.red.excitation]
|
312
|
+
name = "Red-Ex"
|
313
|
+
type = "allow_all"
|
314
|
+
points = 100
|
315
|
+
|
316
|
+
[channels.filters.red.emission]
|
317
|
+
name = "Red-Em"
|
318
|
+
type = "bandpass"
|
319
|
+
center_wavelength = 600 # nm
|
320
|
+
bandwidth = 35 # nm
|
321
|
+
transmission_peak = 0.95
|
322
|
+
points = 1000
|
323
|
+
|
324
|
+
[channels.filters.green]
|
325
|
+
filter_set_name = "Green Filter Set"
|
326
|
+
filter_set_description = "Sample Green filter set configuration"
|
327
|
+
[channels.filters.green.excitation]
|
328
|
+
name = "Green-Ex"
|
329
|
+
type = "allow_all"
|
330
|
+
points = 1000
|
331
|
+
[channels.filters.green.emission]
|
332
|
+
name = "Green-Em"
|
333
|
+
type = "bandpass"
|
334
|
+
center_wavelength = 500 # nm
|
335
|
+
bandwidth = 35 # nm
|
336
|
+
transmission_peak = 0.95
|
337
|
+
points = 1000
|
338
|
+
|
339
|
+
|
340
|
+
# Camera configurations
|
341
|
+
[camera]
|
342
|
+
type = "CMOS"
|
343
|
+
pixel_count = [190, 190] # [width, height], 1200x1200 (x pixel_size)
|
344
|
+
pixel_detector_size = 6.5 # um
|
345
|
+
magnification = 100
|
346
|
+
dark_current = 0.0005 # electrons/pixel/second
|
347
|
+
readout_noise = 1.6 # electrons RMS
|
348
|
+
bit_depth = 16
|
349
|
+
sensitivity = 1.0 # electrons/ADU
|
350
|
+
base_adu = 100 #ADU
|
351
|
+
binning_size = 1 # 1x1 , if 2 then 2x2
|
352
|
+
|
353
|
+
# Quantum efficiency curve (wavelength in nm : efficiency 0-1)
|
354
|
+
# extrapotation for wavelengths not included uses edge values
|
355
|
+
quantum_efficiency = [
|
356
|
+
[
|
357
|
+
399,
|
358
|
+
0.00,
|
359
|
+
],
|
360
|
+
[
|
361
|
+
400,
|
362
|
+
0.80,
|
363
|
+
],
|
364
|
+
[
|
365
|
+
500,
|
366
|
+
0.90,
|
367
|
+
],
|
368
|
+
[
|
369
|
+
600,
|
370
|
+
0.95,
|
371
|
+
],
|
372
|
+
[
|
373
|
+
700,
|
374
|
+
0.90,
|
375
|
+
],
|
376
|
+
[
|
377
|
+
800,
|
378
|
+
0.70,
|
379
|
+
],
|
380
|
+
[
|
381
|
+
900,
|
382
|
+
0.40,
|
383
|
+
],
|
384
|
+
[
|
385
|
+
901,
|
386
|
+
0.00,
|
387
|
+
],
|
388
|
+
]
|
389
|
+
|
390
|
+
|
391
|
+
[experiment]
|
392
|
+
name = "PAmCherry_EGFP_Test"
|
393
|
+
description = "Sample experiment configuration"
|
394
|
+
# experiment_type = "time-series" # "time-series" or "z-stack"
|
395
|
+
# z_position = 0.0
|
396
|
+
# laser_names_active = ["red", "blue"]
|
397
|
+
# laser_powers_active = [0.5, 0.05] #W
|
398
|
+
# laser_positions_active = [[5, 5, 0], [5, 5, 0]] # um
|
399
|
+
# xyoffset = [0, 0] # um
|
400
|
+
|
401
|
+
experiment_type = "z-stack" # "time-series" or "z-stack"
|
402
|
+
z_position = [-0.5, -0.4, -0.3, -0.2, -0.1, 0, 0.1, 0.2, 0.3, 0.4, 0.5]
|
403
|
+
laser_names_active = ["red", "blue"]
|
404
|
+
laser_powers_active = [0.5, 0.05] #W
|
405
|
+
laser_positions_active = [[5, 5, 0], [5, 5, 0]] # um
|
406
|
+
xyoffset = [0, 0] # um
|
407
|
+
exposure_time = 100 # ms, needs to be >= than oversample motion time in GlobalParameters
|
408
|
+
interval_time = 0 # ms, must be == 0 or if >0 then must be >= oversample motion time in GlobalParameters
|