autowisp.astrometry.transformation module

Class Inheritance Diagram

Inheritance diagram of ArgumentParser, DataReductionFile, DefaultsFormatter, Transformation, partial

Define class to apply sky-to-frame transformation stored in DR files.

class autowisp.astrometry.transformation.Transformation(dr_fname=None, **dr_path_substitutions)[source]

Bases: object

Inheritance diagram of autowisp.astrometry.transformation.Transformation

A class that applies transformation stored in DR files.

pre_projection

One of the map projections in autowisp.astrometry.map_projections that is applied first to transform RA, Dec -> xi, eta. The latter are then projected to x, y.

Type:

callable

evaluate_transformation

Evaluator for the pre-projected catalog -> frame coordinates transformation.

Type:

fit_expression.Interface

__call__(sources, save_intermediate=False, in_place=False)[source]

Return the projected positions of the given catalogue sources.

Parameters:
  • sources (structured numpy array or pandas.DataFrame) – The catalogue sources to project.

  • save_intermediate (bool) – If True, the result includes the coordinate of the pre-projection, in addition to the final frame coordinates.

  • in_place (bool) – If True, the input sources are updated with the projected coordinates (sources must allow setting entries for x and y columns, also for xi and eta if save_intermediate is True).

Returns:

The projected source positions with labels ‘x’, ‘y’, and optionally (if save_intermediate == True) the pre-projected coordinates xi and eta. If in_place is True, return None.

Return type:

numpy structured array

__init__(dr_fname=None, **dr_path_substitutions)[source]

Prepare to apply the transformation stored in the given DR file.

Parameters:

dr_fname (str) – The filename of the data reduction file to read a transformation from. If not specified, read_transformation() must be called before using this class.

Returns:

None

static _create_projected_arrays(sources, save_intermediate, in_place)[source]

Create a numpy structured array to hold the projected sources.

inverse(x, y, result='equatorial', **source_properties)[source]

Return the sky coordinates of the given source.

read_transformation(dr_file, **dr_path_substitutions)[source]

Read the transformation from the given DR file (already opened).

set_transformation(pre_projection_center, terms_expression, coefficients, pre_projection_name='tan_projection')[source]

Set the projection to use.

autowisp.astrometry.transformation.main(config)[source]

Avoid global variables.

autowisp.astrometry.transformation.parse_command_line()[source]

Return the configuration for running this module as a script.