superphot_pipeline.astrometry package

Class Inheritance Diagram

Inheritance diagram of Transformation

Module implementing the low-level astrometry.

class superphot_pipeline.astrometry.Transformation(trans_fname=None)[source]

Bases: object

Inheritance diagram of superphot_pipeline.astrometry.Transformation

A clas that applies transformations generated by anmatch.

__call__(sources, save_intermediate=False)[source]

Return the x and y coordinates to which the given (ra, dec) project to.

Parameters:
  • sources – The sky position to project to frame coordinates. Should have keys named ‘RA’ and ‘Dec’ in degrees.
  • save_intermediate – Should the intermediate coordinates be saved. Those are the coordinates after apllying the sky projection and before applying the polynomial transformation.
Returns:

The position in pixels relative to the lower left

frame of the corner to which the given sky position projects under the currently defined transformation, as a numpy array with fields named ‘x’ and ‘y’. If save_intermediate is True, the result also contains fields called ‘xi’ and ‘eta’ containing the intermediate coordinates.

Return type:

projected

__init__(trans_fname=None)[source]

See set_transformation().

evaluate_polynomial(projected, transformed)[source]

Apply the currently defined polynomial transfomation to (xi, eta).

Parameters:
  • projected – The projected (c.f. gnomonic_projection()) coordinates to transform. Should have ‘xi’ and ‘eta’ keys containing the projected coordinates to transform in degrees.
  • transformed – A numpy array with ‘x’ and ‘y’ fields to fill with the transformed coordinates (in pixels).
Returns:

None

gnomonic_projection(sources, projected)[source]

Project the given sky position to a tangent plane (gnomonic projection).

Parameters:
  • sources – The the sky position to project (should have ‘RA’ and ‘Dec’ keys coordinates in degrees.
  • projected – A numpy array with ‘xi’ and ‘eta’ fields to fill with the projected coordinates (in degrees).
Returns:

None

read_anmatch_transformation(trans_fname)[source]

Parse the transformation to apply from the given file.

Parameters:trans_fname – The name of the transformation to parse for the transformation to apply.
Returns:None