Survey-aware light-curve column auto-detection - #7
Merged
Conversation
Expand ColumnMap's detection lists to cover the standard light-curve products of the major time-domain surveys, so a downloaded table needs no column hints: ASAS-SN, ASAS-3, ATLAS, CRTS/CSS, ZTF, Pan-STARRS, LSST, TESS, Kepler, Gaia, MACHO. Headers added from each survey's authoritative format docs: magerr (ZTF/CRTS), flux_error (Gaia), dm/uJy/duJy (ATLAS), psfFlux/psfFluxErr/obsTime/filterID (Pan-STARRS), midpointMjdTai/band + DP0.2 midPointTai/psFlux/filterName (LSST), MAG_0/MER_0 (ASAS-3), filtercode/hmjd (ZTF), bkjd (Kepler), KSPSAP_FLUX (TESS QLP). Error resolution is now domain- and measurement-aware: the error is derived from the resolved value column first (PDCSAP_FLUX -> PDCSAP_FLUX_ERR, uJy -> duJy), then the domain-appropriate list, then neutral spellings. This pairs a flux value with a flux error and a magnitude value with a magnitude error even when a table carries both (ATLAS m/dm + uJy/duJy), and avoids the ATLAS F-filter vs flux-f collision. Corrected/detrended fluxes (PDCSAP, KSPSAP) are preferred over raw SAP; infer_domain recognizes flux-unit names (uJy/mJy/nmgy). Docs: a "Supported surveys" table in the light-curves guide, incl. headerless OGLE and positional reading. Tests: a parametrized check over 13 real survey header sets. Verified: pytest 137 passed / 2 skipped, ruff + mypy clean, docs -W build clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes column auto-detection plug-and-play with real light-curve downloads from the
major time-domain surveys —
cup.periodogram(df, "GLS")works with no column hintsfor ASAS-SN, ASAS-3, ATLAS, CRTS/CSS, ZTF, Pan-STARRS, LSST, TESS, Kepler, Gaia, and
MACHO. Headers were taken from each survey's authoritative format docs (IRSA, MAST,
ESA Gaia datamodel, LSST sdm_schemas, fallingstar-data, ASAS/OGLE READMEs).
What changed
columns.py) with the real spellings each survey uses —e.g.
magerr(ZTF/CRTS),flux_error(Gaia),uJy/duJy/dm(ATLAS),psfFlux/psfFluxErr/obsTime/filterID(Pan-STARRS),midpointMjdTai/band+DP0.2
midPointTai/psFlux/filterName(LSST),MAG_0/MER_0(ASAS-3),filtercode/HMJD(ZTF),KSPSAP_FLUX(TESS QLP),bkjd(Kepler).value column first (
PDCSAP_FLUX→PDCSAP_FLUX_ERR,uJy→duJy), then thedomain-appropriate list, then neutral
err/sigma. Keeps a flux value with a fluxerror and a magnitude value with a magnitude error even when a table has both (ATLAS),
and avoids the ATLAS
F-filter vs flux-fcollision.PDCSAP_FLUX,KSPSAP_FLUX) over rawSAP_FLUX;infer_domainrecognizes flux units (uJy/mJy/nmgy).Docs & tests
products (OGLE
.dat) and positional reading.time/value/error/band resolution (incl. the ATLAS and TESS pairing subtleties).
Verification
pytest137 passed / 2 skipped · ruff + mypy clean · docs-Wbuild clean.Limits (documented)
Ffilter, and OGLE/MACHO headerless or undocumented spellings,need an explicit
ColumnMap.g_transit_flux…) is out of scope; the standard flat epochproduct is covered.
🤖 Generated with Claude Code