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