AMS-BP 0.4.22__tar.gz → 0.4.40__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.40}/PKG-INFO +7 -3
- {ams_bp-0.4.22 → ams_bp-0.4.40}/README.md +6 -2
- {ams_bp-0.4.22 → ams_bp-0.4.40}/docs/index.md +73 -57
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/__init__.py +1 -1
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/configio/experiments.py +5 -0
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/motion/condensate_movement.py +1 -1
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/motion/movement/boundary_conditions.py +1 -1
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/photophysics/photon_physics.py +1 -1
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/sample/flurophores/flurophore_schema.py +1 -1
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/sim_microscopy.py +1 -1
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/gui/main.py +36 -5
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/gui/sim_worker.py +3 -4
- ams_bp-0.4.40/src/AMS_BP/gui/themes/dark_theme.qss +86 -0
- ams_bp-0.4.40/src/AMS_BP/gui/themes/light_theme.qss +85 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/gui/widgets/camera_config_widget.py +15 -9
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/gui/widgets/cell_config_widget.py +13 -7
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/gui/widgets/channel_config_widget.py +12 -6
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/gui/widgets/condensate_config_widget.py +24 -15
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/gui/widgets/experiment_config_widget.py +71 -7
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/gui/widgets/flurophore_config_widget.py +6 -2
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/gui/widgets/global_config_widget.py +13 -6
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/gui/widgets/laser_config_widget.py +12 -6
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/gui/widgets/molecule_config_widget.py +14 -11
- ams_bp-0.4.40/src/AMS_BP/gui/widgets/utility_widgets/toggleswitch_widget.py +60 -0
- {ams_bp-0.4.22/src/AMS_BP/gui → ams_bp-0.4.40/src/AMS_BP/gui/windows}/configuration_window.py +86 -89
- {ams_bp-0.4.22/src/AMS_BP/gui → ams_bp-0.4.40/src/AMS_BP/gui/windows}/template_window_selection.py +35 -5
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/main_cli.py +2 -2
- ams_bp-0.4.40/src/AMS_BP/resources/template_configs/metadata_configs.json +38 -0
- ams_bp-0.4.40/src/AMS_BP/resources/template_configs/twocolor_confocal_zstack_fixed.toml +406 -0
- ams_bp-0.4.40/src/AMS_BP/resources/template_configs/twocolor_confocal_zstack_live.toml +408 -0
- ams_bp-0.4.40/src/AMS_BP/resources/template_configs/twocolor_widefield_timeseries_live.toml +399 -0
- ams_bp-0.4.40/src/AMS_BP/tools/logging/__init__.py +0 -0
- ams_bp-0.4.40/src/AMS_BP/utils/__init__.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/uv.lock +531 -496
- ams_bp-0.4.22/src/AMS_BP/resources/template_configs/metadata_configs.json +0 -20
- ams_bp-0.4.22/src/AMS_BP/sim_config.toml +0 -408
- {ams_bp-0.4.22 → ams_bp-0.4.40}/.github/workflows/lint.yml +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/.github/workflows/pages.yml +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/.github/workflows/publish_pypi.yml +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/.gitignore +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/LICENSE +0 -0
- {ams_bp-0.4.22/docs/API_Documentation → ams_bp-0.4.40/docs/API_Documentation/core}/configio/configmodels.md +0 -0
- {ams_bp-0.4.22/docs/API_Documentation → ams_bp-0.4.40/docs/API_Documentation/core}/configio/convertconfig.md +0 -0
- {ams_bp-0.4.22/docs/API_Documentation → ams_bp-0.4.40/docs/API_Documentation/core}/configio/experiments.md +0 -0
- {ams_bp-0.4.22/docs/API_Documentation → ams_bp-0.4.40/docs/API_Documentation/core}/configio/saving.md +0 -0
- {ams_bp-0.4.22/docs/API_Documentation → ams_bp-0.4.40/docs/API_Documentation/core}/groundtruth_generators/nuclearporecomplexes.md +0 -0
- {ams_bp-0.4.22/docs/API_Documentation → ams_bp-0.4.40/docs/API_Documentation/core}/metadata/metadata.md +0 -0
- {ams_bp-0.4.22/docs/API_Documentation → ams_bp-0.4.40/docs/API_Documentation/core}/motion/condensate_movement.md +0 -0
- {ams_bp-0.4.22/docs/API_Documentation → ams_bp-0.4.40/docs/API_Documentation/core}/motion/movement/boundary_conditions.md +0 -0
- {ams_bp-0.4.22/docs/API_Documentation → ams_bp-0.4.40/docs/API_Documentation/core}/motion/movement/fbm_BP.md +0 -0
- {ams_bp-0.4.22/docs/API_Documentation → ams_bp-0.4.40/docs/API_Documentation/core}/motion/track_gen.md +0 -0
- {ams_bp-0.4.22/docs/API_Documentation → ams_bp-0.4.40/docs/API_Documentation/core}/optics/camera/detectors.md +0 -0
- {ams_bp-0.4.22/docs/API_Documentation → ams_bp-0.4.40/docs/API_Documentation/core}/optics/camera/quantum_eff.md +0 -0
- {ams_bp-0.4.22/docs/API_Documentation → ams_bp-0.4.40/docs/API_Documentation/core}/optics/filters/channels/channelschema.md +0 -0
- {ams_bp-0.4.22/docs/API_Documentation → ams_bp-0.4.40/docs/API_Documentation/core}/optics/filters/filters.md +0 -0
- {ams_bp-0.4.22/docs/API_Documentation → ams_bp-0.4.40/docs/API_Documentation/core}/optics/lasers/laser_profiles.md +0 -0
- {ams_bp-0.4.22/docs/API_Documentation → ams_bp-0.4.40/docs/API_Documentation/core}/optics/psf/psf_engine.md +0 -0
- {ams_bp-0.4.22/docs/API_Documentation → ams_bp-0.4.40/docs/API_Documentation/core}/photophysics/photon_physics.md +0 -0
- {ams_bp-0.4.22/docs/API_Documentation → ams_bp-0.4.40/docs/API_Documentation/core}/photophysics/state_kinetics.md +0 -0
- {ams_bp-0.4.22/docs/API_Documentation → ams_bp-0.4.40/docs/API_Documentation/core}/probabilityfuncs/markov_chain.md +0 -0
- {ams_bp-0.4.22/docs/API_Documentation → ams_bp-0.4.40/docs/API_Documentation/core}/probabilityfuncs/probability_functions.md +0 -0
- {ams_bp-0.4.22/docs/API_Documentation → ams_bp-0.4.40/docs/API_Documentation/core}/sample/flurophore/flurophore_schema.md +0 -0
- {ams_bp-0.4.22/docs/API_Documentation → ams_bp-0.4.40/docs/API_Documentation/core}/sample/sim_sampleplane.md +0 -0
- {ams_bp-0.4.22/docs/API_Documentation → ams_bp-0.4.40/docs/API_Documentation/core}/sim_microscopy.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/docs/API_Documentation/main_cli.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/docs/API_Documentation/sim_config.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/docs/API_Documentation/utils/constants.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/docs/API_Documentation/utils/errors.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/docs/API_Documentation/utils/util_functions.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/docs/assets/buttons/ButtonFigure_FRAP.svg +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/docs/assets/buttons/ButtonFigure_fPALM_NPC.svg +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/docs/assets/buttons/ButtonFigure_sptPALM_mmaple.svg +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/docs/assets/buttons/ButtonFigure_zstack_twocolor_confocal.svg +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/docs/assets/buttons/ButtonFigure_zstack_twocolor_widefield.svg +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/docs/assets/figures/Fig1_Schema.svg +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/docs/assets/icons/Cells-actin-like-a-tree-Jamie-Whitelaw-1.png +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/docs/assets/icons/drawing.pdf +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/docs/assets/icons/drawing.png +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/docs/assets/icons/drawing.svg +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/examples/QuantitativeExperiments/FRAP/FRAP_base_[[0. 0.]].txt +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/examples/QuantitativeExperiments/FRAP/FRAP_base_[[0.04 0.04]].txt +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/examples/QuantitativeExperiments/FRAP/FRAP_base_[[0.1 0.1]].txt +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/examples/QuantitativeExperiments/FRAP/FRAP_base_[[0.4 0.4]].txt +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/examples/QuantitativeExperiments/FRAP/FRAP_data_[[0. 0.]].txt +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/examples/QuantitativeExperiments/FRAP/FRAP_data_[[0.04 0.04]].txt +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/examples/QuantitativeExperiments/FRAP/FRAP_data_[[0.1 0.1]].txt +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/examples/QuantitativeExperiments/FRAP/FRAP_data_[[0.4 0.4]].txt +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/examples/QuantitativeExperiments/FRAP/FRAP_methods.ipynb +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/examples/QuantitativeExperiments/MotionModels/groundtruth_boundedfbm.ipynb +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/examples/QuantitativeExperiments/PALM/fPALM/export_full2_0039_039.csv +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/examples/QuantitativeExperiments/PALM/fPALM/npc_palm.ipynb +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/examples/QuantitativeExperiments/PALM/sptPALM/motionmodels_sptmmaple.ipynb +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/examples/QuantitativeExperiments/TwoColor/Confocal/confocal_twocolor.ipynb +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/examples/QuantitativeExperiments/TwoColor/Widefield/widefield_twocolor.ipynb +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/examples/VisualizingIndividualModules/laser_modulation.ipynb +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/examples/VisualizingIndividualModules/modules_explained.ipynb +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/mkdocs.yml +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/pyproject.toml +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/pytest.ini +0 -0
- {ams_bp-0.4.22/src/AMS_BP/configio → ams_bp-0.4.40/src/AMS_BP/core}/__init__.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/cells/__init__.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/cells/budding_yeast_cell.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/cells/cell_factory.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP/gui → ams_bp-0.4.40/src/AMS_BP/core/configio}/__init__.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/configio/configmodels.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/configio/convertconfig.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/configio/saving.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/groundtruth_generators/__init__.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/groundtruth_generators/nuclearporecomplexes.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP/gui/assets → ams_bp-0.4.40/src/AMS_BP/core/metadata}/__init__.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/metadata/metadata.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/motion/__init__.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/motion/movement/__init__.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/motion/track_gen.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP/gui/help_docs → ams_bp-0.4.40/src/AMS_BP/core/optics}/__init__.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/optics/camera/__init__.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/optics/camera/detectors.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/optics/camera/quantum_eff.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/optics/filters/__init__.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP/gui/widgets → ams_bp-0.4.40/src/AMS_BP/core/optics/filters/channels}/__init__.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/optics/filters/channels/channelschema.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/optics/filters/filters.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/optics/lasers/__init__.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/optics/lasers/laser_profiles.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/optics/lasers/scanning_patterns.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/optics/psf/__init__.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/optics/psf/psf_engine.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP/gui/widgets/utility_widgets → ams_bp-0.4.40/src/AMS_BP/core/photophysics}/__init__.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/photophysics/state_kinetics.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP/logging → ams_bp-0.4.40/src/AMS_BP/core/probabilityfuncs}/__init__.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/probabilityfuncs/markov_chain.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/probabilityfuncs/probability_functions.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/run_sim_util.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP/metadata → ams_bp-0.4.40/src/AMS_BP/core/sample}/__init__.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/sample/flurophores/__init__.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/sample/sim_sampleplane.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/gui/README.md +0 -0
- {ams_bp-0.4.22/src/AMS_BP/optics → ams_bp-0.4.40/src/AMS_BP/gui}/__init__.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP/optics/filters/channels → ams_bp-0.4.40/src/AMS_BP/gui/assets}/__init__.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/gui/assets/drawing.svg +0 -0
- {ams_bp-0.4.22/src/AMS_BP/photophysics → ams_bp-0.4.40/src/AMS_BP/gui/help_docs}/__init__.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/gui/help_docs/cell_help.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/gui/help_docs/channels_help.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/gui/help_docs/condensate_help.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/gui/help_docs/detector_help.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/gui/help_docs/experiment_help.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/gui/help_docs/fluorophore_help.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/gui/help_docs/general_help.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/gui/help_docs/global_help.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/gui/help_docs/laser_help.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/gui/help_docs/molecule_help.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/gui/help_docs/output_help.md +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/gui/help_docs/psf_help.md +0 -0
- {ams_bp-0.4.22/src/AMS_BP/probabilityfuncs → ams_bp-0.4.40/src/AMS_BP/gui/widgets}/__init__.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/gui/widgets/general_config_widget.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/gui/widgets/output_config_widget.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/gui/widgets/psf_config_widget.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP/sample → ams_bp-0.4.40/src/AMS_BP/gui/widgets/utility_widgets}/__init__.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/gui/widgets/utility_widgets/scinotation_widget.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/gui/widgets/utility_widgets/spectrum_widget.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP/utils → ams_bp-0.4.40/src/AMS_BP/gui/windows}/__init__.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP/gui → ams_bp-0.4.40/src/AMS_BP/gui/windows}/help_window.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP/gui → ams_bp-0.4.40/src/AMS_BP/gui/windows}/logging_window.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/resources/template_configs/sim_config.toml +0 -0
- /ams_bp-0.4.22/src/AMS_BP/resources/template_configs/twocolor_widefield_timeseries_live.toml → /ams_bp-0.4.40/src/AMS_BP/resources/template_configs/twocolor_confocal_timeseries_live.toml +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/resources/template_configs/twocolor_widefield_zstack_fixed.toml +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/resources/template_configs/twocolor_widefield_zstack_live.toml +0 -0
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/tools}/logging/logutil.py +0 -0
- {ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/tools}/logging/setup_run_directory.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/utils/constants.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/utils/decorators.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/utils/errors.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/src/AMS_BP/utils/maskMaker.py +0 -0
- {ams_bp-0.4.22 → ams_bp-0.4.40}/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.40
|
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
|
@@ -44,9 +44,13 @@ Find detailed API references for the library at: [joemans3/github.io/AMS_BP](htt
|
|
44
44
|
|
45
45
|
## Examples (Click on the image buttons to be taken to the Jupyter notebooks):
|
46
46
|
|
47
|
-
> !!ATTENTION!! - Please note that you NEED to install the
|
47
|
+
> !!ATTENTION!! - Please note that you NEED to install the optional dependencies to run the examples in full. This is mainly for installing the Jupyter notebook extensions, matplotlib and other visualization packages. In whatever environment you install this package, make sure to install with all dependencies. As an example, for UV this would be evoking:
|
48
|
+
```bash
|
49
|
+
uv sync --all-extras
|
50
|
+
```
|
51
|
+
while inside the root of the project, for syncing the environment.
|
48
52
|
|
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/
|
53
|
+
[<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
54
|
|
51
55
|
[<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
56
|
|
@@ -18,9 +18,13 @@ Find detailed API references for the library at: [joemans3/github.io/AMS_BP](htt
|
|
18
18
|
|
19
19
|
## Examples (Click on the image buttons to be taken to the Jupyter notebooks):
|
20
20
|
|
21
|
-
> !!ATTENTION!! - Please note that you NEED to install the
|
21
|
+
> !!ATTENTION!! - Please note that you NEED to install the optional dependencies to run the examples in full. This is mainly for installing the Jupyter notebook extensions, matplotlib and other visualization packages. In whatever environment you install this package, make sure to install with all dependencies. As an example, for UV this would be evoking:
|
22
|
+
```bash
|
23
|
+
uv sync --all-extras
|
24
|
+
```
|
25
|
+
while inside the root of the project, for syncing the environment.
|
22
26
|
|
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/
|
27
|
+
[<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
28
|
|
25
29
|
[<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
30
|
|
@@ -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**
|
@@ -20,6 +20,7 @@ class TimeSeriesExpConfig(BaseExpConfig):
|
|
20
20
|
laser_powers_active: List[float]
|
21
21
|
laser_positions_active: List
|
22
22
|
xyoffset: Tuple[float, float]
|
23
|
+
scanning: bool = False
|
23
24
|
|
24
25
|
exposure_time: Optional[int] = None
|
25
26
|
interval_time: Optional[int] = None
|
@@ -61,6 +62,8 @@ class zStackExpConfig(BaseExpConfig):
|
|
61
62
|
exposure_time: int
|
62
63
|
interval_time: int
|
63
64
|
|
65
|
+
scanning: bool = False
|
66
|
+
|
64
67
|
def __post_init__(self):
|
65
68
|
len_ln = len(self.laser_names_active)
|
66
69
|
len_lpow = len(self.laser_powers_active)
|
@@ -94,6 +97,7 @@ def timeseriesEXP(
|
|
94
97
|
duration_total=config.duration_time,
|
95
98
|
exposure_time=config.exposure_time,
|
96
99
|
interval_time=config.interval_time,
|
100
|
+
scanning=config.scanning,
|
97
101
|
)
|
98
102
|
return np.array([frames]), metadata
|
99
103
|
|
@@ -112,6 +116,7 @@ def zseriesEXP(
|
|
112
116
|
duration_total=config.exposure_time + config.interval_time,
|
113
117
|
exposure_time=config.exposure_time,
|
114
118
|
interval_time=config.interval_time,
|
119
|
+
scanning=config.scanning,
|
115
120
|
)
|
116
121
|
frames.append(f)
|
117
122
|
# m.Channel = {"name": microscope.channels.names}
|
{ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/motion/movement/boundary_conditions.py
RENAMED
@@ -5,7 +5,7 @@ Removal Time: NDY (not determined yet)
|
|
5
5
|
|
6
6
|
import numpy as np
|
7
7
|
|
8
|
-
from
|
8
|
+
from ....utils.decorators import _catch_recursion_error, deprecated
|
9
9
|
|
10
10
|
# Reflecting boundary condition which is a recursive function so that even if the first candidate
|
11
11
|
# is out of the space limit, the function will keep calling itself until the candidate is within the space limit
|
@@ -3,6 +3,7 @@ from typing import Callable, List, Optional, Tuple
|
|
3
3
|
|
4
4
|
import numpy as np
|
5
5
|
|
6
|
+
from ...utils.constants import H_C_COM
|
6
7
|
from ..optics.camera.detectors import photon_noise
|
7
8
|
from ..optics.camera.quantum_eff import QuantumEfficiency
|
8
9
|
from ..optics.filters.filters import FilterSpectrum
|
@@ -11,7 +12,6 @@ from ..sample.flurophores.flurophore_schema import (
|
|
11
12
|
SpectralData,
|
12
13
|
WavelengthDependentProperty,
|
13
14
|
)
|
14
|
-
from ..utils.constants import H_C_COM
|
15
15
|
|
16
16
|
|
17
17
|
@dataclass
|
{ams_bp-0.4.22/src/AMS_BP → ams_bp-0.4.40/src/AMS_BP/core}/sample/flurophores/flurophore_schema.py
RENAMED
@@ -4,7 +4,7 @@ from typing import Any, Callable, Dict, List, Optional, TypeVar
|
|
4
4
|
import numpy as np
|
5
5
|
from pydantic import BaseModel, Field, field_validator
|
6
6
|
|
7
|
-
from
|
7
|
+
from ....utils.constants import H_C_COM, N_A
|
8
8
|
|
9
9
|
NumericType = TypeVar("NumericType", float, np.ndarray, List[float])
|
10
10
|
|
@@ -3,6 +3,7 @@ from typing import Callable, Dict, List, Literal, Optional, Tuple, Union
|
|
3
3
|
|
4
4
|
import numpy as np
|
5
5
|
|
6
|
+
from ..utils.util_functions import ms_to_seconds
|
6
7
|
from .configio.configmodels import ConfigList
|
7
8
|
from .metadata.metadata import MetaData
|
8
9
|
from .optics.camera.detectors import Detector
|
@@ -18,7 +19,6 @@ from .photophysics.photon_physics import (
|
|
18
19
|
from .photophysics.state_kinetics import StateTransitionCalculator
|
19
20
|
from .sample.flurophores.flurophore_schema import StateType, WavelengthDependentProperty
|
20
21
|
from .sample.sim_sampleplane import EMPTY_STATE_HISTORY_DICT, SamplePlane
|
21
|
-
from .utils.util_functions import ms_to_seconds
|
22
22
|
|
23
23
|
|
24
24
|
class VirtualMicroscope:
|
@@ -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,
|
@@ -17,11 +18,12 @@ from PyQt6.QtWidgets import (
|
|
17
18
|
QWidget,
|
18
19
|
)
|
19
20
|
|
20
|
-
from ..logging.logutil import LoggerManager
|
21
|
-
from ..logging.setup_run_directory import setup_run_directory
|
22
|
-
from .logging_window import LogWindow
|
21
|
+
from ..tools.logging.logutil import LoggerManager
|
22
|
+
from ..tools.logging.setup_run_directory import setup_run_directory
|
23
23
|
from .sim_worker import SimulationWorker
|
24
|
-
from .
|
24
|
+
from .widgets.utility_widgets.toggleswitch_widget import ToggleSwitch
|
25
|
+
from .windows.logging_window import LogWindow
|
26
|
+
from .windows.template_window_selection import TemplateSelectionWindow
|
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()
|
@@ -2,7 +2,9 @@ from pathlib import Path
|
|
2
2
|
|
3
3
|
from PyQt6.QtCore import QObject, pyqtSignal
|
4
4
|
|
5
|
-
from ..
|
5
|
+
from ..core.configio.convertconfig import load_config, setup_microscope
|
6
|
+
from ..core.configio.saving import save_config_frames
|
7
|
+
from ..tools.logging.logutil import LogEmitter
|
6
8
|
|
7
9
|
|
8
10
|
class SimulationWorker(QObject):
|
@@ -20,9 +22,6 @@ class SimulationWorker(QObject):
|
|
20
22
|
try:
|
21
23
|
self.emitter.message.emit(f"Starting simulation for {self.config_path}")
|
22
24
|
|
23
|
-
from ..configio.convertconfig import load_config, setup_microscope
|
24
|
-
from ..configio.saving import save_config_frames
|
25
|
-
|
26
25
|
loadedconfig = load_config(self.config_path)
|
27
26
|
|
28
27
|
if "version" in loadedconfig:
|
@@ -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
|
+
}
|
@@ -0,0 +1,85 @@
|
|
1
|
+
/* Light Theme */
|
2
|
+
* {
|
3
|
+
font-family: "Segoe UI", "Arial", sans-serif;
|
4
|
+
font-size: 14px;
|
5
|
+
color: #2b2b2b;
|
6
|
+
}
|
7
|
+
|
8
|
+
QWidget {
|
9
|
+
background-color: #f5f7fa;
|
10
|
+
}
|
11
|
+
|
12
|
+
QLabel {
|
13
|
+
color: #333;
|
14
|
+
}
|
15
|
+
|
16
|
+
QPushButton {
|
17
|
+
background-color: #007acc;
|
18
|
+
color: white;
|
19
|
+
border-radius: 6px;
|
20
|
+
padding: 6px 12px;
|
21
|
+
}
|
22
|
+
QPushButton:hover {
|
23
|
+
background-color: #005f9e;
|
24
|
+
}
|
25
|
+
QPushButton:pressed {
|
26
|
+
background-color: #004d80;
|
27
|
+
}
|
28
|
+
|
29
|
+
QLineEdit, QComboBox, QSpinBox, QDoubleSpinBox, QTextEdit {
|
30
|
+
background-color: white;
|
31
|
+
border: 1px solid #ccc;
|
32
|
+
border-radius: 4px;
|
33
|
+
padding: 4px;
|
34
|
+
}
|
35
|
+
|
36
|
+
QGroupBox {
|
37
|
+
border: 1px solid #d6d9dc;
|
38
|
+
border-radius: 6px;
|
39
|
+
margin-top: 10px;
|
40
|
+
}
|
41
|
+
QGroupBox:title {
|
42
|
+
subcontrol-origin: margin;
|
43
|
+
subcontrol-position: top left;
|
44
|
+
padding: 0 6px;
|
45
|
+
font-weight: bold;
|
46
|
+
color: #555;
|
47
|
+
}
|
48
|
+
|
49
|
+
QTabWidget::pane {
|
50
|
+
border: 1px solid #d1dbe3;
|
51
|
+
background: #ffffff;
|
52
|
+
border-radius: 6px;
|
53
|
+
}
|
54
|
+
|
55
|
+
QTabBar::tab {
|
56
|
+
background: #e6ebf1;
|
57
|
+
border: 1px solid #cfd7df;
|
58
|
+
padding: 6px 12px;
|
59
|
+
border-top-left-radius: 6px;
|
60
|
+
border-top-right-radius: 6px;
|
61
|
+
}
|
62
|
+
QTabBar::tab:selected {
|
63
|
+
background: #ffffff;
|
64
|
+
border-bottom-color: #ffffff;
|
65
|
+
}
|
66
|
+
|
67
|
+
QScrollArea {
|
68
|
+
border: none;
|
69
|
+
}
|
70
|
+
|
71
|
+
QListWidget {
|
72
|
+
background-color: #f0f0f0;
|
73
|
+
border-right: 1px solid #ccc;
|
74
|
+
}
|
75
|
+
|
76
|
+
QListWidget::item {
|
77
|
+
padding: 6px;
|
78
|
+
border-radius: 4px;
|
79
|
+
}
|
80
|
+
|
81
|
+
QListWidget::item:selected {
|
82
|
+
background-color: #007acc;
|
83
|
+
color: white;
|
84
|
+
}
|
85
|
+
|