SofiaProcessingInfo

class sofia_redux.scan.custom.sofia.info.processing.SofiaProcessingInfo[source]

Bases: InfoBase

Initialize the SOFIA processing information.

Contains information on the SOFIA processing parameters such as associated data, processing level, software versions, and data quality.

Attributes Summary

log_id

Return the string log ID for the info.

process_level_comment

Methods Summary

apply_configuration()

Update processing information with FITS header information.

edit_header(header)

Edit an image header with available information.

get_comment(level)

Return the FITS header comment for a given processing level.

get_level_name(level)

Return the level name.

get_processing(is_calibrated, dims, ...)

Return an updated processing information object.

get_product_type(dims)

Return the processing product type for a given number of dimensions.

get_table_entry(name)

Return a parameter value for the given name.

Attributes Documentation

log_id

Return the string log ID for the info.

The log ID is used to extract certain information from table data.

Returns:
str
process_level_comment = {0: 'Unknown processing level.', 1: 'Raw engineering/diagnostic data.', 2: 'Raw uncalibrated science data.', 3: 'Corrected/reduced science data.', 4: 'Flux-calibrated science data.', 5: 'Higher order product (e.g. composites).'}

Methods Documentation

apply_configuration()[source]

Update processing information with FITS header information.

Updates the information by taking the following keywords from the FITS header:

PROCSTAT - The processing level for the data (str)
HEADSTAT - The header state (str)
DATAQUAL - The data quality level (str)
N_SPEC - The number of spectra included (int)
PIPELINE - The software that created the file (str)
PIPEVERS - The full software version info (str)
PRODTYPE - The type of product (str)
FILEREV - The file revision identifier (str)
ASSC_AOR - Any associated AOR IDs (str)
ASSC_MSN - Any associated missions IDs (str)
ASSC_FRQ - Any associated frequencies (str)
Returns:
None
edit_header(header)[source]

Edit an image header with available information.

Parameters:
headerastropy.fits.Header

The FITS header to apply.

Returns:
None
get_comment(level)[source]

Return the FITS header comment for a given processing level.

Parameters:
levelstr or int or enum

The processing level.

Returns:
commentstr
static get_level_name(level)[source]

Return the level name.

Parameters:
levelstr or int
Returns:
level_namestr
get_processing(is_calibrated, dims, quality_level)[source]

Return an updated processing information object.

Parameters:
is_calibratedbool

If the data are calibrated.

dimsint

The number of dimensions in the data.

quality_levelenum.Enum

The quality level of the data as a flag.

Returns:
SofiaProcessingInfo
static get_product_type(dims)[source]

Return the processing product type for a given number of dimensions.

Parameters:
dimsint

The number of dimensions.

Returns:
product_typestr
get_table_entry(name)[source]

Return a parameter value for the given name.

Parameters:
namestr

The name of the parameter to retrieve.

Returns:
value