After removing duplicates, apply rigorous physics-based filters. Unlike simple range checks, these filters use the Solar Zenith Angle (SZA) and the theoretical top-of-atmosphere irradiance (TOA) — computed for each timestamp — as the reference frame for what is physically possible.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/maxiricalde/ProfeLedesma/llms.txt
Use this file to discover all available pages before exploring further.
Computing solar geometry with the Geo helper
Before running QC, you need to enrich the DataFrame with solar geometry columns. TheGeo class computes these from the site’s geographic coordinates and the timestamps:
The QC filters
TheQC class (helpers/QualityControl.py) applies three independent, physically-motivated filters:
| Filter | Condition | Rule |
|---|---|---|
filtro1 | SZA < 90° (daytime) | GHI < 1.5 × 1361.7 × CTZ^1.2 + 100 (upper physical bound) |
filtro2 | SZA > 90° (nighttime) | GHI > (6.5331 − 0.065502×TZ + 1.8312e-4×TZ²) / (1 + 0.01113×TZ) (nighttime minimum) |
filtro3 | All times | Clearness index kt = GHI/TOA must be in (0, 1.4) |
Acepted | All times | True only when all three filters pass |
Applying QC and masking rejected values
NaN, preserving the timestamp index for later resampling.
QC modifies df in place, adding five new columns: filtro1, filtro2, filtro3, kt, and Acepted.