captest.calcparams.absolute_airmass
- captest.calcparams.absolute_airmass(data, apparent_zenith=None, pressure=None, pressure_scale=100, airmass_model='kastenyoung1989', verbose=True)
Compute absolute (pressure-corrected) airmass from apparent zenith.
Uses
pvlib.atmosphere.get_relative_airmass()with thekastenyoung1989model by default, then passes the result topvlib.atmosphere.get_absolute_airmass(). IfpressureisNonethe pvlib default (101325 Pa) is used; otherwise the columndata[pressure]is scaled bypressure_scale(default 100 to convert hPa/mbar to Pa) and passed through.When a
pressurecolumn is supplied, the scaled pressure values are sanity-checked against global surface-pressure records (PRESSURE_MIN_MBAR–PRESSURE_MAX_MBAR). The 5th and 95th percentiles are used to ignore isolated outliers from bad data. AUserWarningis emitted if the central 90% of values falls outside that band, which typically indicates a unit mismatch betweendata[pressure]andpressure_scale.- Parameters:
data (DataFrame) – DataFrame containing the
apparent_zenith(and optionallypressure) columns.apparent_zenith (str) – Column name for apparent zenith angle (degrees).
pressure (str or None, default None) – Column name for station pressure.
Nonefalls back to pvlib’s default sea-level pressure.pressure_scale (numeric, default 100) – Multiplier applied to
data[pressure]before passing to pvlib. Default converts hPa/mbar to Pa.airmass_model (str, default 'kastenyoung1989') – Model passed to
pvlib.atmosphere.get_relative_airmass().verbose (bool, default True) – Set to False to suppress the explanatory print message.
- Returns:
Absolute airmass indexed like
data.index.- Return type:
Series