pysilcam.config module¶
PySilCam configuration handling.
-
class
pysilcam.config.PySilcamSettings(config)¶ Bases:
objectClass for SilCam settings
-
pysilcam.config.default_config_path()¶ return the path to the default config file
- Returns
path to the default config file
- Return type
path_to_config (str)
-
pysilcam.config.load_camera_config(filename, config=None)¶ Load camera config file and validate content
- Parameters
filename (str) – filename including path to camera config file
config=None (dict) – a dictionnary to store key-values. If config does not exist, an empty dict is created
- Returns
with key value pairs of camera settings
- Return type
dict()
-
pysilcam.config.load_config(filename)¶ Load config file and validate content
- Parameters
filename (str) – filename including path
- Raises
RuntimeError – when file could not be read
- Returns
with the file parsed
- Return type
ConfigParser
-
pysilcam.config.settings_from_h5(h5file)¶ extracts PySilCamSettings from an exported hdf5 file created from silcam process
- Parameters
h5file – created by pysilcam export functionality
- Returns
Settings
-
pysilcam.config.updatePathLength(settings, logger)¶ Adjusts the path length of systems with the actuator installed and RS232 connected.
- Parameters
settings (PySilcamSettings) – Settings read from a .ini file settings.logfile is optional settings.loglevel mest exist
logger (logger object) – logger object created using configure_logger()