astrometric_utils

The astrometric_utils module provides functions for generating astrometric catalogs of sources for the field-of-view covered by a set of images.

romancal.tweakreg.astrometric_utils.compute_radius(wcs)[source]

Compute the radius from the center to the furthest edge of the WCS.

romancal.tweakreg.astrometric_utils.create_astrometric_catalog(input_models, catalog='GAIADR3', output='ref_cat.ecsv', gaia_only=False, table_format='ascii.ecsv', existing_wcs=None, num_sources=None, epoch=None)[source]

Create an astrometric catalog that covers the inputs’ field-of-view.

Parameters:
  • input_models (str, list) – Filenames of images to be aligned to astrometric catalog

  • catalog (str, optional) – Name of catalog to extract astrometric positions for sources in the input images’ field-of-view. Default: GAIADR3. Options available are documented on the catalog web page.

  • output (str, optional) – Filename to give to the astrometric catalog read in from the master catalog web service. If None, no file will be written out.

  • gaia_only (bool, optional) – Specify whether or not to only use sources from GAIA in output catalog

  • table_format (str, optional) – Format to be used when writing the results to a file using the output option. A full list of the options can be found here: https://docs.astropy.org/en/stable/io/unified.html#built-in-readers-writers

  • existing_wcs (model) – existing WCS object specified by the user as generated by resample.resample_utils.make_output_wcs

  • num_sources (int) – Maximum number of brightest/faintest sources to return in catalog. If num_sources is negative, return that number of the faintest sources. By default, all sources are returned.

  • epoch (float or str, optional) – Reference epoch used to update the coordinates for proper motion (in decimal year). If None then the epoch is obtained from the metadata.

Notes

This function will point to astrometric catalog web service defined through the use of the ASTROMETRIC_CATALOG_URL environment variable. Also, the default catalog to be used is set by the DEF_CAT variable.

Returns:

ref_table – Astropy Table object of the catalog

Return type:

Table

romancal.tweakreg.astrometric_utils.get_catalog(ra, dec, epoch=2016.0, sr=0.1, catalog='GAIADR3', timeout=30.0)[source]

Extract catalog from VO web service.

Parameters:
  • ra (float) – Right Ascension (RA) of center of field-of-view (in decimal degrees)

  • dec (float) – Declination (Dec) of center of field-of-view (in decimal degrees)

  • epoch (float, optional) – Reference epoch used to update the coordinates for proper motion (in decimal year). Default: 2016.0.

  • sr (float, optional) – Search radius (in decimal degrees) from field-of-view center to use for sources from catalog. Default: 0.1 degrees

  • catalog (str, optional) – Name of catalog to query, as defined by web-service. Default: ‘GAIADR3’

  • timeout (float, optional) – Set the request timeout (in seconds). Default: 30 s.

Return type:

A Table object of returned sources with all columns as provided by catalog.