adjust_wcs

jwst.tweakreg.utils.adjust_wcs(wcs, delta_ra=0.0, delta_dec=0.0, delta_roll=0.0, scale_factor=1.0)[source]

Apply corrections to an imaging WCS of ‘cal’ data models.

Warning

This function is not designed to handle neither FITS WCS nor GWCS of resampled images. It is designed specifically for GWCS of calibrated imaging data models that can be used as input to Stage 3 of the JWST pipeline (with suffixes ‘_cal’, ‘_tweakreg’, ‘_skymatch’).

Warning

This function modifies the WCS of calibrated imaging data models in a way that is NOT compatible with tweakreg: once a WCS was modified using adjust_wcs(), the corresponding imaging data model (whose WCS was modified) no longer be aligned using the tweakreg step.

Parameters:
  • wcs (gwcs.WCS) – WCS object to be adjusted. Must be an imaging JWST WCS of a calibrated data model.

  • delta_ra (float, astropy.units.Quantity, optional) – Additional rotation (in degrees if units not provided) to be applied along the longitude direction.

  • delta_dec (float, astropy.units.Quantity, optional) – Additional rotation (in degrees if units not provided) to be applied along the latitude direction.

  • delta_roll (float, astropy.units.Quantity, optional) – Additional rotation (in degrees if units not provided) to be applied to the telescope roll angle (rotation about V1 axis).

  • scale_factor (float, optional) – A multiplicative scale factor to be applied to the current scale (if any) in the WCS. If input wcs does not have a scale factor applied, it is assumed to be 1. The scale factor is applied in a tangent plane perpendicular to the V1 axis of the telescope.

Returns:

wcs – Adjusted WCS object.

Return type:

gwcs.WCS