run_photometry

sofia_redux.calibration.pipecal_util.run_photometry(data, header, var, config, **kwargs)[source]

Run photometry on an image of a standard source.

Input images are assumed to be telluric-corrected (e.g. by the apply_tellcor function).

If the image is uncalibrated, and a model flux is known for the source, values from aperture photometry will be used to attempt to calculate and record a reference calibration factor. This value and its associated error will be recorded in REFCALFC and REFCALER, respectively.

If the image is previously calibrated, and a model flux is known, the values will be compared, and a log message will display the percent difference from the model.

If a model flux is unknown, the source flux will be reported and recorded in the FITS header, but no further calculations will be performed.

Parameters:
dataarray

Image to correct.

headerastropy.io.fits.header.Header

FITS header to update.

vararray

Variance image to propagate, if desired.

configdict-like

Calibration configuration values, as produced by pipecal.pipecal_config.pipecal_config.

kwargsdict-like, optional

Extra parameters to provide to the photometry function If not provided, but values are available in config, the configuration values will be used as the default. If parameters are still not present, defaults defined by the pipecal_photometry function will be used.