DefaultProjection2D¶
- class sofia_redux.scan.coordinate_systems.projection.default_projection_2d.DefaultProjection2D[source]¶
Bases:
Projection2D
Initialize a default 2-dimensional Cartesian projection.
The default 2-dimensional projection is a very simple projection in which projected and deprojected native coordinates are equivalent in a Cartesian (x, y) system.
Methods Summary
deproject
(projected[, coordinates])Deproject a projection onto coordinates.
edit_header
(header[, alt])Edit a FITS header with the projection information.
Return a coordinate instance for this grid type.
Return the FITS ID for the projection.
Return the full name for the projection.
parse_header
(header[, alt])Parse and apply a FITS header to the projection.
project
(coordinates[, projected])Project the coordinates.
Methods Documentation
- deproject(projected, coordinates=None)[source]¶
Deproject a projection onto coordinates.
Converts offsets w.r.t a reference position to coordinates. Note that the deprojected coordinates will always be a Coordinate2D representation of the input 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.
- 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
- get_coordinate_instance()[source]¶
Return a coordinate instance for this grid type.
For the DefaultProjection2D, a Coordinate2D instance will always be returned.
- Returns:
- Coordinate2D
- 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
- project(coordinates, projected=None)[source]¶
Project the coordinates.
Converts coordinates to offsets w.r.t. a reference position. Note that the projected coordinates will always be a Coordinate2D representation of the input coordinates.
- Parameters:
- coordinatesCoordinate2D
The coordinates to project.
- projectedCoordinate2D, optional
The output coordinates. Will be created if not supplied.
- Returns:
- projectedCoordinate2D
The projected coordinates.