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

reference

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.

get_coordinate_instance()

Return a coordinate instance relevant to the projection.

get_deprojected(projected)

Return the de-projected coordinates.

get_fits_id()

Return the FITS ID for the projection.

get_full_name()

Return the full name for the projection.

get_projected(coordinates)

Return the projected coordinates.

get_reference()

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

copy()[source]

Return a copy of the projection.

Returns:
Projection2D
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
abstract get_fits_id()[source]

Return the FITS ID for the projection.

Returns:
str
abstract get_full_name()[source]

Return the full name for the projection.

Returns:
str
get_projected(coordinates)[source]

Return the projected coordinates.

Parameters:
coordinatesCoordinate2D
Returns:
projectedCoordinate2D
get_reference()[source]

Return the reference position.

Returns:
referenceCoordinate2D
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.

set_reference(value)[source]

Set the reference position.

Parameters:
valueCoordinate2D
Returns:
None