Skip to content

feat: add SDSS survey - #139

Merged
aboucaud merged 2 commits into
mainfrom
add-sdss-survey
Oct 1, 2026
Merged

aboucaud merged 2 commits into
mainfrom
add-sdss-survey

Conversation

@aboucaud

Copy link
Copy Markdown
Member

Summary

Adds the Sloan Digital Sky Survey (SDSS) as surveycodex/data/SDSS.yaml: the 2.5m SDSS telescope at Apache Point Observatory with the SDSS imaging camera (Gunn et al. 1998), filters u, g, r, i, z (speclite's sdss2010 filter group).

Sourced values

Field Value Source
pixel_scale 0.396 arcsec/pixel Xin et al. 2018 (arXiv:1805.02845), Sec 2: "0.396 arcsec per pixel". Matches Gunn et al. 1998's design value (rounded to 0.4″/24µm pixel, image scale 16.5″/mm).
gain 6.0 e-/ADU Gunn et al. 1998 (arXiv:astro-ph/9809085), Sec 5: nominal conversion gain is 2 e-/ADU (u'), 5 e-/ADU (g'), 6 e-/ADU (r', i', z'). Used 6, the value shared by 3/5 bands incl. the r-band reference filter, as the single survey-level representative value.
mirror_diameter 2.5 m Gunn et al. 1998, Sec 1.
obscuration 0.27 Gunn et al. 1998, Sec 3 (Eq. 2): "a 27% obscuration of incoming flux by the secondary mirror and the light baffles".
zeropoint_airmass 1.3 speclite docs: sdss2010 filters use a reference APO atmosphere at airmass 1.3.
sky_brightness (u,g,r,i,z) 22.01, 21.84, 20.84, 20.16, 18.96 mag/arcsec² SDSS DR17 imaging data-quality page, median (50th pct) per-filter sky brightness for moon-down observations.
full_exposure_time 54.1 s (all bands) Xin et al. 2018, Sec 2: single-pass TDI drift-scan exposure time. Consistent with Gunn et al. 1998's ~54s figure.
psf_fwhm (u,g,r,i,z) 1.47, 1.39, 1.32, 1.27, 1.23 arcsec Derived from the official SDSS median r-band seeing of 1.32″ (SDSS DR17 page above), scaled per band via the Kolmogorov relation FWHM ∝ λ^-0.2 (Xin et al. 2018, Eq. 7) using speclite's effective wavelengths — that paper shows this approximates SDSS's measured wavelength dependence of seeing.
zeropoint, effective_wavelength computed Computed with speclite's sdss2010-{u,g,r,i,z} filters (see scripts/check_zeropoints.py / check_effective_wavelengths.py).

Judgment calls called out:

  • gain and psf_fwhm vary per band in the primary sources but the schema stores one scalar survey-level gain; I picked the value shared by the majority of bands (r/i/z = 6 e-/ADU) rather than averaging.
  • No single published table gives per-band SDSS seeing (psf_fwhm); I derived it from an official median r-band anchor plus a peer-reviewed wavelength-scaling relation rather than guessing, and documented the derivation explicitly in the YAML references comment (same pattern already used for LSST.yaml's psf_fwhm).

Validation methodology

Before trusting the speclite-based zeropoint/effective-wavelength computation for SDSS, reproduced DES's already-shipped g-band values using the exact formula in scripts/check_zeropoints.py (compute_zeropoint_mag with exposure_time=1s, effective_area from DES's own mirror_diameter/obscuration) and confirmed an exact match (zeropoint=26.7239≈26.72, effective_wavelength=489.0037≈489.004) before applying the same method to SDSS.

Test plan

  • pytest --cov — 36 passed
  • pre-commit run --all-files — all hooks pass
  • python -m surveycodex — SDSS prints correctly
  • surveycodex --refs — SDSS references print correctly
  • python scripts/check_zeropoints.py — speclite vs surveycodex match exactly for all 5 SDSS filters
  • python scripts/check_effective_wavelengths.py — speclite vs surveycodex match exactly for all 5 SDSS filters
  • CI checks green (see PR checks)

🤖 Generated with Claude Code

@aboucaud

aboucaud commented Oct 1, 2026

Copy link
Copy Markdown
Member Author

Addressed code review findings:

  • psf_fwhm was derived using the theoretical Kolmogorov exponent (α=-0.2) with a comment claiming Xin et al. 2018 supports it — the paper actually finds the data "clearly deviate" from α=-0.2 and favors α≈-0.3 (von Kármán model), and separately flags the z-band as not following the power law as well as u/g/r/i. Recomputed with α=-0.3 (u: 1.47→1.55, g: 1.39→1.43, i: 1.27→1.25, z: 1.23→1.18; r unchanged as the empirical anchor) and rewrote the comment to accurately reflect the paper's finding, with an explicit z-band uncertainty caveat.
  • Fixed two mis-cited section numbers (values were already correct, only the locators were wrong): gain's "Sec 5" → "Sec 7" (Gunn et al. 1998), pixel_scale/full_exposure_time's "Sec 2" → "Sec 1" (Xin et al. 2018).

All validation re-run and clean (pytest, pre-commit, speclite agreement).

aboucaud and others added 2 commits October 1, 2026 02:11
Add the Sloan Digital Sky Survey (SDSS) done with the 2.5m telescope at
Apache Point Observatory and the SDSS imaging camera (Gunn et al. 1998).

Sourcing:
- pixel_scale, full_exposure_time: Xin et al. 2018 (arXiv:1805.02845),
  corroborated by Gunn et al. 1998's ~0.4"/54s design values.
- gain, mirror_diameter, obscuration: Gunn et al. 1998
  (arXiv:astro-ph/9809085); gain uses the nominal 6 e-/ADU value shared
  by r/i/z (u=2, g=5 differ per the same source).
- sky_brightness: SDSS DR17 official imaging data-quality page
  (median per-filter dark-sky brightness).
- psf_fwhm: derived from the official SDSS median r-band seeing (1.32"),
  scaled per band via the Kolmogorov FWHM ~ lambda^-0.2 relation from
  Xin et al. 2018 (Eq. 7) using speclite effective wavelengths.
- zeropoint, effective_wavelength: computed with speclite's sdss2010
  filters; zeropoint_airmass=1.3 matches speclite's reference APO
  atmosphere for those filters.

Wire SDSS into scripts/check_zeropoints.py and
scripts/check_effective_wavelengths.py (SPECLITE_SURVEY_PREFIXES); both
scripts confirm exact agreement between speclite and the YAML values for
all 5 filters.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- psf_fwhm: the reference comment claimed Xin et al. 2018 "shows" the
  theoretical Kolmogorov relation (FWHM ~ lambda^-0.2, their Eq. 7)
  approximates SDSS's measured seeing wavelength-dependence. Code review
  found this misstates the paper: it reports the data "clearly deviate"
  from alpha=-0.2 and are better described by a von Karman atmosphere
  with alpha closer to -0.3 (their Sec 4.1 / Fig. 5), and explicitly
  flags that the z-band doesn't follow the fitted power law as well as
  u/g/r/i (their own refit excludes z). Recomputed psf_fwhm with
  alpha=-0.3 instead of -0.2 (u: 1.47->1.55, g: 1.39->1.43, i: 1.27->1.25,
  z: 1.23->1.18; r unchanged, it's the empirical anchor), rewrote the
  comment to accurately describe the paper's actual finding, and added
  an explicit caveat that the z-band value carries extra uncertainty.

- Fixed two incorrect section-number citations (values were already
  correct, only the locators were wrong): gain's comment cited Gunn et
  al. 1998 "Sec 5," but the quoted conversion-gain figures are actually
  in Sec 7 ("The Electronics"); pixel_scale and full_exposure_time both
  cited Xin et al. 2018 "Sec 2," but the quoted sentence is in Sec 1
  (Introduction).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@aboucaud
aboucaud merged commit ad929fd into main Oct 1, 2026
7 checks passed
@aboucaud
aboucaud deleted the add-sdss-survey branch October 1, 2026 00:14
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