Projection2D¶
- class sofia_redux.scan.coordinate_systems.projection.projection_2d.Projection2D[source]¶
Bases:
ABC
Initialize an abstract 2D projection.
The 2D projection is used to convert between real coordinates and a projection of those coordinates with respect to a reference position.
Attributes Summary
Return the reference position.
Methods Summary
copy
()Return a copy of the projection.
deproject
(projected[, coordinates])Deproject a projection onto coordinates.
edit_header
(header[, alt])Edit a FITS header with the projection information.
Return a coordinate instance relevant to the projection.
get_deprojected
(projected)Return the de-projected coordinates.
Return the FITS ID for the projection.
Return the full name for the projection.
get_projected
(coordinates)Return the projected coordinates.
Return the reference position.
parse_header
(header[, alt])Parse and apply a FITS header to the projection.
project
(coordinates[, projected])Project the coordinates.
set_reference
(value)Set the reference position.
Attributes Documentation
- reference¶
Return the reference position.
- Returns:
- Coordinate2D
Methods Documentation
- abstract deproject(projected, coordinates=None)[source]¶
Deproject a projection onto coordinates.
Converts offsets w.r.t a reference position to coordinates.
- Parameters:
- projectedCoordinate2D
The projected coordinates to deproject.
- coordinatesCoordinate2D, optional
The output deprojected coordinates. Will be created if not supplied.
- Returns:
- coordinatesCoordinate2D
The deprojected coordinates.
- abstract edit_header(header, alt='')[source]¶
Edit a FITS header with the projection information.
- Parameters:
- headerfits.Header
The FITS header to edit.
- altstr, optional
The alternate FITS system.
- Returns:
- None
- abstract get_coordinate_instance()[source]¶
Return a coordinate instance relevant to the projection.
- Returns:
- coordinatesCoordinate2D
- get_deprojected(projected)[source]¶
Return the de-projected coordinates.
- Parameters:
- projectedCoordinate2D
- Returns:
- coordinatesCoordinate2D
- get_projected(coordinates)[source]¶
Return the projected coordinates.
- Parameters:
- coordinatesCoordinate2D
- Returns:
- projectedCoordinate2D
- abstract parse_header(header, alt='')[source]¶
Parse and apply a FITS header to the projection.
- Parameters:
- headerfits.Header
The FITS header to parse.
- altstr, optional
The alternate FITS system.
- Returns:
- None
- abstract project(coordinates, projected=None)[source]¶
Project the coordinates.
Converts coordinates to offsets w.r.t. a reference position.
- Parameters:
- coordinatesCoordinate2D
The coordinates to project.
- projectedCoordinate2D, optional
The output coordinates. Will be created if not supplied.
- Returns:
- projectedCoordinate2D
The projected coordinates.