InfoBase

class sofia_redux.scan.info.base.InfoBase[source]

Bases: ABC

Initialize a basic informational object.

This provides the template from which all specific information objects are founded. All contain a configuration from which they extract FITS header options and process accordingly.

Following a reduction, they should also be able to parse their information back to a FITS header for inclusion in the final output product and may or may not perform additional operation on scans.

Attributes Summary

UNKNOWN_FLOAT_VALUE

UNKNOWN_INT_VALUE

UNKNOWN_STRING_VALUE

log_id

Return the string log ID for the info.

log_prefix

Return the log prefix of the information object.

options

Return the FITS header options.

referenced_attributes

Return a set of attribute names that should be referenced during copy.

Methods Summary

apply_configuration()

Apply the configuration to the information.

apply_scan(scan)

Apply scan information to the information.

copy()

Return a full copy of the information.

edit_image_header(header[, scans])

Edit an image header with available information.

edit_scan_header(header[, scans])

Edit a scan header with available information.

get_table_entry(name)

Given a name, return the parameter stored in the information object.

merge(last)

Set end of any range values to the last ranged end value.

parse_image_header(header)

Apply settings from a FITS image header.

set_configuration(configuration)

Set the configuration for the information.

set_scan(scan)

Set the scan applicable to the information.

valid_header_value(value)

Check whether a header value is valid.

validate()

Validate the data obtained from FITS header and configuration

validate_scan(scan)

Validate scan information with THIS information.

Attributes Documentation

UNKNOWN_FLOAT_VALUE = -9999.0
UNKNOWN_INT_VALUE = -9999
UNKNOWN_STRING_VALUE = 'UNKNOWN'
log_id

Return the string log ID for the info.

Returns:
str
log_prefix

Return the log prefix of the information object.

This is used to specify table entries for extraction.

Returns:
str
options

Return the FITS header options.

Returns:
FitsOptions
referenced_attributes

Return a set of attribute names that should be referenced during copy.

Returns:
set (str)

Methods Documentation

apply_configuration()[source]

Apply the configuration to the information.

Returns:
None
apply_scan(scan)[source]

Apply scan information to the information.

Parameters:
scanScan
Returns:
None
copy()[source]

Return a full copy of the information.

Returns:
InfoBase
edit_image_header(header, scans=None)[source]

Edit an image header with available information.

Parameters:
headerastropy.io.fits.header.Header

The FITS header to edit.

scanslist (Scan), optional

A list of scans to use during editing.

Returns:
None
edit_scan_header(header, scans=None)[source]

Edit a scan header with available information.

Parameters:
headerastropy.io.fits.header.Header

The FITS header to edit.

scanslist (Scan), optional

A list of scans to use during editing.

Returns:
None
get_table_entry(name)[source]

Given a name, return the parameter stored in the information object.

Note that names do not exactly match to attribute names.

Parameters:
namestr
Returns:
value
merge(last)[source]

Set end of any range values to the last ranged end value.

Parameters:
lastInfoBase
Returns:
None
parse_image_header(header)[source]

Apply settings from a FITS image header.

Parameters:
headerastropy.fits.Header
Returns:
None
set_configuration(configuration)[source]

Set the configuration for the information.

Parameters:
configurationConfiguration
Returns:
None
set_scan(scan)[source]

Set the scan applicable to the information.

Parameters:
scanScan
Returns:
None
classmethod valid_header_value(value)[source]

Check whether a header value is valid.

Parameters:
valueNone or bool or int or str or float or Quantity
Returns:
validbool
validate()[source]

Validate the data obtained from FITS header and configuration

Returns:
None
validate_scan(scan)[source]

Validate scan information with THIS information.

Parameters:
scanScan
Returns:
None