wcs_from_footprints

jwst.assign_wcs.util.wcs_from_footprints(dmodels, refmodel=None, transform=None, bounding_box=None, domain=None)[source]

Create a WCS from a list of input data models.

A fiducial point in the output coordinate frame is created from the footprints of all WCS objects. For a spatial frame this is the center of the union of the footprints. For a spectral frame the fiducial is in the beginning of the footprint range. If refmodel is None, the first WCS object in the list is considered a reference. The output coordinate frame and projection (for celestial frames) is taken from refmodel. If transform is not suplied, a compound transform is created using CDELTs and PC. If bounding_box is not supplied, the bounding_box of the new WCS is computed from bounding_box of all input WCSs.

Parameters:
  • dmodels (list of DataModel) – A list of data models.
  • refmodel (DataModel, optional) – This model’s WCS is used as a reference. WCS. The output coordinate frame, the projection and a scaling and rotation transform is created from it. If not supplied the first model in the list is used as refmodel.
  • transform (Model, optional) – A transform, passed to wcs_from_fiducial() If not supplied Scaling | Rotation is computed from refmodel.
  • bounding_box (tuple, optional) – Bounding_box of the new WCS. If not supplied it is computed from the bounding_box of all inputs.