Visual quality-control diagnostics for solar irradiance measurements (HelioQC multipanel).
Project description
HelioQC
HelioQC produces a unified multipanel visual diagnostic for solar irradiance quality control (GHI, DNI, DIF). It complements automated QC tests by revealing characteristic signatures of measurement anomalies across several coordinated views.
DOI:
License: (see LICENSE)
Authors: Mines Paris - PSL —
Installation
pip install helioqc
For a local checkout:
pip install -e .
Prerequisites
- CAMS radiation service — register at soda-pro CAMS Radiation Service, then provide your email as
CAMS_EMAILorcams_email=. - Google Static Maps API (optional) — set
GOOGLE_API_KEYfor station map thumbnails. When absent, maps are skipped with a warning.
Copy .env.sample to .env and set your credentials:
cp .env.sample .env
# edit .env — CAMS_EMAIL is required
Integration tests and local runs read from .env at the project root.
Input data format
visual_qc expects a pandas.DataFrame with:
- a UTC
DatetimeIndex(naive timestamps are assumed to be UTC) - columns
GHI,DHIorDIF,BNIorDNI(W/m²)
Filter the time range in Python before calling visual_qc (e.g. df.loc["2021-01-01":"2025-12-31"]).
Optional station metadata may be attached to input_df.attrs (e.g. after reading a NetCDF file):
attrs key |
Description |
|---|---|
latitude |
Station latitude (°) |
longitude |
Station longitude (°) |
elevation |
Station elevation (m) |
ClimateType |
Köppen-Geiger code |
Country |
Country name |
station |
Station name |
ID |
Station identifier |
source |
Measurement network |
latitude, longitude, and elevation are required unless passed explicitly.
Python API
from helioqc import visual_qc
import pandas as pd
df = pd.read_csv("measurements.csv", parse_dates=["time"], index_col="time")
df.index = df.index.tz_localize("UTC")
fig = visual_qc(
df,
latitude=36.624,
longitude=-116.019,
elevation=1007,
climate="BWh",
country="United States",
station="Desert Rock, Nevada",
station_id="DRA",
source="SURFRAD",
cams_email="you@example.com",
)
fig.savefig("helioqc_output.png", dpi=150, bbox_inches="tight")
visual_qc synopsis
visual_qc(input_df, *, latitude, longitude, elevation, cams_email, ...) → matplotlib.figure.Figure
Returns a matplotlib Figure displayed automatically in Jupyter notebooks.
Command-line interface
helioqc \
--latitude 36.624 --longitude -116.019 --elevation 1007 \
--climate BWh --country "United States" \
--station "Desert Rock, Nevada" --station-id DRA --source SURFRAD \
--cams-email you@example.com \
data/surfrad_dra_2025.csv.zip output.png
.csv, .csv.gz, and .csv.zip inputs are supported. By default the CLI analysis window spans the last five years of data ending at the dataset maximum (--start-date / --end-date to override).
Additional options: --time-col, --time-format, --timezone, --ghi-col, --dni-col (falls back to BNI), --dif-col (falls back to DHI), --start-date, --end-date.
Sample data
The repository includes one year of SURFRAD Desert Rock (DRA) measurements:
data/surfrad_dra_2025.csv.zip
Station metadata (latitude, climate, …) is passed as function/CLI parameters — see the API and CLI examples above.
Tests
make test # e2e (CAMS mocked) + unit tests
make test-unit # fast wiring tests only
End-to-end tests call sg2/SRTM/plotting for real (CAMS mocked) and write JPEG artefacts to tmp/test_api.jpg and tmp/test_cli.jpg.
Demo notebook
See demo.ipynb for a minimal workflow: fetch data from the Thredds server, attach metadata, and call visual_qc().
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file helioqc-0.1.0.tar.gz.
File metadata
- Download URL: helioqc-0.1.0.tar.gz
- Upload date:
- Size: 23.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f06f1ca84a42d850487cbeb410dfc03b9debf1213efc348b75953c9f2822822
|
|
| MD5 |
6c10799db8b6e83d0ef464b14a829b07
|
|
| BLAKE2b-256 |
ea5945949907d3191c7383e5795fd0dc2a7bd376507b0186a172fac5988f186a
|
File details
Details for the file helioqc-0.1.0-py3-none-any.whl.
File metadata
- Download URL: helioqc-0.1.0-py3-none-any.whl
- Upload date:
- Size: 26.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
168afa861990b2ee107e7b4ecb57bf89915d12234d361d4aa96f1e5575f0d32d
|
|
| MD5 |
b4157e8e7743fd91a437d93e1f3501a0
|
|
| BLAKE2b-256 |
a3bbe83cdbc3f6d58d1b586a8f74bef8b1dbddd876bf8cd74d6b75d095d1098c
|