pipecal_rratio¶
- sofia_redux.calibration.pipecal_rratio.pipecal_rratio(za, altwv, za_ref, altwv_ref, za_coeff, altwv_coeff, pwv=False)[source]¶
Calculate the R ratio for a given ZA and Altitude or PWV.
The R ratio is used to correct image flux values from the observed atmospheric conditions to a reference atmospheric condition. This is required before applying calibration factors calculated at the reference atmosphere.
- The procedure is:
Calculate the ZA term from the polynomial coefficients and sec(ZA) - sec(ZAref).
Calculate the altitude or PWV term from the polynomial coefficients and log(PWV) - log(PWVref), or ALT - ALTref.
Multiply the terms together and return the result.
- Parameters:
- zafloat
Observed zenith angle (degrees).
- altwvfloat
Observed altitude (kilo-feet) or precipitable water vapor (um).
- za_reffloat
Reference ZA used to calculate response fits (degrees).
- altwv_reffloat
Reference altitude (kilo-feet) or PWV (um) used to calculate response fits.
- za_coefflist of float
Polynomial coefficients of response fit in ZA.
- altwv_coefflist of float
Polynomial coefficients of response fit in altitude or PWV.
- pwvbool, optional
If set, the water vapor response fit is used instead of the altitude fit, and altwv is treated as a water vapor value.
- Returns:
- rratiofloat
R ratio at observed ZA and altitude/PWV.