resampled_wcs_from_models
- jwst.resample.resample_utils.resampled_wcs_from_models(input_models, pixel_scale_ratio=1.0, pixel_scale=None, output_shape=None, rotation=None, crpix=None, crval=None)[source]
Compute the WCS of the resampled image from input models and specified WCS parameters.
- Parameters:
- input_models
ModelLibrary Each datamodel must have a
model.meta.wcsset to aWCSobject.- pixel_scale_ratiofloat, optional
Desired pixel scale ratio defined as the ratio of the desired output pixel scale to the first input model’s pixel scale computed from this model’s WCS at the fiducial point (taken as the
ref_raandref_decfrom thewcsinfometa attribute of the first input image). Ignored whenpixel_scaleis specified.- pixel_scalefloat, None, optional
Desired pixel scale (in degrees) of the output WCS. When provided, overrides
pixel_scale_ratio.- output_shapetuple of two integers (int, int), None, optional
Shape of the image (data array) using
np.ndarrayconvention (nyfirst andnxsecond). This value will be assigned topixel_shapeandarray_shapeproperties of the returned WCS object.- rotationfloat, None, optional
Position angle of output image’s Y-axis relative to North. A value of 0.0 would orient the final output image to be North up. The default of
Nonespecifies that the images will not be rotated, but will instead be resampled in the default orientation for the camera with the x and y axes of the resampled image corresponding approximately to the detector axes. Ignored whentransformis provided.- crpixtuple of float, None, optional
Position of the reference pixel in the resampled image array. If
crpixis not specified, it will be set to the center of the bounding box of the returned WCS object.- crvaltuple of float, None, optional
Right ascension and declination of the reference pixel. Automatically computed if not provided.
- input_models
- Returns:
- wcs
WCS The WCS object corresponding to the combined input footprints.
- pscale_infloat
Computed pixel scale (in degrees) of the first input image.
- pscale_outfloat
Computed pixel scale (in degrees) of the output image.
- pixel_scale_ratiofloat
Pixel scale ratio (output to input).
- wcs