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_modelsModelLibrary

Each datamodel must have a model.meta.wcs set to a WCS object.

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_ra and ref_dec from the wcsinfo meta attribute of the first input image). Ignored when pixel_scale is 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.ndarray convention (ny first and nx second). This value will be assigned to pixel_shape and array_shape properties 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 None specifies 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 when transform is provided.

crpixtuple of float, None, optional

Position of the reference pixel in the resampled image array. If crpix is 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.

Returns:
wcs~gwcs.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).