Fetch hydrogen-atom data from NIST's static Handbook tables (which work through sandbox proxies, unlike the CGI endpoints). Used by prism-data-fetcher for P1-T* baseline data and P5-T2/T3 extended datasets. Retries with backoff, caches to disk, emits proper handoff-contract metadata.
Works reliably:
https://physics.nist.gov/PhysRefData/Handbook/Tables/hydrogentable5.htm (and tables 2/3 for wavelengths)Commonly blocked by sandbox proxies:
/cgi-bin/ASD/lines1.pl — returns 503 via many proxiesAlways try the Handbook first. Only fall back to CGI if the task explicitly needs levels beyond n=5.
scripts/fetch_nist.py which handles the proven URL list, retry, cache, and SHA256 writes:python scripts/fetch_nist.py --table hydrogen5 --out working_dir/raw_data/
Verify the response with scripts/verify_fetch.py <path> — checks HTTP 200, content length ≥ expected minimum, and presence of anchor strings (e.g., "H I" and "Limit" for table 5).
Write the sidecar .meta.yaml with fetch provenance per the handoff contract:
generated_by: prism-data-fetcher
generated_at: <timestamp>
source_url: https://physics.nist.gov/PhysRefData/Handbook/Tables/hydrogentable5.htm
http_status: 200