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.

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

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

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

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

Parameters
  • input (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: GAIADR2. 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

  • 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.

Notes

This function will point to astrometric catalog web service defined through the use of the ASTROMETRIC_CATALOG_URL environment variable.

Returns

ref_table – Astropy Table object of the catalog

Return type

Table

jwst.tweakreg.astrometric_utils.get_catalog(ra, dec, sr=0.1, catalog='GSC241')[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)

  • 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: ‘GSC241’

Returns

csv – CSV object of returned sources with all columns as provided by catalog

Return type

CSV object