AMS-BP 0.3.0__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 +32 -18
- 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/sim_microscopy.py +2 -2
- {ams_bp-0.3.0.dist-info → ams_bp-0.4.0.dist-info}/METADATA +59 -34
- 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.0.dist-info/RECORD +0 -55
- ams_bp-0.3.0.dist-info/entry_points.txt +0 -2
- {ams_bp-0.3.0.dist-info → ams_bp-0.4.0.dist-info}/WHEEL +0 -0
- {ams_bp-0.3.0.dist-info → ams_bp-0.4.0.dist-info}/licenses/LICENSE +0 -0
AMS_BP/__init__.py
CHANGED
AMS_BP/configio/configmodels.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import Any, Dict, List, Literal, Union
|
1
|
+
from typing import Any, Dict, List, Literal, Optional, Union
|
2
2
|
|
3
3
|
import numpy as np
|
4
4
|
from pydantic import BaseModel, Field, field_validator
|
@@ -32,18 +32,18 @@ class MoleculeParameters(BaseModel):
|
|
32
32
|
state_probability_diffusion: List[List[float]]
|
33
33
|
state_probability_hurst: List[List[float]]
|
34
34
|
|
35
|
-
@field_validator(
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
)
|
41
|
-
def convert_to_array(cls, v):
|
42
|
-
|
43
|
-
|
44
|
-
@field_validator("diffusion_transition_matrix", "hurst_transition_matrix")
|
45
|
-
def convert_matrix_to_array(cls, v):
|
46
|
-
|
35
|
+
# @field_validator(
|
36
|
+
# "diffusion_coefficient",
|
37
|
+
# "hurst_exponent",
|
38
|
+
# "state_probability_diffusion",
|
39
|
+
# "state_probability_hurst",
|
40
|
+
# )
|
41
|
+
# def convert_to_array(cls, v):
|
42
|
+
# return np.array(v)
|
43
|
+
#
|
44
|
+
# @field_validator("diffusion_transition_matrix", "hurst_transition_matrix")
|
45
|
+
# def convert_matrix_to_array(cls, v):
|
46
|
+
# return np.array(v)
|
47
47
|
|
48
48
|
|
49
49
|
class GlobalParameters(BaseModel):
|
@@ -57,6 +57,20 @@ class GlobalParameters(BaseModel):
|
|
57
57
|
def convert_sample_plane_dim(cls, v):
|
58
58
|
return np.array(v)
|
59
59
|
|
60
|
+
def model_post_init(self, __context):
|
61
|
+
if self.oversample_motion_time <= 0:
|
62
|
+
raise ValueError("Oversample Motion Time must be larger than 0 ms")
|
63
|
+
if self.exposure_time < self.oversample_motion_time:
|
64
|
+
if self.exposure_time > 0:
|
65
|
+
raise ValueError(
|
66
|
+
"Exposure time must be equal to or larger than Oversample Motion Time, or 0"
|
67
|
+
)
|
68
|
+
if self.interval_time < self.oversample_motion_time:
|
69
|
+
if self.interval_time > 0:
|
70
|
+
raise ValueError(
|
71
|
+
"Interval time must be equal to or larger than Oversample Motion Time, or 0"
|
72
|
+
)
|
73
|
+
|
60
74
|
|
61
75
|
class CondensateParameters(BaseModel):
|
62
76
|
initial_centers: List[List[List[float]]] = Field(
|
@@ -85,8 +99,8 @@ class OutputParameters(BaseModel):
|
|
85
99
|
|
86
100
|
|
87
101
|
class ConfigList(BaseModel):
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
102
|
+
CellParameter: Optional[CellParameters] = None
|
103
|
+
MoleculeParameter: Optional[MoleculeParameters] = None
|
104
|
+
GlobalParameter: GlobalParameters
|
105
|
+
CondensateParameter: Optional[CondensateParameters] = None
|
106
|
+
OutputParameter: Optional[OutputParameters] = None
|