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

calc_pixmap(wcs_from, wcs_to[, shape, ...])

Calculate pixel coordinates of one WCS corresponding to the native pixel grid of another WCS.

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

Build drizzle weight map.

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])

Compute mean pixel area.

get_tmeasure(model)

Get tmeasure from datamodel.

is_flux_density(bunit)

Differentiate between surface brightness and flux density data units.

is_imaging_wcs(wcs)

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

resample_range(data_shape[, bbox])