Count rates (wcc_sim.starflux)

Convert Gaia photometry to WCC detector count rates via wcc_etc.

Each star: BP-RP -> nearest Pickles dwarf type; that spectrum normalized to the star’s G mag (vegamag) in the Gaia DR3 G bandpass; integrated through the instrument throughput by wcc_etc. Rates are memoized per (spt, sensorfilter) at G = REF_MAG and scaled analytically per star.

wcc_sim.starflux.gaia_g_bandpass()[source]

Gaia DR3 G passband (SVO FPS: GAIA/GAIA3.G) as a SpectralElement.

wcc_sim.starflux.spt_from_bp_rp(bp_rp)[source]

Nearest-neighbor Pickles dwarf type for BP-RP; NaN -> ‘G2V’.

wcc_sim.starflux.spt_from_b_v(b_v)[source]

Nearest-neighbor Pickles dwarf type for Johnson B-V; NaN -> ‘G2V’.

The B-V counterpart of spt_from_bp_rp, for catalogs (Hipparcos) that give Johnson photometry instead of Gaia’s.

wcc_sim.starflux.g_minus_v(spt)[source]

Synthetic Gaia G - Johnson V for a Pickles type.

wcc_sim.starflux.g_minus_v_at_b_v(b_v)[source]

Synthetic Gaia G - Johnson V interpolated in B-V.

Taking the nearest template’s G-V makes the derived G a step function of colour: between M2V (B-V 1.461, G-V -0.859) and M4V (1.618, -1.408) it jumps 0.55 mag at the midpoint, well inside Hipparcos’s own B-V error for a red star. The template still sets the SED; only this conversion is interpolated. NaN colour falls back to the G2V entry, matching spt_from_b_v’s own fallback.

Colours outside the tabulated range are clamped to the end templates (np.interp’s default), which is the right behaviour: extrapolating a colour-colour sequence off its end is worse than saturating it.

wcc_sim.starflux.bp_rp_for_spt(spt)[source]

The BP-RP that spt_from_bp_rp maps back to this type.

wcc_sim.starflux.make_star_simulation(spt, sensorfilter, mag=15.0)[source]

wcc_etc Simulation for one Pickles star normalized in Gaia G (vegamag).

wcc_sim.starflux.rate_for_spt(spt, sensorfilter)[source]

Total point-source rate (e-/s) at G = REF_MAG, memoized.

spt is coerced to a plain str: wcc_etc.scene dispatches on an exact type(x) is str check, so a numpy.str_ (as produced by indexing the array spt_from_bp_rp returns) silently falls through to a spectrum-less scene and a rate of 0.0 instead of raising.

wcc_sim.starflux.rates_for_catalog(catalog, sensorfilter)[source]

Per-star (rate_e_s, spt) arrays for a Gaia catalog Table.

An optional spt column overrides the BP-RP lookup row-wise (empty string = no override).

wcc_sim.starflux.sky_and_dark_rates(sim)[source]

(sky_e_s_per_pix, dark_e_s_per_pix) for a base simulation.