From Gaia photometry to count rates

The starflux module converts each Gaia star into a detector count rate through the wcc_etc instrument model. The chain, per star:

  1. BP−RP → spectral type and rate. The star’s Gaia BP−RP color is matched to the nearest Pickles dwarf template (spt_from_bp_rp()) using each template’s own synthetic BP−RP (wcc_sim/data/spt_synthetic_colors.csv, regenerated by scripts/build_spt_colors.py). That template sets the SED and the PSF color; the count rate itself is interpolated in log(rate) between the two templates bracketing the color (log_rate_at_bp_rp()), so rates are continuous in color instead of stepping by tens of percent at template boundaries. Stars with missing or masked colors fall back to G2V and are flagged in the CAT column spt_fallback. Templates are dwarfs only and unreddened.

  2. Normalize in Gaia G. That Pickles spectrum is normalized to the star’s phot_g_mean_mag (Vega system) in the Gaia DR3 G bandpass (SVO filter service GAIA/GAIA3.G, shipped as wcc_sim/data/gaia_dr3_g.dat).

  3. Integrate through the instrument. The normalized spectrum is pushed through the full wcc_etc throughput (telescope + filter + detector QE) to a total point-source rate in e-/s (rate_for_spt()).

Memoization

Computing a synphot integration per star would be prohibitively slow for a full array with tens of thousands of stars. Instead the rate is computed once per (spectral type, sensorfilter) pair at a reference magnitude G = 15 and scaled analytically:

\[\mathrm{rate}(G) = \mathrm{rate}(G{=}15) \times 10^{-0.4\,(G - 15)}\]

This is exact for a fixed spectral shape, and reduces the synphot work from ~50 000 integrations to at most ~45 (one per Pickles dwarf type).

Note

The reference pin used by the test suite: rate_for_spt("G2V", "zwo:r") ≈ 38 484 e-/s at G = 15. If the wcc_etc throughput model changes, test_rate_reference_pin explains how to re-record it.

Sky and dark

sky_and_dark_rates() extracts the per-pixel zodiacal sky background and dark-current rates from the same base simulation; both are added uniformly to the image in the noise stage (Noise and saturation), and both are recorded in field.params and the FITS header (SKYRATE, DARK).

Practical notes

  • Rates assume Pickles dwarf spectra; giants of the same color are slightly off in the band-shape correction, which is acceptable for a context camera simulation.

  • The per-(type, filter) cache lives for the Python session (module-level dict); the first star of each type pays the synphot cost.

  • spt values in the output catalog let you audit exactly which template each star received.