SparseResampleStep#
snowblind.SparseResampleStep, run with strun sparse_resample. The jwst resample step for images with drizzle replaced by spizzle: the
exact variance of each mosaic pixel, and the mosaic’s noise factor saved
next to it.
Guide: Resampling and outlier detection.
- Parameters:
- pixfracfloat, 0.0 to 1.0, default
1.0 Pixel shrinkage factor
- fillvalstring, default
'NAN' Output value for pixels with no weight, a number
- weight_typeone of
'ivm','exptime', default'ivm' Input image weighting type
- output_shapelist of 2 integers, default
None [x, y] order
- crpixlist of 2 floats, default
None 0-based image coordinates of the reference pixel
- crvallist of 2 floats, default
None world coordinates of the reference pixel
- rotationfloat, default
None Output image Y-axis PA relative to North
- pixel_scale_ratiofloat, default
1.0 Ratio of output to input pixel scale.
- pixel_scalefloat, default
None Absolute pixel scale in arcsec
- output_wcsstring, default
'' Custom output WCS. Overrides other WCS parameters if provided.
- singleboolean, default
False Resample each input to its own output grid
- blendheadersboolean, default
True Blend metadata from inputs into output
- in_memoryboolean, default
True Keep images in memory
- enable_ctxboolean, default
False Compute and report the context array
- enable_errboolean, default
True Compute and report the err array
- report_varboolean, default
True Report the variance array
- varianceone of
'exact','stcal', default'exact' Exact variance and noise factor, or stcal’s variance
- pixmap_stepsizeinteger, at least 1, default
16 Spacing in pixels of the WCS evaluations for the pixel map
- pixmap_orderinteger, default
3 Spline order of the pixel map between them, 1 or 3
- pixfracfloat, 0.0 to 1.0, default
The parameters every stpipe step has (skip, save_results,
output_dir, suffix, pre_hooks, post_hooks and the
others) are described in the stpipe documentation.
- class snowblind.SparseResampleStep(name=None, parent=None, config_file=None, _validate_kwds=True, **kws)#
Resample images onto a regular grid with spizzle’s square kernel.
jwst’s
ResampleStepfor images with SparseResampleImage in place of drizzle. The parameters are jwst’s, with these differences:no
kernel: the square kernel only;no
propagate_dq: the DQ array is not resampled;no
good_bits: the pixels with DO_NOT_USE or NON_SCIENCE are left out, as by jwst’s step;weight_typeis “ivm” unless given: the step does not read jwst’s step parameters from CRDS, which ask for “exptime” for some instruments;enable_ctxis off by default;pixmap_stepsize16 andpixmap_order3: the pixel map is interpolated with splines between the pixels where the WCS is evaluated;variance: “exact” for the exact variance planes and the noise factor, “stcal” for the jwst step’s variance planes and ERR.
With the exact variance, the noise factor is saved as an image next to the mosaic, with the suffix
nfactor, whenever the results are saved, and its file name is recorded in the mosaic asmeta.snowblind.sparse_resample.noise_factor_file(NFACFILE).- process(input_data)#
Resample the input images, as jwst’s ResampleStep does.
- Parameters:
- input_datastr, ~stdatamodels.jwst.datamodels.ImageModel, or any association-type input loadable into ~jwst.datamodels.library.ModelLibrary
An image file or model, or an association of them.
- Returns:
- ~stdatamodels.jwst.datamodels.ImageModel or ~jwst.datamodels.library.ModelLibrary
The mosaic, or with
singlea library of one resampled image per group.