pipecal_calfac

sofia_redux.calibration.pipecal_calfac.pipecal_calfac(flux, flux_err, config)[source]

Calculate the calibration factor for a flux standard.

Flux values are as measured from aperture photometry on an uncalibrated image of a known standard source. It is assumed that the image has already been telluric-corrected to the reference ZA and altitude/PWV. The calibration factor is intended to divide raw data that has also been telluric-corrected to the same reference atmosphere, in order to calibrate it to physical units (Jy/pixel). The error on the calibration factory is calculated from the flux error and the model flux error, added in quadrature with appropriate scale factors.

The model flux and its associated error must be present in the config data structure, as well as a mean and pivot wavelength, and a color correction factor. That is, the keys ‘wref’, ‘lpivot’, ‘std_flux’, ‘std_eflux’, and ‘color_corr’ must be present in the configuration dictionary.

The calibration factor is calculated as:

calfac = (flux * Lpivot^2) /
         (color_cor * model_flux * Lmean^2)
Parameters:
fluxfloat

Observed flux of standard, from aperture photometry.

flux_errfloat

1-sigma uncertainty on flux.

configdictionary

Describes the configuration of this run, as generated by pipecal_config.

Returns:
ref_calfacfloat

Calibration factor

ref_ecalfacfloat

1-sigma uncertainty on calibration factor

Raises:
PipeCalError

Any improper inputs