microscope_automation.settings package¶
Submodules¶
microscope_automation.settings.meta_data_file module¶
Write meta data to file. Created on Oct 17, 2016
@author: winfriedw
-
class
microscope_automation.settings.meta_data_file.
MetaDataFile
(file_path, format='csv')[source]¶ Bases:
object
Class to save meta data associated with samples and images.
microscope_automation.settings.preferences module¶
Created on Jun 7, 2016 Part of microscope_automation Will read and return values for different configuration files
@author: winfriedw
-
class
microscope_automation.settings.preferences.
Preferences
(pref_path=None, pref_dict=None, parent_prefs=None)[source]¶ Bases:
object
Reads configuration files and will return Values
-
get_parent_prefs
()[source]¶ preferences objects that are created from a subset of preferences, keep a reference to the original preferences set.
- Input:
none
- Output:
parent_prefs: Object of class preferences of preferences that were source for current subset of preferences.
-
get_pref
(name, valid_values=None)[source]¶ Return value for key ‘name’ in preferences.
- Input:
name: string with key name
valid_values: list with allowed values. Throw exception if value is not valid. Default: do not check.
- Output:
pref: value for key ‘name’ in preferences
-
microscope_automation.settings.slidebook_experiment_info module¶
microscope_automation.settings.test_zen_experiment module¶
Test settings in ZEN experiment Created on Aug 17, 2018
@author: winfriedw
-
microscope_automation.settings.test_zen_experiment.
current_z_set
(settings)[source]¶ Test if Focus Strategy for z-stack acquisition is set to CurrentZ. Input:
settings: FocusSetup part of ZEN XML settings tree.
- Output:
is_valid: True if all instances FocusZStackMode are set to CurrentZ
-
microscope_automation.settings.test_zen_experiment.
test_FocusSetup
(experiment_object, verbose=True)[source]¶ Test if all focus settings are correct.
- Input:
experiment_object: object of class hardware.Experiment
verbose: if verbose == True print debug messages
- Output:
is_valid: True, if focus settings are valid
microscope_automation.settings.zen_experiment_info module¶
-
class
microscope_automation.settings.zen_experiment_info.
ZenExperiment
(experiment_path, experiment_name)[source]¶ Bases:
object
-
TAG_PATH_TILE_CENTER_XY
= '/HardwareExperiment/ExperimentBlocks/AcquisitionBlock/SubDimensionSetups/RegionsSetup/SampleHolder/TileRegions/TileRegion/CenterPosition'¶
-
TAG_PATH_TILE_CENTER_Z
= '/HardwareExperiment/ExperimentBlocks/AcquisitionBlock/SubDimensionSetups/RegionsSetup/SampleHolder/TileRegions/TileRegion/Z'¶
-
experiment_exists
()[source]¶ Function to check if the experiment name provided in the preference file exists in the Zen software
- Input:
none
- Output:
a boolean indicating if the experiment exists or not
-
get_focus_settings
()[source]¶ Function to get all the instances of focus settings in the experiment file
- Input:
none
- Output:
focus_settings: All instances of focus settings in experiment file
-
get_objective_position
()[source]¶ Return position of objective used in experiment. Method assumes that only one objective is used in experiment.
- Input:
None
- Output:
position: integer with position of objective used in experiment
-
get_tag_value
(tag_path)[source]¶ Function to find the value of a tag in the Zen Experiment file.
- Input:
experiment_name: Name of the experiment file
- Output:
tag_value: string value of the tag
-
is_tile_scan
()[source]¶ Test if experiment is tile scan.
- Input:
none
- Output:
is_tile_scan: True if experiment contains z-stack
-
is_z_stack
()[source]¶ Test if experiment is z-stack.
- Input:
none
- Output:
is_z_stack: True if experiment contains z-stack
-
update_tag_value
(tag_path, new_value)[source]¶ Function to update the value of a tag in the experiment xml file.
- Input:
tag_path: Path where the tag is loacted in the xml tree
new_value: The value that needs to be assigned to the tag (string)
- Output:
none
-
Module contents¶
Settings package for Microscope Automation.