lephare.prepare

Functions

prepare(config[, star_config, gal_config, qso_config])

Run the prepare stages of LePHARE

overwrite_config(config1, config2)

Check that two config can be safely broadcast for a joint run

read_yaml_config(yaml_file_path)

Open a standard yaml file and render it as a dictionary of keywords

write_yaml_config(keymap, yaml_file_path)

Write a dictionary of keywords to a yaml file

write_para_config(keymap, para_file_path)

Write a dictionary of keywords to a para file

keymap_to_string_dict(keymap)

Convert a dictionary of keywords to a dictionary of strings

string_dict_to_keymap(string_dict)

Convert a dictionary of strings to a dictionary of keywords

all_types_to_keymap(input_config)

Convert all types of configs to keymap

Module Contents

prepare(config, star_config=_DEFAULT, gal_config=_DEFAULT, qso_config=_DEFAULT)[source]

Run the prepare stages of LePHARE

In order to run “zphota” we must create the filter files, run sedtolib to create the SED libraries, and finally run mag_gal, to create the magnitude libararies. We abstract these tasks into a single prepare stage.

We overide the config for each type if distinct config set. If no overide configs are set we use the same for each type.

Parameters:
  • config (dict of lephare.keyword) – The config base to run all tasks

  • star_config (dict of lephare.keyword or None) – Config values to override for stars. If None do not run.

  • gal_config (dict of lephare.keyword or None) – Config values to override for galaxies. If None do not run.

  • qso_config (dict of lephare.keyword or None) – Config values to override for QSO. If None do not run.

overwrite_config(config1, config2)[source]

Check that two config can be safely broadcast for a joint run

read_yaml_config(yaml_file_path)[source]

Open a standard yaml file and render it as a dictionary of keywords

Parameters:

yaml_file_path (str) – Path to input yaml file.

write_yaml_config(keymap, yaml_file_path)[source]

Write a dictionary of keywords to a yaml file

Parameters:
  • keymap (dict of lephare.keyword) – The dictionary of keywords to be written to yaml.

  • yaml_file_path (str) – Path to output yaml file.

write_para_config(keymap, para_file_path)[source]

Write a dictionary of keywords to a para file

Parameters:
  • keymap (dict of lephare.keyword) – The dictionary of keywords to be written to yaml.

  • para_file_path (str) – Path to output para file.

keymap_to_string_dict(keymap)[source]

Convert a dictionary of keywords to a dictionary of strings

string_dict_to_keymap(string_dict)[source]

Convert a dictionary of strings to a dictionary of keywords

all_types_to_keymap(input_config)[source]

Convert all types of configs to keymap