Projector2D

class sofia_redux.scan.coordinate_systems.projector.projector_2d.Projector2D(projection)[source]

Bases: ABC

Initialize a 2-D projector.

The 2-dimensional projector is a wrapper around a given projector to store given coordinates, projection offsets, and translate between the two if necessary. The default coordinates are taken from the projector reference position, and a clean set of offsets are created on initialization.

Parameters:
projectionProjection2D

Methods Summary

copy()

Return a full copy of the Projector2D

deproject([offsets, coordinates])

Deproject offsets onto coordinates.

project([coordinates, offsets])

Project the coordinates to an offset.

set_reference_coordinates()

Sets the projector coordinates from the projection reference position.

Methods Documentation

copy()[source]

Return a full copy of the Projector2D

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

Deproject offsets onto coordinates.

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
project(coordinates=None, offsets=None)[source]

Project the coordinates to an offset.

Parameters:
coordinatesCoordinate2D, optional

The coordinates to project. If not supplied, defaults to the stored coordinates.

offsetsCoordinate2D, optional

The output offsets to update with the results. If not supplied, defaults to a set stored in the projector.

Returns:
offsetsCoordinate2D
set_reference_coordinates()[source]

Sets the projector coordinates from the projection reference position.

Returns:
None