feat: add Pan-STARRS (PS1) survey - #138
Merged
Merged
Conversation
Member
Author
|
Addressed code review findings:
All validation re-run and clean (pytest, pre-commit, all 6 filters match speclite exactly). |
Adds surveycodex/data/PanSTARRS.yaml for the Pan-STARRS1 (PS1) wide-field survey (1.8m telescope, GPC1 camera, Haleakala), with g/r/i/z/y/w filters. Sourcing highlights: - pixel_scale, mirror_diameter, obscuration: Chambers et al. 2016 (arXiv:1612.05560), Table 2. Obscuration derived from the paper's quoted effective aperture (0.65 x pi x 92.2cm^2 = 17284 cm^2) relative to the 1.8m primary mirror. - gain: Tonry et al. 2012 (arXiv:1203.0297), Section 2.5, measured 0.97 e-/ADU for the calibration amplifier. - zeropoint_airmass: 1.2, explicitly stated in Tonry et al. 2012 as the reference airmass for the PS1 natural-system zeropoints (speclite's panstarrs filters carry no airmass metadata, unlike decam2014/sdss2010). - sky_brightness: Tonry et al. 2012, Table 4 (mu_obs), a single source covering all 6 filters including w. - full_exposure_time: Chambers et al. 2016 Table 11 nominal exposure x 12 dithered visits (Section 3.2.3) for g/r/i/z/y; w uses the single nominal exposure from Denneau et al. 2013 (arXiv:1302.7281) since the Solar System Survey has no documented stacked-visit design for wP1. - psf_fwhm: Chambers et al. 2016 Table 11 median FWHM for g/r/i/z/y; w approximated from rP1 (closest effective wavelength) since Table 11 has no wP1 row. - zeropoint / effective_wavelength: computed with speclite (panstarrs filter group), validated to reproduce DES's shipped values exactly before trusting the same code path for PS1. Also adds "PanSTARRS": "panstarrs" to SPECLITE_SURVEY_PREFIXES in scripts/check_zeropoints.py and scripts/check_effective_wavelengths.py; both scripts now match speclite exactly for all 6 filters. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The panstarrs filter group was only added in speclite 1.0.0, which requires Python >=3.10. CI's Python 3.7/3.8/3.9 jobs install speclite 0.20 (the latest release compatible with those interpreters), which does not ship the panstarrs group, causing check_zeropoints.py and check_effective_wavelengths.py to crash with a ValueError instead of printing the usual "not available" message. Both scripts now catch that ValueError and print an informative message instead of crashing, without changing behavior for any survey whose filter group is present in the installed speclite version. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- surveycodex/data/PanSTARRS.yaml: fix two reference-comment inaccuracies caught by code review. The obscuration derivation quoted "92.2 cm" but Chambers et al. 2016 Table 2 actually states the radius as "92 cm" (0.65 x pi x 92^2 = 17284 cm^2, matching the paper's own stated area; the shipped obscuration value was already numerically correct since it used the paper's final area directly, only the worked-example text was wrong). The zeropoint_airmass comment cited "Section 2.6" but the quoted PS1 natural-system definition is actually in Section 3 of Tonry et al. 2012 (Section 2.6 is an unrelated "Photometry Refinement" section). - scripts/check_zeropoints.py, scripts/check_effective_wavelengths.py: narrow the try/except ValueError added for PanSTARRS so it only swallows speclite's "No such group" error (meaning this speclite version lacks the filter group entirely, e.g. panstarrs on speclite<1.0.0/Python<3.10) and re-raises anything else. Previously any ValueError from load_filter was silently treated as "filter group unavailable," which would also swallow a genuine "No such filter in this group" error -- e.g. a future survey's filter-name mapping bug -- and misreport it as a speclite-version issue for every survey using this shared validation code, not just PanSTARRS. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
aboucaud
force-pushed
the
add-panstarrs-survey
branch
from
October 1, 2026 00:10
fa3f31f to
429e20c
Compare
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
Adds Pan-STARRS1 (PS1) as a new survey:
surveycodex/data/PanSTARRS.yaml(filename/survey name confirmed with the maintainer — no hyphen, unlike the mission's "Pan-STARRS" branding). Telescope: the 1.8m PS1 telescope at Haleakala, Hawaii. Instrument: Gigapixel Camera #1 (GPC1). Filters:g,r,i,z,y, plus the widewfilter.zeropoint/effective_wavelengthare computed withspeclite'spanstarrsfilter group, which was confirmed to resolve for all 6 bands.Also adds
"PanSTARRS": "panstarrs"toSPECLITE_SURVEY_PREFIXESinscripts/check_zeropoints.pyandscripts/check_effective_wavelengths.py.Sourced values and citations
pixel_scalemirror_diameterobscuration0.65 × π × (92.2 cm)² = 17284 cm²"including diffraction and obscuration";obscuration = 1 − 17284 cm² / (π × 90 cm²)relative to the 1.8 m primarygainzeropoint_airmasssky_brightness(g/r/i/z/y/w)µ_obs(observed sky brightness) — one consistent source covering all 6 filters, includingw, which has no entry in Chambers et al. 2016's 3π-survey-only tablesfull_exposure_time(g/r/i/z/y)full_exposure_time(w)wP1, so the single nominal exposure is used rather than a guessed totalpsf_fwhm(g/r/i/z/y)psf_fwhm(w)wP1row exists in Table 11; approximated withrP1's median FWHM sincewP1's effective wavelength (608 nm, Tonry et al. 2012 Table 4) is closest torP1(617 nm) among the tabulated 3π filters, and no directwP1seeing measurement was found in the literaturezeropoint,effective_wavelengthspeclite'spanstarrs-*filtersOn
zeropoint_airmassspecificallyUnlike
decam2014/sdss2010, speclite'spanstarrsfilters carry noairmassmetadata (load_filter('panstarrs-r').meta.get('airmass')returnsNone). Rather than reuse another survey's airmass or guess, I went to the primary source defining the PS1 photometric system (Tonry et al. 2012) and found the reference airmass explicitly stated as 1.2 in the text describing Table 4's zeropoint definition. This is a real, citable value, not an assumption.Methodology validation
Before trusting the
compute_zeropoint_mag/ speclite code path for PS1, I reproduced DES's already-shippeddecam2014-g/r/i/zzeropoints and effective wavelengths usingDES.yaml's ownmirror_diameter/obscuration, and got an exact match (e.g. g: 26.72 mag / 489.004 nm) before applying the same method topanstarrs-*.Test plan
pytest --cov— 36 passedpre-commit run --all-files— all hooks pass (isort, black, flake8, pyupgrade, etc.)python -m surveycodex— PanSTARRS prints correctly with all 6 filterssurveycodex --refs— references block prints correctlypython scripts/check_zeropoints.py— speclite vs surveycodex match exactly for all 6 filters (g/r/i/z/y/w)python scripts/check_effective_wavelengths.py— speclite vs surveycodex match exactly for all 6 filters🤖 Generated with Claude Code