lephare.runner

Classes

Runner

Runner is the base class of the classes Filter, Sedtolib, MagGal, and Zphota,

Module Contents

class Runner(config_keys=None, config_file=None, config_keymap=None, **kwargs)[source]

Runner is the base class of the classes Filter, Sedtolib, MagGal, and Zphota, responsible to drive the execution of the filter, sedtolib, mag_gal, and zphota scripts, respectively.

Configuration of the classes uses either a configuration file, a dictionary of key names and corresponding keyword objects, or set of key/values passed as arguments to the constructor

The order of precedence is : key/values pairs overwrite config_keymap entries, which themselves overwrite config_file entries.

Parameters:
  • config_keys (list or None, optional) – List of all admissible configuration keys, provided by the inheriting classes

  • config_file (string or None, optional) – Path to a configuration file in LePHARE .para format

  • config_keymap (dict or None, optional) – Dictionary of configuration values provided as ‘key/keyword object’ pairs.

keymap[source]
config = ''[source]
verbose = False[source]
typ = None[source]
timer = False[source]
config_keys = None[source]
parse_config_file(filename)[source]

Load config file and set config values.

Parameters:

filename (string) – Path to config file

config_parser()[source]

Create command line config parser from list of keys

run(**kwargs)[source]
end()[source]
add_authorized_keys()[source]

Add authorized keys in config keys to the parser

validate_config_dict(input_dict, no_raise=True)[source]

Check that the input dictionary match the licit arguments

update_help()[source]

Method to be overloaded by ineriting classes