sorcha.modules.PPGetMainFilterAndColourOffsets

Functions

PPGetMainFilterAndColourOffsets(filename, ...)

Function to obtain the main filter (i.e. the filter in which H is

Module Contents

PPGetMainFilterAndColourOffsets(filename, observing_filters, filesep)[source]

Function to obtain the main filter (i.e. the filter in which H is defined) from the header of the physical parameters file and then generate the expected colour offsets. Also makes sure that columns exist for all the expected colour offsets in the physical parameters file.

Parameters:
  • filename (string) -- The filename of the physical parameters file.

  • observing_filters (list of strings) -- The observation filters requested in the configuration file.

  • filesep (string) -- The format of the physical parameters file. Should be "csv"/"comma" or "whitespace".

Returns:

  • mainfilter (string) -- The main filter in which H is defined.

  • colour_offsets (list of strings) -- A list of the colour offsets present in the physical parameters file.

Notes

The main filter should be found as a column heading of H_[mainfilter]. If this format isn NOT followed, this function will error out.