Utils

Utility functions used in other scripts.

sigmas.simulations.utils.get_scopesim_inst_pkgs_path(path)

Get the path to the instrument packages directory. Currently always looks in the current working directory. :return: None

sigmas.simulations.utils.ensure_packages_installed(file_path)

Ensure required packages are installed in the current working directory, otherwise downloads the needed files.

Returns:

None

sigmas.simulations.utils.save_fits(file, path='')

Save a fits file to disk.

Parameters:
  • file (str) – Path of the fits file to write to disk.

  • path (str) – Path to the location where the file should be saved.

Return type:

None

sigmas.simulations.utils.update_yaml(file, changes)

Update the contents of a yaml file.

Parameters:
  • file (str) – The path to the yaml file.

  • changes (dict) – A dictionary containing the changes done to the yaml file. A colon is used for nesting.

Returns:

None

sigmas.simulations.utils.yaml_updates(mode, source, exp)

A function containing the different yaml parameters used in the simulation.

Returns:

A nested dictionary containing the parameters.

Return type:

dict