Skip to content

mkdust: a dust-map prior tool for the sight-line dust profile (dust stack PR 4) - #609

Open
jdeast wants to merge 3 commits into
masterfrom
feat/dust-map-tool
Open

jdeast wants to merge 3 commits into
masterfrom
feat/dust-map-tool

Conversation

@jdeast

@jdeast jdeast commented Nov 18, 2026

Copy link
Copy Markdown
Owner

What

exozippy-mkdust <ra> <dec> reads every extinction map it can reach at a sky position and writes <name>.dust.params.yaml: candidate priors on sed.dust_anchor, ONE live and every other commented out, the way exozippy-mkticsed comments out non-default catalog rows. It is the fourth PR of the dust stack (color rows #600 -> red clump #601 -> the sight-line A_V(d) profile #604 -> this), and feeds #604's existing channel: sed.dust_anchor is the profile's sampled total, the extinction at its anchor (the bar distance with a red clump or a galactic model). No new config key.

exozippy-mkdust 17:53:48.01 -29:15:47.48 --name KB242087

Maps

map how it is read written as
Surot et al. 2020, VVV E(J-Ks) VizieR cone (J/A+A/644/A140), nearest node default: A_V = 6.458 E(J-Ks); also A_Ks = 0.422 E(J-Ks) in VISTA Ks
Zelakiewicz et al. 2025, UKIRT A_Ks Zenodo 14919461 (md5-pinned in zenodo_assets, on demand) A_V = 15.30 A_Ks (default if Surot is unreachable); A_Ks in 2MASS Ks; flagged lower-limit pixels are marked and never the default
Nataf et al. 2013, OGLE-III A_I, E(V-I) Table 3 from the OGLE archive (size/md5 pinned), nearest reliable point within 600" A_V = A_I + E(V-I); A_I in Cousins I
SFD / Schlafly & Finkbeiner 2011 IRSA A_V = 3.1 E(B-V); live only at abs(b) >= 5 (whole column, invalid toward the inner bulge)
Zucker+2025, Bayestar19, Gonzalez+2012 BEAM, VVV-ExMaps, Marshall+2006 not queried listed in every output with the reason

Why the default is A_V converted with Nataf+2013 rather than a native Ks line (dust_anchor_band): the fit's law (CCM89 + O'Donnell) has a fixed near-infrared slope, so A_V/A_Ks ~ 8.4 at R_V = 3.1, where the bulge measures 13-15. A Ks anchor would put ~40% too little dust into V and I. The Ks lines are written commented, and they become the better choice once the near-infrared slope is fitted (the next PR in the stack). Conversion: Nataf+2013 bulge means A_I = 1.217 E(V-I), E(J-Ks)/E(V-I) = 0.3433. Width: the map error plus a 7% sight-line scatter of that ratio, measured on Nataf's Table 3, plus 10% for the A_Ks -> E(J-Ks) step of a Ks map. Everything is in the new docs/dust_maps.md, and sed.md, redclump.md, sed/defaults.yaml and CLAUDE.md point to it.

A failed query is written as FAILED with its error and logged as a WARNING, and the header names the preferred map the default passed over. A changed catalog format raises MapFormatError naming the missing column. It never guesses a column.

Example: KMT-2024-BLG-2087, (l, b) = (0.64, -1.70)

VizieR (CDS) was down when this was written, so Surot is FAILED here. The two maps that could be read agree:

# DEFAULT: Zelakiewicz et al. (2025), UKIRT A_Ks, as A_V.  A_V = 15.30 A_Ks (...)
# (Preferred but unusable here, see below: Surot et al. (2020).)
sed.dust_anchor: {mu: 3.303, sigma: 0.856, citation: [Zelakiewicz:2025, Surot:2020, Nataf:2013]}
# --- Nataf et al. (2013): A_I = 1.847, E(V-I) = 1.516, S_E(V-I) = 0.157, 62" away
# sed.dust_anchor: {mu: 3.363, sigma: 0.348, citation: [Nataf:2013]}
# --- SFD: E(B-V)_SF11 = 0.969 (whole column)
# sed.dust_anchor: {mu: 3.005, sigma: 0.107, citation: [Schlafly:2011, Schlegel:1998]}

Also

  • zenodo.py's download messages name the host. They used to say "from Zenodo" for every file, which was wrong for the OGLE archive.
  • scripts/zenodo_publish.py's render_record quotes a title holding " the way ruff does, so the registry round-trip test holds for the new third-party record.
  • Bib: Zelakiewicz:2025, Schlafly:2011. Registered as an SED utility (mkdust) for the GUI.

Tests

tests/test_mkdust.py (no network: fixtures in each map's own format, monkeypatched VizieR/IRSA). It covers each reader's numbers, outside / flagged / failed handling, the default order, the SFD latitude rule, the CLI's negative sexagesimal Dec, every written line parsing as YAML with references.bib keys, and the live line resolving as the sed.dust_anchor prior of a lens + source + clump dust-profile system. test_citation_field now also scans mkdust's keys. The Zenodo pin passes the live network test.

The live Surot path is untested end-to-end: CDS refused connections all day. Its column names (E(J-Ks), e_E(J-Ks)) follow VizieR's convention, and if they differ it raises naming them.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AWjnwpYHm56hSpKBzbPhrG

jdeast and others added 2 commits November 18, 2026 10:26
…tack PR 4)

exozippy-mkdust <ra> <dec> reads every extinction map it can reach and
writes <name>.dust.params.yaml: candidate priors on sed.dust_anchor (the
existing channel of the dust profile, review 8.9.8), one live and the rest
commented out, the way mkticsed comments out non-default catalog rows.

Default, following Nataf: Surot+2020 (VVV E(J-Ks), VizieR), else
Zelakiewicz+2025 (UKIRT A_Ks, Zenodo 14919461, pinned in zenodo_assets as
an on-demand third-party record), converted to A_V with the Nataf+2013
bulge-mean ratios (A_V = 6.458 E(J-Ks); 7% sight-line scatter measured on
Nataf's Table 3).  Also written: each map in its native band (with the
dust_anchor_band it needs), Nataf+2013 OGLE-III A_I/E(V-I) (Table 3, md5
pinned) and SFD/SF11 (live only at |b| >= 5).  Maps that cannot be queried
programmatically are listed with the reason.  A failed query is reported
as FAILED in the file and as a WARNING, and the header names the
preferred map the default passed over.

docs/dust_maps.md records the conversions, widths and choices; sed.md,
redclump.md, sed/defaults.yaml and CLAUDE.md point there.  zenodo.py's
download messages now name the host (the OGLE archive is not Zenodo).
Tests (no network): tests/test_mkdust.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AWjnwpYHm56hSpKBzbPhrG
…s, as ruff does

The Zelakiewicz+2025 record's title quotes its paper's title; ruff format
writes such a literal single-quoted, so render_record's round trip against
the shipped registry must too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AWjnwpYHm56hSpKBzbPhrG

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant