compute_dispersion

jwst.wavecorr.wavecorr.compute_dispersion(wcs, xpix=None, ypix=None)[source]

Compute the pixel dispersion.

If xpix or ypix is not provided, the dispersion is computed on a grid based on wcs.bounding_box.

Parameters:
wcsWCS

The WCS object for this slit.

xpixndarray, float, optional

X pixel coordinates for dispersion elements.

ypixndarray, float, optional

Y pixel coordinates for dispersion elements.

Returns:
dispersionndarray

The pixel dispersion in meters.