LSTNet: pure-Python land surface temperature library (ground truth LST production refactor).
Project description
lstnet
Pure-Python land surface temperature (LST) ground-validation library + GUI.
lstnet computes ground-truth LST from in-situ longwave radiation at
SURFRAD / PKULSTNet / HiWATER validation sites and validates it against
retrieved LST (your own algorithm or a satellite product) — bias / RMSE / R +
scatter and time-series plots. Zero system GDAL; cross-platform
(Windows / macOS incl. Apple Silicon / Linux); MIT-licensed.
Networks: SURFRAD (7 US sites, served online by NOAA — the default,
works out of the box) is the primary network. PKULSTNet (7) and HiWATER
(11) readers are also included for users who hold those local datasets (they
are not publicly downloadable — point the reader at your data/ directory).
Install
pip install lstnet
That's it — core library, GUI (lstnet-gui), and MCP server (lstnet-mcp) are
all included.
For MODIS / ASTER GED emissivity sources, set NASA Earthdata credentials (never hardcoded):
export EARTHDATA_USERNAME=you@example.com
export EARTHDATA_PASSWORD=********
Or enter them in the GUI: Settings → Earthdata Login (saved to
~/.lstnet/earthdata.json, chmod 600). Register at
https://urs.earthdata.nasa.gov/users/new.
FixedEmissivity needs no credentials.
GUI usage
lstnet-gui # launch the PySide6 desktop application
The GUI lets you:
- Select sites (multi-select, with lon/lat shown) from SURFRAD / PKULSTNet / HiWATER.
- Enter overpass times (12-digit
YYYYMMDDHHMM, one per line, UTC). - Pick an emissivity source — ASTER GED (default, recommended for validation), MODIS daily, or a manual fixed value.
- Compute ground LST — batch across all selected sites × times.
- Validate — load a retrieved-LST CSV (
site, overpass_time_utc, lst_k), the tool auto-computes ground truth for each row, pairs, and shows bias / RMSE / R + an embedded scatter plot (retrieved vs ground, 1:1 line). - Export the enriched CSV (retrieved LST + ground LST + diff + emissivity).
Sample data is in samples/:
retrieved_sample.csv— 9-site multi-network demo (SURFRAD ×7 + HiWATER ×2).validation_template.csv— all 25 sites pre-filled (fill in time + your LST).
Linux note: the GUI needs libxcb-cursor0:
sudo apt install -y libxcb-cursor0 libegl1 libgl1
Library usage (script / notebook)
Compute ground-truth LST for one site/time:
from datetime import datetime, timezone
from lstnet import compute_ground_lst, FixedEmissivity
from lstnet.sites import get_site
from lstnet.io.surfrad import SurfradReader
site = get_site("psu")
t = datetime(2011, 2, 12, 14, 30, tzinfo=timezone.utc)
g = compute_ground_lst(site, t, FixedEmissivity(0.98), SurfradReader())
print(g.lst_k, g.qc_flag) # e.g. 270.15 OK
Validate ground truth against your retrieved LST:
from lstnet import validate, TableRetrievedLST
from lstnet.plotting import scatter_plot
ground = [compute_ground_lst(s, t, FixedEmissivity(0.98), SurfradReader())
for s, t in your_site_times]
result = validate(ground, TableRetrievedLST("your_retrieval.csv"))
print(result.stats.bias, result.stats.rmse, result.stats.r)
scatter_plot(result) # retrieved-vs-ground with 1:1 line
your_retrieval.csv columns: site, overpass_time_utc, lst_k[, source]
(overpass_time_utc = 12-digit YYYYMMDDHHMM or ISO 8601, UTC).
MCP server (AI agent integration)
lstnet-mcp # start the FastMCP server
Exposes three tools that an AI agent (Claude Desktop, etc.) can call:
list_sites, compute_lst, validate_csv.
Features
- Ground-truth LST from SURFRAD (NOAA, HTTPS) / PKULSTNet / HiWATER station data, at satellite overpass times (Stefan–Boltzmann radiance inversion).
- Emissivity sources:
FixedEmissivity(offline),ModisDailyEmissivity(MYD21A1D/A1N C6.1, Ogawa 2004 broadband),AsterGEDEmissivity(AG100 V003 climatological, Cheng & Liang 2014 broadband — recommended for sub-K validation). - Validation engine: pair ground-truth + retrieved LST by
(site, overpass time)within a tolerance; bias / RMSE / Pearson R / regression; scatter + time-series plots. - GDAL-free: MODIS HDF4 via
pyhdf, ASTER GED HDF5 viah5py, GeoTIFF viarasterio— all ship pip wheels, no system GDAL install. - Quality control (configurable
strict), day/night (astral), credential externalization, CWD-independent paths. - Cross-platform: tested on Windows / macOS / Linux via GitHub Actions CI.
Platform notes
| Platform | Status | Notes |
|---|---|---|
| Linux | ✅ Full | GUI needs libxcb-cursor0 libegl1 libgl1 (apt install) |
| macOS (Intel + Apple Silicon) | ✅ CI green | Native Qt backend; no extra libs |
| Windows | ✅ CI green | Native Qt backend; no extra libs |
All binary dependencies (pyhdf, h5py, rasterio, PySide6) ship pip wheels for all three platforms — no compilation needed.
Citing
See CITATION.cff.
License
MIT — see LICENSE.
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 lstnet-0.2.0.tar.gz.
File metadata
- Download URL: lstnet-0.2.0.tar.gz
- Upload date:
- Size: 108.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff88e4a97675f885561042705bdf5a788616dd1a701b9df974841474a7248e5b
|
|
| MD5 |
e14e6c230bb735753fa8ee9731ab399c
|
|
| BLAKE2b-256 |
5fbad8dd3acd1b75773200502eb7ad8e5e334da852de678ec6f949a574263d11
|
Provenance
The following attestation bundles were made for lstnet-0.2.0.tar.gz:
Publisher:
publish.yml on veniai/lstnet
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lstnet-0.2.0.tar.gz -
Subject digest:
ff88e4a97675f885561042705bdf5a788616dd1a701b9df974841474a7248e5b - Sigstore transparency entry: 1888639383
- Sigstore integration time:
-
Permalink:
veniai/lstnet@5703e466da4acd063d943d6b4b57d37b82c2f7f5 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/veniai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5703e466da4acd063d943d6b4b57d37b82c2f7f5 -
Trigger Event:
release
-
Statement type:
File details
Details for the file lstnet-0.2.0-py3-none-any.whl.
File metadata
- Download URL: lstnet-0.2.0-py3-none-any.whl
- Upload date:
- Size: 54.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0020e42818dc2d2e51affa2621cd30909497e698499c2dd2120ec08b282438b
|
|
| MD5 |
982721362595cac90c4c8999eb92aa8d
|
|
| BLAKE2b-256 |
07538d44353537537a489fb85edf6205632f18c29eaacddadfcc14e2d6ff68e1
|
Provenance
The following attestation bundles were made for lstnet-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on veniai/lstnet
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lstnet-0.2.0-py3-none-any.whl -
Subject digest:
e0020e42818dc2d2e51affa2621cd30909497e698499c2dd2120ec08b282438b - Sigstore transparency entry: 1888639459
- Sigstore integration time:
-
Permalink:
veniai/lstnet@5703e466da4acd063d943d6b4b57d37b82c2f7f5 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/veniai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5703e466da4acd063d943d6b4b57d37b82c2f7f5 -
Trigger Event:
release
-
Statement type: