Utility Functions

The utils module provides helpful functions for Resample such as creating image mask from model’s DQ array, computing average pixel area, loading a custom WCS from an ASDF file, etc.

stcal.resample.utils Module

Functions

build_driz_weight(model[, weight_type, ...])

Create a weight map that is used for weighting input images when they are co-added to the ouput model.

build_mask(dqarr, good_bits[, flag_name_map])

Build a bit mask from an input DQ array and a bitvalue flag

compute_mean_pixel_area(wcs[, shape])

Computes the average pixel area (in steradians) based on input WCS using pixels within either the bounding box (if available) or the entire data array as defined either by wcs.array_shape or the shape argument.

get_tmeasure(model)

Check if the measurement_time keyword is present in the datamodel for use in exptime weighting.

is_flux_density(bunit)

Differentiate between surface brightness and flux density data units.

is_imaging_wcs(wcs)

Returns True if wcs is an imaging WCS and False otherwise.

resample_range(data_shape[, bbox])