guess_source_position¶
- sofia_redux.calibration.pipecal_util.guess_source_position(header, image, srcpos=None)[source]¶
Estimate the position of a standard source in the image.
The following information sources are checked in order:
The srcpos parameter
SRCPOSX and SRCPOSY keywords in the header
The brightest peak found by photutils.find_peaks.
CRPIX1 and CRPIX2 keywords in the header.
If a successful value is found at any stage, no further checks are done.
- Parameters:
- header
astropy.io.fits.header.Header
FITS header corresponding to the image.
- imagearray
2D image data to check for peaks.
- srcposlist or tuple, optional
If provided, should be the desired source position, listed as (x,y), indexed from 0.
- header
- Returns:
- list, or None
The estimated source position, as (x,y), zero-indexed. None is returned if no valid source positions could be found.