AMS-BP 0.4.22__tar.gz → 0.4.31__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.
- {ams_bp-0.4.22 → ams_bp-0.4.31}/PKG-INFO +2 -2
- {ams_bp-0.4.22 → ams_bp-0.4.31}/README.md +1 -1
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/index.md +73 -57
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/__init__.py +1 -1
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/configuration_window.py +71 -77
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/main.py +32 -1
- ams_bp-0.4.31/src/AMS_BP/gui/themes/dark_theme.qss +86 -0
- ams_bp-0.4.31/src/AMS_BP/gui/themes/light_theme.qss +85 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/widgets/camera_config_widget.py +11 -4
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/widgets/cell_config_widget.py +10 -4
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/widgets/channel_config_widget.py +10 -4
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/widgets/condensate_config_widget.py +20 -11
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/widgets/experiment_config_widget.py +19 -6
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/widgets/flurophore_config_widget.py +5 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/widgets/global_config_widget.py +11 -4
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/widgets/laser_config_widget.py +10 -4
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/widgets/molecule_config_widget.py +11 -5
- ams_bp-0.4.31/src/AMS_BP/gui/widgets/utility_widgets/toggleswitch_widget.py +60 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/uv.lock +531 -496
- {ams_bp-0.4.22 → ams_bp-0.4.31}/.github/workflows/lint.yml +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/.github/workflows/pages.yml +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/.github/workflows/publish_pypi.yml +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/.gitignore +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/LICENSE +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/API_Documentation/configio/configmodels.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/API_Documentation/configio/convertconfig.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/API_Documentation/configio/experiments.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/API_Documentation/configio/saving.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/API_Documentation/groundtruth_generators/nuclearporecomplexes.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/API_Documentation/main_cli.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/API_Documentation/metadata/metadata.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/API_Documentation/motion/condensate_movement.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/API_Documentation/motion/movement/boundary_conditions.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/API_Documentation/motion/movement/fbm_BP.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/API_Documentation/motion/track_gen.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/API_Documentation/optics/camera/detectors.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/API_Documentation/optics/camera/quantum_eff.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/API_Documentation/optics/filters/channels/channelschema.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/API_Documentation/optics/filters/filters.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/API_Documentation/optics/lasers/laser_profiles.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/API_Documentation/optics/psf/psf_engine.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/API_Documentation/photophysics/photon_physics.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/API_Documentation/photophysics/state_kinetics.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/API_Documentation/probabilityfuncs/markov_chain.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/API_Documentation/probabilityfuncs/probability_functions.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/API_Documentation/sample/flurophore/flurophore_schema.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/API_Documentation/sample/sim_sampleplane.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/API_Documentation/sim_config.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/API_Documentation/sim_microscopy.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/API_Documentation/utils/constants.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/API_Documentation/utils/errors.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/API_Documentation/utils/util_functions.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/assets/buttons/ButtonFigure_FRAP.svg +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/assets/buttons/ButtonFigure_fPALM_NPC.svg +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/assets/buttons/ButtonFigure_sptPALM_mmaple.svg +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/assets/buttons/ButtonFigure_zstack_twocolor_confocal.svg +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/assets/buttons/ButtonFigure_zstack_twocolor_widefield.svg +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/assets/figures/Fig1_Schema.svg +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/assets/icons/Cells-actin-like-a-tree-Jamie-Whitelaw-1.png +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/assets/icons/drawing.pdf +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/assets/icons/drawing.png +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/docs/assets/icons/drawing.svg +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/examples/QuantitativeExperiments/FRAP/FRAP_base_[[0. 0.]].txt +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/examples/QuantitativeExperiments/FRAP/FRAP_base_[[0.04 0.04]].txt +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/examples/QuantitativeExperiments/FRAP/FRAP_base_[[0.1 0.1]].txt +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/examples/QuantitativeExperiments/FRAP/FRAP_base_[[0.4 0.4]].txt +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/examples/QuantitativeExperiments/FRAP/FRAP_data_[[0. 0.]].txt +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/examples/QuantitativeExperiments/FRAP/FRAP_data_[[0.04 0.04]].txt +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/examples/QuantitativeExperiments/FRAP/FRAP_data_[[0.1 0.1]].txt +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/examples/QuantitativeExperiments/FRAP/FRAP_data_[[0.4 0.4]].txt +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/examples/QuantitativeExperiments/FRAP/FRAP_methods.ipynb +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/examples/QuantitativeExperiments/MotionModels/groundtruth_boundedfbm.ipynb +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/examples/QuantitativeExperiments/PALM/fPALM/export_full2_0039_039.csv +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/examples/QuantitativeExperiments/PALM/fPALM/npc_palm.ipynb +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/examples/QuantitativeExperiments/PALM/sptPALM/motionmodels_sptmmaple.ipynb +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/examples/QuantitativeExperiments/TwoColor/Confocal/confocal_twocolor.ipynb +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/examples/QuantitativeExperiments/TwoColor/Widefield/widefield_twocolor.ipynb +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/examples/VisualizingIndividualModules/laser_modulation.ipynb +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/examples/VisualizingIndividualModules/modules_explained.ipynb +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/mkdocs.yml +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/pyproject.toml +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/pytest.ini +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/cells/__init__.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/cells/budding_yeast_cell.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/cells/cell_factory.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/configio/__init__.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/configio/configmodels.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/configio/convertconfig.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/configio/experiments.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/configio/saving.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/groundtruth_generators/__init__.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/groundtruth_generators/nuclearporecomplexes.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/README.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/__init__.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/assets/__init__.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/assets/drawing.svg +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/help_docs/__init__.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/help_docs/cell_help.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/help_docs/channels_help.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/help_docs/condensate_help.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/help_docs/detector_help.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/help_docs/experiment_help.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/help_docs/fluorophore_help.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/help_docs/general_help.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/help_docs/global_help.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/help_docs/laser_help.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/help_docs/molecule_help.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/help_docs/output_help.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/help_docs/psf_help.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/help_window.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/logging_window.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/sim_worker.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/template_window_selection.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/widgets/__init__.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/widgets/general_config_widget.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/widgets/output_config_widget.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/widgets/psf_config_widget.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/widgets/utility_widgets/__init__.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/widgets/utility_widgets/scinotation_widget.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/gui/widgets/utility_widgets/spectrum_widget.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/logging/__init__.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/logging/logutil.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/logging/setup_run_directory.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/main_cli.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/metadata/__init__.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/metadata/metadata.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/motion/__init__.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/motion/condensate_movement.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/motion/movement/__init__.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/motion/movement/boundary_conditions.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/motion/track_gen.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/optics/__init__.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/optics/camera/__init__.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/optics/camera/detectors.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/optics/camera/quantum_eff.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/optics/filters/__init__.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/optics/filters/channels/__init__.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/optics/filters/channels/channelschema.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/optics/filters/filters.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/optics/lasers/__init__.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/optics/lasers/laser_profiles.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/optics/lasers/scanning_patterns.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/optics/psf/__init__.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/optics/psf/psf_engine.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/photophysics/__init__.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/photophysics/photon_physics.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/photophysics/state_kinetics.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/probabilityfuncs/__init__.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/probabilityfuncs/markov_chain.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/probabilityfuncs/probability_functions.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/resources/template_configs/metadata_configs.json +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/resources/template_configs/sim_config.toml +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/resources/template_configs/twocolor_widefield_timeseries_live.toml +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/resources/template_configs/twocolor_widefield_zstack_fixed.toml +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/resources/template_configs/twocolor_widefield_zstack_live.toml +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/run_sim_util.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/sample/__init__.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/sample/flurophores/__init__.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/sample/flurophores/flurophore_schema.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/sample/sim_sampleplane.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/sim_config.toml +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/sim_microscopy.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/utils/__init__.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/utils/constants.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/utils/decorators.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/utils/errors.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/utils/maskMaker.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.31}/src/AMS_BP/utils/util_functions.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: AMS_BP
|
3
|
-
Version: 0.4.
|
3
|
+
Version: 0.4.31
|
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
|
@@ -46,7 +46,7 @@ Find detailed API references for the library at: [joemans3/github.io/AMS_BP](htt
|
|
46
46
|
|
47
47
|
> !!ATTENTION!! - Please note that you NEED to install the developmental dependencies to run the examples in full. This is mainly for installing the Jupyter notebook extensions, matplotlib and other visualization packages.
|
48
48
|
|
49
|
-
[<img src="./docs/assets/buttons/ButtonFigure_FRAP.svg" width="300" height="120"/>](./examples/QuantitativeExperiments/FRAP/FRAP_methods.ipynb) [<img src="./docs/assets/buttons/ButtonFigure_fPALM_NPC.svg" width="300"/>](./examples/QuantitativeExperiments/
|
49
|
+
[<img src="./docs/assets/buttons/ButtonFigure_FRAP.svg" width="300" height="120"/>](./examples/QuantitativeExperiments/FRAP/FRAP_methods.ipynb) [<img src="./docs/assets/buttons/ButtonFigure_fPALM_NPC.svg" width="300"/>](./examples/QuantitativeExperiments/PALM/fPALM/npc_palm.ipynb)
|
50
50
|
|
51
51
|
[<img src="./docs/assets/buttons/ButtonFigure_zstack_twocolor_widefield.svg" width="300"/>](./examples/QuantitativeExperiments/TwoColor/Widefield/widefield_twocolor.ipynb) [<img src="./docs/assets/buttons/ButtonFigure_zstack_twocolor_confocal.svg" width="300"/>](./examples/QuantitativeExperiments/TwoColor/Confocal/confocal_twocolor.ipynb)
|
52
52
|
|
@@ -20,7 +20,7 @@ Find detailed API references for the library at: [joemans3/github.io/AMS_BP](htt
|
|
20
20
|
|
21
21
|
> !!ATTENTION!! - Please note that you NEED to install the developmental dependencies to run the examples in full. This is mainly for installing the Jupyter notebook extensions, matplotlib and other visualization packages.
|
22
22
|
|
23
|
-
[<img src="./docs/assets/buttons/ButtonFigure_FRAP.svg" width="300" height="120"/>](./examples/QuantitativeExperiments/FRAP/FRAP_methods.ipynb) [<img src="./docs/assets/buttons/ButtonFigure_fPALM_NPC.svg" width="300"/>](./examples/QuantitativeExperiments/
|
23
|
+
[<img src="./docs/assets/buttons/ButtonFigure_FRAP.svg" width="300" height="120"/>](./examples/QuantitativeExperiments/FRAP/FRAP_methods.ipynb) [<img src="./docs/assets/buttons/ButtonFigure_fPALM_NPC.svg" width="300"/>](./examples/QuantitativeExperiments/PALM/fPALM/npc_palm.ipynb)
|
24
24
|
|
25
25
|
[<img src="./docs/assets/buttons/ButtonFigure_zstack_twocolor_widefield.svg" width="300"/>](./examples/QuantitativeExperiments/TwoColor/Widefield/widefield_twocolor.ipynb) [<img src="./docs/assets/buttons/ButtonFigure_zstack_twocolor_confocal.svg" width="300"/>](./examples/QuantitativeExperiments/TwoColor/Confocal/confocal_twocolor.ipynb)
|
26
26
|
|
@@ -1,15 +1,34 @@
|
|
1
|
-
# AMS-BP
|
1
|
+
# AMS-BP
|
2
2
|
<p>
|
3
|
-
<img src="assets/icons/drawing.svg" alt="AMS-BP Logo" width="500" height="200">
|
3
|
+
<img src="./assets/icons/drawing.svg" alt="AMS-BP Logo" width="500" height="200">
|
4
4
|
</p>
|
5
|
+
|
5
6
|
## Advanced Fluorescence Microscopy Simulation Tool
|
6
7
|
|
7
8
|
AMS-BP is a powerful simulation tool for advanced fluorescence microscopy experiments. This guide covers both command-line usage and library integration.
|
8
9
|
|
10
|
+
## Overview of Simulation Workflow
|
11
|
+
<img align = "left" src="./assets/figures/Fig1_Schema.svg" width="500"/>
|
12
|
+
|
13
|
+
*A ground truth is created, **a**, with $`f_{n}`$ fluorophore types of $`N_{f_{n}}`$ molecules each. If applicable, the motion of these molecules is modelled using a 3D bounded FBM with fluctuating generalized diffusion coefficients and Hurst parameters. Variations are modelled as a Markov Chain and require rate constants as parameters. Different fluorophores can have different motion models. The resolution of the motion models is $`\Delta t`$ and cannot be smaller than 1 ms (for computational efficiency). Given the microscope parameters specific to the experimental procedure to simulate, at every time $`t_{j}`$, the excitation intensity for each channel (**b**) is calculated at each fluorophore's location, **c**. For $`t_{j} \rightarrow t_{j+\Delta t}`$, the photophysical state trajectory of the fluorophore is simulated using the light intensity at the molecule's location as input for any light-dependent transition rates, **d**. For the duration that the shutter is open and light is emitted from the sample, emission filters for each channel are applied before the convolution with PSF models, **e**. The incident photons on the detector are then converted to photoelectrons and finally to digital units using the detector models provided, **f**.*
|
14
|
+
|
15
|
+
## API Reference and Docs
|
16
|
+
Find detailed API references for the library at: [joemans3/github.io/AMS_BP](https://joemans3.github.io/AMS_BP/)
|
17
|
+
> A more detailed example is provided in the jupyter notebook in the examples. For starters refer to the [VisualizingIndividualModules](../examples/VisualizingIndividualModules/modules_explained.ipynb). Then head over to the [laser modulation module](../examples/VisualizingIndividualModules/laser_modulation.ipynb) which will show how to change the laser power over time in the simulations. Then view an example of a complex experiment setup for [FRAP](../examples/QuantitativeExperiments/FRAP/FRAP_methods.ipynb) which is possible by the use of compositions of modules in this simulation library.
|
18
|
+
|
19
|
+
## Examples (Click on the image buttons to be taken to the Jupyter notebooks):
|
20
|
+
|
21
|
+
> !!ATTENTION!! - Please note that you NEED to install the developmental dependencies to run the examples in full. This is mainly for installing the Jupyter notebook extensions, matplotlib and other visualization packages.
|
22
|
+
|
23
|
+
[<img src="./assets/buttons/ButtonFigure_FRAP.svg" width="300" height="120"/>](../examples/QuantitativeExperiments/FRAP/FRAP_methods.ipynb) [<img src="./assets/buttons/ButtonFigure_fPALM_NPC.svg" width="300"/>](../examples/QuantitativeExperiments/PALM/fPALM/npc_palm.ipynb)
|
24
|
+
|
25
|
+
[<img src="./assets/buttons/ButtonFigure_zstack_twocolor_widefield.svg" width="300"/>](../examples/QuantitativeExperiments/TwoColor/Widefield/widefield_twocolor.ipynb) [<img src="./assets/buttons/ButtonFigure_zstack_twocolor_confocal.svg" width="300"/>](../examples/QuantitativeExperiments/TwoColor/Confocal/confocal_twocolor.ipynb)
|
9
26
|
|
27
|
+
[<img align="middle" src="./assets/buttons/ButtonFigure_sptPALM_mmaple.svg" width="300"/>](../examples/QuantitativeExperiments/PALM/sptPALM/motionmodels_sptmmaple.ipynb)
|
10
28
|
## Table of Contents
|
11
|
-
- [Installation](#installation)
|
29
|
+
- [Installation](#installation)
|
12
30
|
- [Command Line Interface](#command-line-interface)
|
31
|
+
- [GUI](#gui)
|
13
32
|
- [Configuration File](#configuration-file)
|
14
33
|
- [Running Experiments](#running-experiments)
|
15
34
|
- [Advanced Usage](#advanced-usage)
|
@@ -18,23 +37,29 @@ AMS-BP is a powerful simulation tool for advanced fluorescence microscopy experi
|
|
18
37
|
|
19
38
|
|
20
39
|
### ***Installing the CLI tool using UV***
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
40
|
1. [Install UV](https://docs.astral.sh/uv/getting-started/installation/).
|
26
41
|
2. Run the command:
|
27
42
|
```bash
|
28
43
|
uv tool install AMS_BP
|
29
44
|
```
|
30
|
-
3. You will have access to
|
45
|
+
3. You will have access to three CLI commands (using the uv interface):
|
31
46
|
- `run_AMS_BP runsim` : This is the main entry point for the simulation. (see `run_AMS_BP runsim --help` for more details)
|
32
47
|
- `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)
|
48
|
+
- `run_AMS_BP gui` : to start the GUI. See [GUI Documentation](../src/AMS_BP/gui/README.md)
|
33
49
|
- Note: using `run_AMS_BP --help` will show you all the available commands.
|
34
50
|
4. You can now use these tools (they are isolated in their own env created by uv, which is cool).
|
51
|
+
|
52
|
+
### ***PyPi***
|
53
|
+
|
54
|
+
1. If using pip, make sure the environment is python >= 3.12
|
55
|
+
2. Run:
|
56
|
+
```bash
|
57
|
+
pip install AMS_BP
|
58
|
+
```
|
59
|
+
|
35
60
|
## Command Line Interface
|
36
61
|
|
37
|
-
AMS-BP provides a command-line interface with
|
62
|
+
AMS-BP provides a command-line interface with three main commands:
|
38
63
|
|
39
64
|
```bash
|
40
65
|
# Generate a default configuration file
|
@@ -42,6 +67,9 @@ run_AMS_BP config [OPTIONS]
|
|
42
67
|
|
43
68
|
# Run a simulation using a configuration file
|
44
69
|
run_AMS_BP runsim CONFIG_FILE
|
70
|
+
|
71
|
+
#start the GUI
|
72
|
+
run_AMS_BP gui
|
45
73
|
```
|
46
74
|
|
47
75
|
### Config Command Options
|
@@ -49,17 +77,30 @@ run_AMS_BP runsim CONFIG_FILE
|
|
49
77
|
- `-o, --output_path PATH`: Specify the output directory for the configuration file
|
50
78
|
- `-r, --recursive_o`: Create output directory if it doesn't exist
|
51
79
|
|
80
|
+
## GUI
|
81
|
+
In addition to the CLI and programmatic API, AMS-BP comes with a graphical interface to guide users through the configuration, simulation, and analysis pipeline.
|
52
82
|
|
53
|
-
|
54
|
-
|
55
|
-
|
83
|
+
### Main GUI Features
|
84
|
+
The GUI provides the following tools from a single interface:
|
85
|
+
|
86
|
+
- **Create Configuration File** — Launches the visual configuration builder
|
87
|
+
- **Run Simulation from Config** — Select a .toml file and run the simulation with logging and progress tracking
|
88
|
+
- **Visualize Microscopy Data (Napari)** — Open TIFF, PNG, ND2, or Zarr image files and view with the Napari viewer
|
89
|
+
- **Package Logs for Sharing** — Package run directories (e.g., run_2024_04_20_001) into a .zip file for archival or collaboration
|
56
90
|
|
91
|
+
### Launch the GUI
|
92
|
+
To start the GUI, run:
|
57
93
|
|
94
|
+
```bash
|
95
|
+
|
96
|
+
run_AMS_BP gui
|
97
|
+
```
|
98
|
+
For detailed walkthrough see the [GUI Documentation](../src/AMS_BP/gui/README.md).
|
58
99
|
## Configuration File
|
59
100
|
|
60
101
|
The configuration file (sim_config.toml) is divided into several key sections:
|
61
102
|
|
62
|
-
#### For a detailed description of the configuration file, refer to the [Configuration File Reference](
|
103
|
+
#### For a detailed description of the configuration file, refer to the [Configuration File Reference](https://joemans3.github.io/AMS_BP/API_Documentation/sim_config/).
|
63
104
|
### Basic Units
|
64
105
|
```toml
|
65
106
|
version = "0.1"
|
@@ -99,7 +140,8 @@ diffusion_unit = "um^2/s" # diffusion coefficient units
|
|
99
140
|
|
100
141
|
## Running Experiments
|
101
142
|
|
102
|
-
AMS-BP supports two types of experiments:
|
143
|
+
AMS-BP's CLI currently supports two types of experiments:
|
144
|
+
> (however this can be extended when used as a library)
|
103
145
|
|
104
146
|
### 1. Time Series
|
105
147
|
```toml
|
@@ -120,39 +162,25 @@ laser_names_active = ["red", "blue"]
|
|
120
162
|
laser_powers_active = [0.5, 0.05]
|
121
163
|
laser_positions_active = [[5, 5, 0], [5, 5, 0]]
|
122
164
|
```
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
For programmatic control, you can import and use AMS-BP as a Python library:
|
129
|
-
|
130
|
-
```python
|
131
|
-
from AMS_BP.configio.convertconfig import ConfigLoader
|
132
|
-
|
133
|
-
# Configuration loader intialization
|
134
|
-
config_loader = ConfigLoader(config_path="path/to/config.toml")
|
135
|
-
|
136
|
-
# Setup microscope
|
137
|
-
setup_config = config_loader.setup_microscope()
|
138
|
-
microscope = setup_config["microscope"]
|
139
|
-
config_exp = setup_config["experiment_config"]
|
140
|
-
function_exp = setup_config["experiment_func"]
|
141
|
-
|
142
|
-
# Run simulation
|
143
|
-
frames, metadata = function_exp(microscope=microscope, config=config_exp)
|
144
|
-
|
145
|
-
# Save results
|
146
|
-
from AMS_BP.configio.saving import save_config_frames
|
147
|
-
save_config_frames(metadata, frames, setup_config["base_config"].OutputParameters)
|
165
|
+
To run the default configuration:
|
166
|
+
1. Make sure you followed the uv tool installation.
|
167
|
+
2. Make a copy of the default configuration file using the command:
|
168
|
+
```bash
|
169
|
+
run_AMS_BP config
|
148
170
|
```
|
171
|
+
3. Run the sim:
|
172
|
+
```bash
|
173
|
+
run_AMS_BP runsim sim_config.toml
|
174
|
+
```
|
175
|
+
4. View the results in the newly created folder, whose name is defined in the config file.
|
149
176
|
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
177
|
+
## High Priority Features
|
178
|
+
~~1. Irregular cell shapes with motion models~~ (supported with release of v0.2.0)
|
179
|
+
2. Stimulated Emission models
|
180
|
+
3. STORM workflow examples
|
181
|
+
4. CTRW motion models
|
182
|
+
5. Simpler configurations
|
183
|
+
> **_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.
|
156
184
|
|
157
185
|
### Custom Experiment Types
|
158
186
|
|
@@ -163,18 +191,6 @@ When using AMS-BP as a library, you can create custom experiment types by:
|
|
163
191
|
3. Defining new molecule behaviors
|
164
192
|
4. Creating specialized analysis routines
|
165
193
|
|
166
|
-
## API Reference and Docs
|
167
|
-
Find detailed API references for the library at: [joemans3/github.io/AMS_BP](https://joemans3.github.io/AMS_BP/)
|
168
|
-
> A more detailed example is provided in the jupyter notebook in the examples. For starters refer to the [VisualizingIndividualModules](examples/VisualizingIndividualModules/modules_explained.ipynb). Then head over to the [laser modulation module](examples/VisualizingIndividualModules/laser_modulation.ipynb) which will show how to change the laser power over time in the simulations. Then view an example of a complex experiment setup for [FRAP](examples/QuantitativeExperiments/FRAP_methods.ipynb) which is possible by the use of compositions of modules in this simulation library.
|
169
|
-
|
170
|
-
## High Priority Features
|
171
|
-
1. Irregular cell shapes with motion models
|
172
|
-
2. Stimulated Emission models
|
173
|
-
3. STORM workflow examples
|
174
|
-
4. CTRW motion models
|
175
|
-
5. Simpler configurations
|
176
|
-
|
177
|
-
|
178
194
|
## Tips and Best Practices
|
179
195
|
|
180
196
|
1. **Configuration Management**
|
@@ -2,14 +2,16 @@ from pathlib import Path
|
|
2
2
|
|
3
3
|
import tomli
|
4
4
|
import tomlkit
|
5
|
+
from PyQt6.QtCore import Qt
|
5
6
|
from PyQt6.QtWidgets import (
|
6
|
-
QComboBox,
|
7
7
|
QDialog,
|
8
8
|
QFileDialog,
|
9
9
|
QHBoxLayout,
|
10
10
|
QLabel,
|
11
|
+
QListWidget,
|
11
12
|
QMessageBox,
|
12
13
|
QPushButton,
|
14
|
+
QSizePolicy,
|
13
15
|
QStackedWidget,
|
14
16
|
QTextEdit,
|
15
17
|
QVBoxLayout,
|
@@ -36,54 +38,63 @@ class ConfigEditor(QWidget):
|
|
36
38
|
super().__init__()
|
37
39
|
self.setWindowTitle("Simulation Configuration Editor")
|
38
40
|
|
39
|
-
#
|
40
|
-
|
41
|
-
|
42
|
-
#
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
"
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
41
|
+
# === Main horizontal layout: [Side Navigation | Content Area] ===
|
42
|
+
main_layout = QHBoxLayout(self)
|
43
|
+
|
44
|
+
# === Sidebar: Section Navigation ===
|
45
|
+
self.nav_list = QListWidget()
|
46
|
+
self.sections = [
|
47
|
+
"General",
|
48
|
+
"Global Parameters",
|
49
|
+
"Cell Parameters",
|
50
|
+
"Molecule Parameters",
|
51
|
+
"Condensate Parameters",
|
52
|
+
"Define fluorophores",
|
53
|
+
"Camera Parameters",
|
54
|
+
"PSF Parameters",
|
55
|
+
"Laser Parameters",
|
56
|
+
"Channels Parameters",
|
57
|
+
"Saving Instructions",
|
58
|
+
"Experiment Builder",
|
59
|
+
]
|
60
|
+
self.nav_list.addItems(self.sections)
|
61
|
+
self.nav_list.setFixedWidth(220)
|
62
|
+
self.nav_list.setSpacing(4)
|
63
|
+
self.nav_list.setCurrentRow(0)
|
64
|
+
self.nav_list.currentRowChanged.connect(self.on_tab_selected)
|
65
|
+
main_layout.addWidget(self.nav_list)
|
66
|
+
|
67
|
+
# === Right panel layout ===
|
68
|
+
right_panel = QVBoxLayout()
|
69
|
+
|
70
|
+
# Step/breadcrumb label
|
71
|
+
self.step_label = QLabel()
|
72
|
+
self.step_label.setAlignment(Qt.AlignmentFlag.AlignLeft)
|
73
|
+
right_panel.addWidget(self.step_label)
|
74
|
+
|
75
|
+
# === Stack of config widgets ===
|
76
|
+
self.stacked_widget = QStackedWidget()
|
77
|
+
self.stacked_widget.setSizePolicy(
|
78
|
+
QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Expanding
|
68
79
|
)
|
69
|
-
self.
|
70
|
-
self.on_dropdown_change
|
71
|
-
) # Connect to the change event
|
80
|
+
right_panel.addWidget(self.stacked_widget)
|
72
81
|
|
73
|
-
#
|
74
|
-
self.
|
82
|
+
# === Buttons at the bottom ===
|
83
|
+
self.save_button = QPushButton("Ready to save configuration?")
|
84
|
+
self.save_button.clicked.connect(self.save_config)
|
85
|
+
right_panel.addWidget(self.save_button)
|
75
86
|
|
76
|
-
|
77
|
-
|
78
|
-
|
87
|
+
self.preview_button = QPushButton("Preview Configuration TOML")
|
88
|
+
self.preview_button.clicked.connect(self.preview_config)
|
89
|
+
right_panel.addWidget(self.preview_button)
|
79
90
|
|
80
|
-
|
81
|
-
|
91
|
+
self.help_button = QPushButton("Get Help on this section")
|
92
|
+
self.help_button.clicked.connect(self.show_help)
|
93
|
+
right_panel.addWidget(self.help_button)
|
82
94
|
|
83
|
-
|
84
|
-
self.stacked_widget = QStackedWidget()
|
95
|
+
main_layout.addLayout(right_panel)
|
85
96
|
|
86
|
-
#
|
97
|
+
# === Create tab content widgets ===
|
87
98
|
self.general_tab = GeneralConfigWidget()
|
88
99
|
self.global_tab = GlobalConfigWidget()
|
89
100
|
self.cell_tab = CellConfigWidget()
|
@@ -97,36 +108,35 @@ class ConfigEditor(QWidget):
|
|
97
108
|
self.detector_tab = CameraConfigWidget()
|
98
109
|
self.experiment_tab = ExperimentConfigWidget()
|
99
110
|
|
100
|
-
#
|
101
|
-
# PSF -> confocal -> lasers
|
111
|
+
# === Widget interconnections ===
|
102
112
|
self.psf_tab.confocal_mode_changed.connect(self.laser_tab.set_confocal_mode)
|
103
|
-
|
113
|
+
|
104
114
|
self.molecule_tab.molecule_count_changed.connect(
|
105
115
|
self.fluorophore_tab.set_mfluorophore_count
|
106
116
|
)
|
107
117
|
self.molecule_tab.molecule_count_changed.connect(
|
108
118
|
self.condensate_tab.set_molecule_count
|
109
119
|
)
|
110
|
-
|
120
|
+
|
111
121
|
self.fluorophore_tab.mfluorophore_count_changed.connect(
|
112
122
|
self.molecule_tab.set_molecule_count
|
113
123
|
)
|
114
124
|
self.fluorophore_tab.mfluorophore_count_changed.connect(
|
115
125
|
self.condensate_tab.set_molecule_count
|
116
126
|
)
|
117
|
-
|
127
|
+
|
118
128
|
self.condensate_tab.molecule_count_changed.connect(
|
119
129
|
self.molecule_tab.set_molecule_count
|
120
130
|
)
|
121
131
|
self.condensate_tab.molecule_count_changed.connect(
|
122
132
|
self.fluorophore_tab.set_mfluorophore_count
|
123
133
|
)
|
124
|
-
|
134
|
+
|
125
135
|
self.laser_tab.laser_names_updated.connect(
|
126
136
|
self.experiment_tab.set_active_lasers
|
127
137
|
)
|
128
138
|
|
129
|
-
# Add
|
139
|
+
# === Add tab widgets to the stack ===
|
130
140
|
self.stacked_widget.addWidget(self.general_tab)
|
131
141
|
self.stacked_widget.addWidget(self.global_tab)
|
132
142
|
self.stacked_widget.addWidget(self.cell_tab)
|
@@ -140,27 +150,13 @@ class ConfigEditor(QWidget):
|
|
140
150
|
self.stacked_widget.addWidget(self.output_tab)
|
141
151
|
self.stacked_widget.addWidget(self.experiment_tab)
|
142
152
|
|
143
|
-
#
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
self.save_button = QPushButton("Ready to save configuration?")
|
148
|
-
self.save_button.clicked.connect(self.save_config)
|
149
|
-
layout.addWidget(self.save_button)
|
150
|
-
|
151
|
-
self.preview_button = QPushButton("Preview Configuration TOML")
|
152
|
-
self.preview_button.clicked.connect(self.preview_config)
|
153
|
-
layout.addWidget(self.preview_button)
|
154
|
-
|
155
|
-
self.help_button = QPushButton("Get Help on this section")
|
156
|
-
self.help_button.clicked.connect(self.show_help)
|
157
|
-
layout.addWidget(self.help_button)
|
158
|
-
|
159
|
-
# Set the layout for the main window
|
160
|
-
self.setLayout(layout)
|
153
|
+
# Final layout and window size
|
154
|
+
self.setLayout(main_layout)
|
155
|
+
self.setMinimumSize(1100, 750)
|
156
|
+
self.resize(1250, 850)
|
161
157
|
|
162
|
-
#
|
163
|
-
self.
|
158
|
+
# Initial tab display
|
159
|
+
self.on_tab_selected(0)
|
164
160
|
|
165
161
|
def set_data(self, config: dict):
|
166
162
|
if "Cell_Parameters" in config:
|
@@ -236,14 +232,12 @@ class ConfigEditor(QWidget):
|
|
236
232
|
doc[key] = val
|
237
233
|
return doc
|
238
234
|
|
239
|
-
def
|
240
|
-
"""Change the displayed widget
|
235
|
+
def on_tab_selected(self, index: int):
|
236
|
+
"""Change the displayed widget and update breadcrumb/step label."""
|
241
237
|
self.stacked_widget.setCurrentIndex(index)
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
) # Corrected way to get the total number of items
|
246
|
-
self.tab_index_label.setText(f"{index + 1}/{total_tabs}")
|
238
|
+
total = self.nav_list.count()
|
239
|
+
current = self.nav_list.item(index).text()
|
240
|
+
self.step_label.setText(f"Step {index + 1}/{total} — {current}")
|
247
241
|
|
248
242
|
def validate_all_tabs(self) -> bool:
|
249
243
|
return all(
|
@@ -4,10 +4,11 @@ from zipfile import ZipFile
|
|
4
4
|
|
5
5
|
import napari
|
6
6
|
import tifffile
|
7
|
-
from PyQt6.QtCore import Qt, QThread
|
7
|
+
from PyQt6.QtCore import QSettings, Qt, QThread
|
8
8
|
from PyQt6.QtGui import QPainter, QPixmap
|
9
9
|
from PyQt6.QtSvg import QSvgRenderer
|
10
10
|
from PyQt6.QtWidgets import (
|
11
|
+
QApplication,
|
11
12
|
QFileDialog,
|
12
13
|
QLabel,
|
13
14
|
QMainWindow,
|
@@ -22,6 +23,7 @@ from ..logging.setup_run_directory import setup_run_directory
|
|
22
23
|
from .logging_window import LogWindow
|
23
24
|
from .sim_worker import SimulationWorker
|
24
25
|
from .template_window_selection import TemplateSelectionWindow
|
26
|
+
from .widgets.utility_widgets.toggleswitch_widget import ToggleSwitch
|
25
27
|
|
26
28
|
LOGO_PATH = str(Path(__file__).parent / "assets" / "drawing.svg")
|
27
29
|
|
@@ -77,6 +79,20 @@ class MainWindow(QMainWindow):
|
|
77
79
|
self.package_logs_button.clicked.connect(self.package_logs)
|
78
80
|
layout.addWidget(self.package_logs_button)
|
79
81
|
|
82
|
+
# Load theme preference
|
83
|
+
self.settings = QSettings("AMS", "AMSConfig")
|
84
|
+
theme_pref = self.settings.value("theme", "light")
|
85
|
+
|
86
|
+
# Add toggle switch with label
|
87
|
+
self.theme_toggle = ToggleSwitch(checked=(theme_pref == "dark"))
|
88
|
+
self.theme_toggle.toggled.connect(self.toggle_theme)
|
89
|
+
self.theme_label = QLabel("Dark Mode" if theme_pref == "dark" else "Light Mode")
|
90
|
+
layout.addWidget(self.theme_label)
|
91
|
+
layout.addWidget(self.theme_toggle, alignment=Qt.AlignmentFlag.AlignCenter)
|
92
|
+
|
93
|
+
# Apply initial theme
|
94
|
+
self.apply_theme(theme_pref)
|
95
|
+
|
80
96
|
def package_logs(self):
|
81
97
|
log_dir = Path.home() / "AMS_runs"
|
82
98
|
|
@@ -245,6 +261,21 @@ class MainWindow(QMainWindow):
|
|
245
261
|
else:
|
246
262
|
print("Failed to load SVG file.")
|
247
263
|
|
264
|
+
def toggle_theme(self, is_dark: bool):
|
265
|
+
theme = "dark" if is_dark else "light"
|
266
|
+
self.settings.setValue("theme", theme)
|
267
|
+
self.apply_theme(theme)
|
268
|
+
self.theme_label.setText("Dark Mode" if is_dark else "Light Mode")
|
269
|
+
|
270
|
+
def apply_theme(self, theme: str):
|
271
|
+
theme_file = Path(__file__).parent / "themes" / f"{theme}_theme.qss"
|
272
|
+
try:
|
273
|
+
with open(theme_file, "r") as f:
|
274
|
+
stylesheet = f.read()
|
275
|
+
QApplication.instance().setStyleSheet(stylesheet)
|
276
|
+
except Exception as e:
|
277
|
+
QMessageBox.warning(self, "Theme Error", f"Failed to load theme:\n{e}")
|
278
|
+
|
248
279
|
def open_config_editor(self):
|
249
280
|
"""Launch template selection first, then open ConfigEditor."""
|
250
281
|
self.template_window = TemplateSelectionWindow()
|
@@ -0,0 +1,86 @@
|
|
1
|
+
/* Dark Theme */
|
2
|
+
* {
|
3
|
+
font-family: "Segoe UI", "Arial", sans-serif;
|
4
|
+
font-size: 14px;
|
5
|
+
color: #e0e0e0;
|
6
|
+
}
|
7
|
+
|
8
|
+
QWidget {
|
9
|
+
background-color: #2b2b2b;
|
10
|
+
}
|
11
|
+
|
12
|
+
QLabel {
|
13
|
+
color: #dddddd;
|
14
|
+
}
|
15
|
+
|
16
|
+
QPushButton {
|
17
|
+
background-color: #3daee9;
|
18
|
+
color: #ffffff;
|
19
|
+
border-radius: 6px;
|
20
|
+
padding: 6px 12px;
|
21
|
+
}
|
22
|
+
QPushButton:hover {
|
23
|
+
background-color: #5dbff0;
|
24
|
+
}
|
25
|
+
QPushButton:pressed {
|
26
|
+
background-color: #2a97cc;
|
27
|
+
}
|
28
|
+
|
29
|
+
QLineEdit, QComboBox, QSpinBox, QDoubleSpinBox, QTextEdit {
|
30
|
+
background-color: #3c3f41;
|
31
|
+
border: 1px solid #555;
|
32
|
+
border-radius: 4px;
|
33
|
+
padding: 4px;
|
34
|
+
color: #eeeeee;
|
35
|
+
}
|
36
|
+
|
37
|
+
QGroupBox {
|
38
|
+
border: 1px solid #444;
|
39
|
+
border-radius: 6px;
|
40
|
+
margin-top: 10px;
|
41
|
+
}
|
42
|
+
QGroupBox:title {
|
43
|
+
subcontrol-origin: margin;
|
44
|
+
subcontrol-position: top left;
|
45
|
+
padding: 0 6px;
|
46
|
+
font-weight: bold;
|
47
|
+
color: #aaaaaa;
|
48
|
+
}
|
49
|
+
|
50
|
+
QTabWidget::pane {
|
51
|
+
border: 1px solid #444;
|
52
|
+
background: #3c3f41;
|
53
|
+
border-radius: 6px;
|
54
|
+
}
|
55
|
+
|
56
|
+
QTabBar::tab {
|
57
|
+
background: #444;
|
58
|
+
border: 1px solid #555;
|
59
|
+
padding: 6px 12px;
|
60
|
+
border-top-left-radius: 6px;
|
61
|
+
border-top-right-radius: 6px;
|
62
|
+
}
|
63
|
+
QTabBar::tab:selected {
|
64
|
+
background: #2b2b2b;
|
65
|
+
border-bottom-color: #2b2b2b;
|
66
|
+
}
|
67
|
+
|
68
|
+
QScrollArea {
|
69
|
+
border: none;
|
70
|
+
}
|
71
|
+
|
72
|
+
QListWidget {
|
73
|
+
background-color: #2f2f2f;
|
74
|
+
border-right: 1px solid #444;
|
75
|
+
}
|
76
|
+
|
77
|
+
QListWidget::item {
|
78
|
+
padding: 6px;
|
79
|
+
border-radius: 4px;
|
80
|
+
color: #dddddd;
|
81
|
+
}
|
82
|
+
|
83
|
+
QListWidget::item:selected {
|
84
|
+
background-color: #3daee9;
|
85
|
+
color: #ffffff;
|
86
|
+
}
|