picadae calibration programs
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

common.py 420B

12345678910111213141516171819
  1. ##| Copyright: (C) 2019-2020 Kevin Larke <contact AT larke DOT org>
  2. ##| License: GNU GPL version 3.0 or above. See the accompanying LICENSE file.
  3. import yaml,types
  4. def parse_yaml_cfg( fn ):
  5. """Parse the YAML configuration file."""
  6. cfg = None
  7. with open(fn,"r") as f:
  8. cfgD = yaml.load(f, Loader=yaml.FullLoader)
  9. cfg = types.SimpleNamespace(**cfgD['p_ac'])
  10. return cfg