Resample Utilities
- romancal.resample.resample_utils.compute_var_sky(model) None[source]
Add sky variance array to a datamodel.
- Parameters:
model (
ImageModel) – A datamodel to which the sky variance array will be added.- Return type:
None
- romancal.resample.resample_utils.make_output_wcs(input_models, pscale_ratio=1.0, pscale=None, rotation=None, shape=None, crpix: tuple[float, float] | None = None, crval: tuple[float, float] | None = None)[source]
Generate output WCS here based on footprints of all input WCS objects
- Parameters:
input_models (list of
roman_datamodels.datamodels.DataModel) – Each datamodel must have agwcs.wcs.WCSobject.pscale_ratio (float, optional) – Ratio of output pixel scale to input pixel scale. Ignored when
pscaleis provided.pscale (float, None, optional) – Absolute pixel scale in degrees. When provided, overrides
pscale_ratio.rotation (float, None, optional) – Position angle (in degrees) 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.shape (tuple of int, None, optional) – Shape of the image (data array) using
numpy.ndarrayconvention (nyfirst andnxsecond). This value will be assigned topixel_shapeandarray_shapeproperties of the returned WCS object.crpix (tuple of float, None, optional) – Position of the reference pixel in the image array. If
ref_pixelis not specified, it will be set to the center of the bounding box of the returned WCS object.crval (tuple of float, None, optional) – Right ascension and declination of the reference pixel. Automatically computed if not provided.
- Returns:
output_wcs (object) – WCS object, with defined domain, covering entire set of input frames
pscale (float) – The computed (or provided) input pixel scale (in degrees).
pscale_ratio (float, optional) – The computed (or provided) input pixel scale ratio.