bsrn.qc.wrapper.mask_failed_irradiance#
- bsrn.qc.wrapper.mask_failed_irradiance(df, *, flag_remove=True)[source]#
Set shortwave / longwave irradiance columns to NaN where QC flags fail.
Uses the same flag-to-column mapping as
run_qc()outputs: each single-flag column (e.g.flagPPLGHI) clears only its component; closure, diffuse-ratio, k-index, and tracker groups clear the components those tests share. Mutatesdfin place for irradiance values. Whenflag_removeis True (default), standardrun_qc()flag columns are dropped afterward.- Parameters:
df (pandas.DataFrame) – Frame that already contains
run_qcflag columns.flag_remove (bool, optional) – If True (default), drop QC flag columns after masking.
- Returns:
df(same object), updated in place.- Return type:
Notes
Call this after
run_qc()when you want failed minutes cleared;run_qc()does not invoke it automatically.To keep an unmodified copy, run
mask_failed_irradiance(df.copy(), ...).Does not clear auxiliary columns (e.g.
ghi_clear,zenith).