extract_ref

acstools.utils_calib.extract_ref(scihdu, refhdu)

Extract section of the reference image that corresponds to the given science image.

This only returns a view, not a copy of the reference image’s array.

Parameters:
scihdu, refhduobj

Extension HDU’s of the science and reference image, respectively.

Returns:
refdataarray-like

Section of the relevant reference image.

Raises:
NotImplementedError

Either science or reference data are binned.

ValueError

Extracted section size mismatch.