For more details about step arguments (including datatypes, possible values
and defaults) see romancal.resample.ResampleStep.spec.
Step Arguments
The resample step has the following optional arguments that control
the behavior of the processing and the characteristics of the resampled
image.
--pixfracThe fraction by which input pixels are “shrunk” before being drizzled onto the output image grid, given as a real number between 0 and 1.
--kernelThe form of the kernel function used to distribute flux onto the output image. Available kernels are
square,gaussian,point,tophat,turbo,lanczos2, andlanczos3.--pixel_scale_ratioRatio of input to output pixel scale. A value of 0.5 means the output image would have 4 pixels sampling each input pixel. Ignored when
pixel_scaleoroutput_wcsare provided.--pixel_scaleAbsolute pixel scale in
degrees. When provided, overridespixel_scale_ratio. Ignored whenoutput_wcsis provided.--rotationPosition 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 value 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 whenpixel_scaleoroutput_wcsare provided.--crpixPosition of the reference pixel in the image array in the
x, yorder. Ifcrpixis not specified, it will be set to the center of the bounding box of the returned WCS object. When supplied from command line, it should be a comma-separated list of floats. Ignored whenoutput_wcsis provided.--crvalRight ascension and declination of the reference pixel. Automatically computed if not provided. When supplied from command line, it should be a comma-separated list of floats. Ignored when
output_wcsis provided.--output_shapeShape of the image (data array) using “standard”
nxfirst andnysecond (as opposite to thenumpy.ndarrayconvention -nyfirst andnxsecond). This value will be assigned topixel_shapeandarray_shapeproperties of the returned WCS object. When supplied from command line, it should be a comma-separated list of integersnx, ny.Note
Specifying
output_shapeis required when the WCS inoutput_wcsdoes not havebounding_boxproperty set.--output_wcsFile name of a
ASDFfile with a GWCS stored under the"wcs"key under the root of the file. The output image size is determined from the bounding box of the WCS (if any). Argumentoutput_shapeoverrides computed image size and it is required when output WCS does not havebounding_boxproperty set.Note
When
output_wcsis specified, WCS-related arguments such aspixel_scale_ratio,pixel_scale,rotation,crpix, andcrvalwill be ignored.--resample_on_skycellIf input association contains skycell information use it to compute the output wcs. If
output_wcsis defined it will be used instead. Ifresample_on_skycellisFalsethe output wcs will be the combined wcs of all input models.--fillvalThe value to assign to output pixels that have zero weight or do not receive any flux from any input pixels during drizzling.
--weight_typeThe weighting type for each input image. If
weight_type=ivm, the scaling value will be determined per-pixel using the inverse of the read noise (VAR_RNOISE) array stored in each input image. If the VAR_RNOISE array does not exist, the variance is set to 1 for all pixels (equal weighting). Ifweight_type=ivm-sky, the scaling value will be determined per-pixel using the inverse of the sky variance (VAR_SKY) array stored in each input image. Ifweight_type=exptime, the scaling value will be set equal to the exposure time found in the image header.Note
VAR_SKY is calculated as follows:
VAR_SKY = VAR_RNOISE + VAR_POISSON / DATA * MEDIAN(DATA)
where VAR_RNOISE is the read noise variance, VAR_POISSON is the Poisson noise variance, DATA is the science data, and MEDIAN(DATA) is the median of the science data.
--in_memoryIf set to
False, write output datamodel to disk.--good_bitsSpecifies the bits to use when creating the resampling mask. Either a single bit value or a combination of them can be provided. If the string starts with a tilde (
), then the provided bit(s) will be excluded when creating the resampling mask. A value of~DO_NOT_USE+NON_SCIENCEwill exclude pixels flagged withDO_NOT_USEandNON_SCIENCE.The bit value can be provided in a few different ways, but always as a string type. For example, if the user deems OK to use pixels with low QE and highly nonlinear, then any of the ways listed below will work to set
good_bits:good_bits = 'LOW_QE+NON_LINEAR'(concatenated DQ flag labels);good_bits = '8192+65536'(concatenated DQ flag bit values);good_bits = '8192,65536'(comma-separated DQ flag bit values);good_bits = '73728'(sum of DQ flag bit values).
Note
Adding a tilde (
) to the beginning of the string will flip the bit(s) and actuallyexcludethe provided bit(s). This is the same as providing the bad bits instead of the good bits.