AstroProjector

class sofia_redux.scan.coordinate_systems.projector.astro_projector.AstroProjector(projection)[source]

Bases: Projector2D

Initialize an astronomical projector.

The astronomical projector is an extension of the 2-dimensional projector, used to store coordinates and projection offsets. It is designed to better deal with astronomical coordinates (celestial coordinates), and other spherical coordinate types.

Such coordinates will be taken from the projection reference coordinate. If those reference coordinates are celestial in nature, they will be converted to equatorial coordinates (if not already) and stored for subsequent use. In these cases, one will always have access to the projected/deprojected coordinates in both the original celestial frame, and an equatorial frame.

Parameters:
projectionProjection2D

Methods Summary

copy()

Return a full copy of the Projector2D

deproject([offsets, coordinates])

Deproject offsets onto coordinates.

is_focal_plane()

Return whether the stored coordinates are focal plane coordinates.

is_horizontal()

Return whether the stored coordinates are horizontal.

project_from_equatorial([offsets])

Project the stored equatorial coordinates to offsets.

set_reference_coordinates()

Set the reference coordinates from the stored projection reference.

Methods Documentation

copy()[source]

Return a full copy of the Projector2D

Returns:
AstroProjector
deproject(offsets=None, coordinates=None)[source]

Deproject offsets onto coordinates.

If a celestial coordinate frame has been defined, it will be updated using the newly calculated equatorial coordinates if present.

Parameters:
offsetsCoordinate2D, optional

The offsets to deproject. If not supplied, defaults to the offsets stored in the projector.

coordinatesCoordinate2D, optional

The coordinates to hold the results. If not supplied, defaults to the coordinates stored in the projector.

Returns:
coordinatesCoordinate2D
is_focal_plane()[source]

Return whether the stored coordinates are focal plane coordinates.

Returns:
bool
is_horizontal()[source]

Return whether the stored coordinates are horizontal.

Returns:
bool
project_from_equatorial(offsets=None)[source]

Project the stored equatorial coordinates to offsets.

During this process, celestial coordinates will be updated to be equivalent to the equatorial coordinates in the celestial frame.

Parameters:
offsetsCoordinate2D, optional

The coordinates used to store the results. If not supplied, defaults to the projector stored offsets.

Returns:
offsetsCoordinate2D
set_reference_coordinates()[source]

Set the reference coordinates from the stored projection reference.

If a celestial coordinate frame has been defined and equatorial coordinates exist, the celestial coordinates will be updated to the equivalent equatorial coordinates in the celestial frame.

Returns:
None