ResampleStep
- class jwst.resample.ResampleStep(name=None, parent=None, config_file=None, _validate_kwds=True, **kws)[source]
Bases:
JwstStep
Resample imaging data onto a regular grid using the drizzle algorithm.
Create a
Step
instance.- Parameters:
- namestr
The name of the Step instance. Used in logging messages and in cache filenames. If not provided, one will be generated based on the class name.
- parent
Step
The parent step of this step. Used to determine a fully-qualified name for this step, and to determine the mode in which to run this step.
- config_filestr or pathlib.Path
The path to the config file that this step was initialized with. Use to determine relative path names of other config files.
- _validate_kwdsbool
Validate given
kws
against specs/config.- **kwsdict
Additional parameters to set. These will be set as member variables on the new Step instance.
Attributes Summary
Methods Summary
check_list_pars
(vals, name[, min_vals])Validate step parameters that may take a 2-element list.
Load all drizzle-related parameter values into kwargs list.
process
(input_data)Run the resample step on the input data.
Attributes Documentation
- class_alias = 'resample'
- spec
pixfrac = float(min=0.0, max=1.0, default=1.0) # Pixel shrinkage factor kernel = option('square','gaussian','point','turbo','lanczos2','lanczos3',default='square') # Flux distribution kernel fillval = string(default='NAN') # Output value for pixels with no weight or flux weight_type = option('ivm', 'exptime', None, default='ivm') # Input image weighting type output_shape = int_list(min=2, max=2, default=None) # [x, y] order crpix = float_list(min=2, max=2, default=None) # 0-based image coordinates of the reference pixel crval = float_list(min=2, max=2, default=None) # world coordinates of the reference pixel rotation = float(default=None) # Output image Y-axis PA relative to North pixel_scale_ratio = float(default=1.0) # Ratio of output to input pixel scale. pixel_scale = float(default=None) # Absolute pixel scale in arcsec output_wcs = string(default='') # Custom output WCS. Overrides other WCS parameters if provided. single = boolean(default=False) # Resample each input to its own output grid blendheaders = boolean(default=True) # Blend metadata from inputs into output in_memory = boolean(default=True) # Keep images in memory enable_ctx = boolean(default=True) # Compute and report the context array enable_err = boolean(default=True) # Compute and report the err array report_var = boolean(default=True) # Report the variance array
Methods Documentation
- static check_list_pars(vals, name, min_vals=None)[source]
Validate step parameters that may take a 2-element list.
- Parameters:
- valslist or None
Values to validate.
- namestr
Parameter name.
- min_valslist, optional
Minimum allowed values for the parameter. Must have 2 values.
- Returns:
- valueslist
The validated list of values.
- Raises:
- ValueError
If the values do not have expected values.
- get_drizpars()[source]
Load all drizzle-related parameter values into kwargs list.
- Returns:
- kwargsdict
Dictionary of drizzle parameters
- process(input_data)[source]
Run the resample step on the input data.
- Parameters:
- input_datastr, ImageModel, or any asn-type input loadable into ModelLibrary
Filename pointing to an ImageModel or an association, or the ImageModel or association itself.
- Returns:
- ModelLibrary or ImageModel
The final output data. If the
single
parameter is set to True, then this is a single ImageModel; otherwise, it is a ModelLibrary.
Notes
When supplied via
output_wcs
, a custom WCS overrides other custom WCS parameters such asoutput_shape
(now computed from byoutput_wcs.bounding_box
) andcrpix
.