SofiaFrames

class sofia_redux.scan.custom.sofia.frames.frames.SofiaFrames[source]

Bases: HorizontalFrames

Initialize frames for SOFIA instruments.

The SOFIA frames expand on the HorizontalFrames class to include the global location of SOFIA, the precipitable water vapour, the equatorial coordinates of the observed object, UTC times, and vertical position angles for the instrument, telescope, and chopper.

Attributes Summary

default_field_types

Used to define the default values for data arrays.

Methods Summary

equatorial_to_telescope_offset(offset[, ...])

Convert equatorial offsets to telescope offsets.

native_equatorial_to_telescope_offset(offset)

Convert native equatorial offsets to telescope offsets.

project(position, projector[, indices])

Project positions to offsets.

telescope_to_equatorial_offset(offset[, ...])

Convert telescope offsets to equatorial offsets.

telescope_to_native_equatorial_offset(offset)

Convert telescope offsets to native equatorial offsets.

Attributes Documentation

default_field_types

Used to define the default values for data arrays.

Returns a dictionary of structure {field: default_value}. The default values have the following effects:

type - empty numpy array of the given type. value - full numpy array of the given value. astropy.units.Unit - empty numpy array (float) in the given unit. astropy.units.Quantity - full numpy array of the given quantity.

If a tuple is provided, the array will have additional axes appended such that the first element gives the type as above, and any additional integers give additional axes dimensions, e.g. (0.0, 2, 3) would result in a numpy array filled with zeros of shape (self.size, 2, 3).

Returns:
fieldsdict

Methods Documentation

equatorial_to_telescope_offset(offset, indices=None, in_place=True)[source]

Convert equatorial offsets to telescope offsets.

Parameters:
offsetCoordinate2D

The equatorial (x, y) offsets.

indicesint or slice or numpy.ndarray (int or bool)

The frame indices to update. The default is all frames.

in_placebool, optional

If True, modify the coordinates in place. Otherwise, return a copy of the offsets.

Returns:
telescope_offsetsCoordinate2D
native_equatorial_to_telescope_offset(offset, indices=None, in_place=True)[source]

Convert native equatorial offsets to telescope offsets.

Parameters:
offsetCoordinate2D

The native equatorial (x, y) offsets.

indicesint or slice or numpy.ndarray (int or bool)

The frame indices to update. The default is all frames.

in_placebool, optional

If True, modify the coordinates in place. Otherwise, return a copy of the offsets.

Returns:
telescope_offsetsCoordinate2D
project(position, projector, indices=None)[source]

Project positions to offsets.

Parameters:
positionCoordinate2D

The (x, y) focal plane offsets.

projectorProjector2D

The projector to store and determine the projected offsets.

indicesint or slice or numpy.ndarray (int or bool)

The frame indices to project.

Returns:
offsetCoordinate2D

The projected (x, y) offsets.

telescope_to_equatorial_offset(offset, indices=None, in_place=True)[source]

Convert telescope offsets to equatorial offsets.

Parameters:
offsetCoordinate2D

The telescope (x, y) offsets.

indicesint or slice or numpy.ndarray (int or bool)

The frame indices to update. The default is all frames.

in_placebool, optional

If True, modify the coordinates in place. Otherwise, return a copy of the offsets.

Returns:
equatorial_offsetsCoordinate2D
telescope_to_native_equatorial_offset(offset, indices=None, in_place=True)[source]

Convert telescope offsets to native equatorial offsets.

Parameters:
offsetCoordinate2D

The telescope (x, y) offsets.

indicesint or slice or numpy.ndarray (int or bool)

The frame indices to update. The default is all frames.

in_placebool, optional

If True, modify the coordinates in place. Otherwise, return a copy of the offsets.

Returns:
native_equatorial_offsetsCoordinate2D