find_line
- acstools.utils_calib.find_line(scihdu, refhdu)
Obtain bin factors and corner location to extract and bin the appropriate subset of a reference image to match a science image.
If the science image has zero offset and is the same size and binning as the reference image,
same_sizewill be set toTrue. Otherwise, the values ofrx,ry,x0, andy0will be assigned.Normally the science image will be binned the same or more than the reference image. In that case,
rxandrywill be the bin size of the science image divided by the bin size of the reference image.If the binning of the reference image is greater than the binning of the science image, the ratios (
rxandry) of the bin sizes will be the reference image size divided by the science image bin size. This is not necessarily an error.Note
Translated from
calacs/lib/findbin.c.- Parameters:
- scihdu, refhduobj
Extension HDU’s of the science and reference image, respectively.
- Returns:
- same_sizebool
Trueif zero offset and same size and binning.- rx, ryint
Ratio of bin sizes.
- x0, y0int
Location of start of subimage in reference image.
- Raises:
- ValueError
Science and reference data size mismatch.