SofiaInfo

class sofia_redux.scan.custom.sofia.info.info.SofiaInfo(configuration_path=None)[source]

Bases: WeatherInfo, CameraInfo

Initialize a SofiaInfo object.

The SOFIA information contains metadata on various parts of an observation that are specific to SOFIA.

Parameters:
configuration_pathstr, optional

An alternate directory path to the configuration tree to be used during the reduction. The default is <package>/data/configurations.

Methods Summary

add_history(header[, scans])

Add HISTORY messages to a FITS header.

append_history_message(message)

Add a FITS history message for later addition to a FITS header.

apply_configuration()

Apply a configuration to the information.

edit_header(header)

Edit a scan header with available information.

edit_image_header(header[, scans])

Edit an image header with available information.

get_ambient_humidity()

Get the ambient humidity.

get_ambient_kelvins()

Get the ambient temperature in Kelvins.

get_ambient_pressure()

Get the ambient pressure.

get_file_id()

Return the file ID.

get_lowest_quality(scans)

Return the lowest quality processing flag from a list of scans.

get_name()

Return the name of the instrument.

get_plate_scale(angular_size, physical_size)

Return plate scaling.

get_si_pixel_size()

Get the science instrument pixel size.

get_total_exposure_time([scans])

Return the total integration time for a list of scans.

get_wind_direction()

Return the wind direction.

get_wind_peak()

Return the wind peak.

get_wind_speed()

Return the wind speed.

has_tracking_error(scans)

Report whether any scan in a set contains a telescope tracking error.

parse_history(header)

Parse all history messages in the header to the scan info.

read_configuration([configuration_file, ...])

Read and apply a configuration file.

register_config_file(filename)

Register a configuration file in the history and for reference.

validate_scans(scans)

Validate a list of scans specific to the instrument

Methods Documentation

add_history(header, scans=None)[source]

Add HISTORY messages to a FITS header.

Parameters:
headerastropy.io.fits.header.Header

The header to update with HISTORY messages.

scanslist (Scan), optional

A list of scans to add HISTORY messages from if necessary.

Returns:
None
append_history_message(message)[source]

Add a FITS history message for later addition to a FITS header.

Parameters:
messagestr or list (str)

The history message(s) to add.

Returns:
None
apply_configuration()[source]

Apply a configuration to the information.

Returns:
None
edit_header(header)[source]

Edit a scan header with available information.

Parameters:
headerastropy.fits.Header

The FITS header to apply.

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

Edit an image header with available information.

Parameters:
headerastropy.fits.Header

The FITS header to apply.

scanslist (Scan), optional

A list of scans to use during editing.

Returns:
None
get_ambient_humidity()[source]

Get the ambient humidity.

Returns:
humidityunits.Quantity
get_ambient_kelvins()[source]

Get the ambient temperature in Kelvins.

Returns:
kelvinsunits.Quantity
get_ambient_pressure()[source]

Get the ambient pressure.

Returns:
pressureunits.Quantity
abstract get_file_id()[source]

Return the file ID.

Returns:
str
static get_lowest_quality(scans)[source]

Return the lowest quality processing flag from a list of scans.

Parameters:
scanslist (Scan)

A list of scans from which to determine the lowest quality processing level.

Returns:
QualityFlagTypes
get_name()[source]

Return the name of the instrument.

Returns:
namestr
static get_plate_scale(angular_size, physical_size)[source]

Return plate scaling.

The plate scaling is in radians/m for the focal plane projected through the telescope.

Parameters:
angular_sizelist (astropy.units.Quantity or float)

x, y angles representing the projected angular size on the sky. If float values are used, must be supplied in radians.

physical_sizelist (astropy.units.Quantity or float)

x, y physical/geometric size on the focal plane unit. If float values are used, must be in meters.

Returns:
plate_scaleastropy.units.Quantity
abstract get_si_pixel_size()[source]

Get the science instrument pixel size.

Returns:
sizeCoordinate2D

The (x, y) pixel sizes, each of which is a units.Quantity.

static get_total_exposure_time(scans=None)[source]

Return the total integration time for a list of scans.

Parameters:
scanslist (Scan), optional

A list of scans from which to get the total integration time.

Returns:
timeastropy.units.Quantity
get_wind_direction()[source]

Return the wind direction.

Returns the tail vs. head wind.

Returns:
directionunits.Quantity
get_wind_peak()[source]

Return the wind peak.

Returns:
speedunits.Quantity
get_wind_speed()[source]

Return the wind speed.

Returns:
speedunits.Quantity
static has_tracking_error(scans)[source]

Report whether any scan in a set contains a telescope tracking error.

Parameters:
scanslist (SofiaScan)

A list of scans.

Returns:
tracking_errorbool

True if any scan contains a telescope tracking error. False otherwise.

parse_history(header)[source]

Parse all history messages in the header to the scan info.

Parameters:
headerastropy.io.fits.Header
Returns:
None
read_configuration(configuration_file='default.cfg', validate=True)[source]

Read and apply a configuration file.

Parameters:
configuration_filestr, optional

Path to, or name of, a configuration file.

validatebool, optional

If True (default), validate information read from the configuration file.

Returns:
None
register_config_file(filename)[source]

Register a configuration file in the history and for reference.

Parameters:
filenamestr
Returns:
None
validate_scans(scans)[source]

Validate a list of scans specific to the instrument

Parameters:
scanslist (SofiaScan)

A list of scans.

Returns:
None