FlatGrid2D

class sofia_redux.scan.coordinate_systems.grid.flat_grid_2d.FlatGrid2D[source]

Bases: Grid2D

Initialize a flat 2-dimensional grid.

The flat grid consists of two (x, y) Cartesian axes. Grid projections occur in relation to a single reference coordinate (at the origin by default).

The flat grid is used to convert from 2D Cartesian (x, y) coordinates to offsets in relation to a specified reference onto a regular grid, and the reverse operation.

Forward transform: grid projection -> offsets -> coordinates Reverse transform: coordinates -> offsets -> grid projection

Methods Summary

copy()

Return a copy of the FlatGrid2D.

edit_header(header)

Edit a FITS header with the grid information.

get_coordinate_instance_for(name)

Return a coordinate instance for the given name.

parse_header(header)

Parse a FITS header and apply to the grid.

parse_projection(header)

Parse the projection from the header.

set_defaults()

Set the default values for the grid.

set_projection(value)

Set the grid projection.

Methods Documentation

copy()[source]

Return a copy of the FlatGrid2D.

Returns:
FlatGrid2D
edit_header(header)[source]

Edit a FITS header with the grid information.

Parameters:
headerfits.Header
Returns:
None
classmethod get_coordinate_instance_for(name)[source]

Return a coordinate instance for the given name.

Parameters:
namestr
Returns:
Coordinate2D
parse_header(header)[source]

Parse a FITS header and apply to the grid.

Parameters:
headerfits.Header
Returns:
None
parse_projection(header)[source]

Parse the projection from the header.

Parameters:
headerfits.Header
Returns:
None
set_defaults()[source]

Set the default values for the grid.

The defaults for the FlatGrid2D are cartesian (x, y) axes and a DefaultProjection2D projection.

Returns:
None
set_projection(value)[source]

Set the grid projection.

Parameters:
valueProjection2D
Returns:
None