SNAD dustmaps API v1

Two single-coordinate endpoints. All responses are JSON. Coordinates are ICRS degrees; distance is parsecs. Values match the reference Python dustmaps package to within 1e-6 relative tolerance.

GET /api/v1/csfd

2D E(B−V) from the CSFD map (Chiang 2023), nearest HEALPix pixel, no interpolation.

paramtypedescription
rafloat, degRight ascension, ICRS
decfloat, degDeclination, ICRS, in [−90, 90]
$ curl 'https://dustmaps.snad.space/api/v1/csfd?ra=83.6331&dec=22.0145'
{"ebv":0.5432}

GET /api/v1/bayestar2019

3D E(B−V) from the Bayestar19 map (Green et al. 2019), mode='best', with the 0.884 conversion factor already applied. Returns {"ebv": null} (HTTP 200) outside the PS1 footprint (roughly dec < −30°).

paramtypedescription
rafloat, degRight ascension, ICRS
decfloat, degDeclination, ICRS, in [−90, 90]
distancefloat, pcDistance, must be > 0
$ curl 'https://dustmaps.snad.space/api/v1/bayestar2019?ra=266.4051&dec=-28.936175&distance=8000'
{"ebv":1.9033}

$ curl 'https://dustmaps.snad.space/api/v1/bayestar2019?ra=0&dec=-80&distance=1000'
{"ebv":null}

GET /api/v1/health

Liveness probe. Returns {"status":"ok"} once both maps are mapped and shape-validated; used by the container HEALTHCHECK.

Errors

Bad input (non-finite ra/dec, |dec| > 90, or non-positive distance) → 400 with a JSON body:

{"error":"ra and dec must be finite, with -90 <= dec <= 90"}