Light curves (wcc_etc.lightcurve)

WCC light-curve simulation.

LightCurveSimulator turns a FluxModel + a Simulation into a synthetic observed WCC light curve, using one ETC photometric SNR measurement at baseline brightness as the per-point error. The flux models themselves (FluxModel, TransitModel) live in the instrument-agnostic lazuli_exo.transit package and are re-exported here for backward compatibility.

Two conventions matter for interpreting the output:

Timestamps are mid-exposure. Each entry of time is the centre of an exptime-long window, and the model is averaged over that window (supersampled, see supersample_factor) so that finite-cadence smearing of ingress and egress is captured. Feeding exposure start times shifts the recovered ephemeris by half an exposure.

Photometric error is flux-independent. sigma = 1 / SNR is computed once from the out-of-transit (baseline) brightness and applied at every point, in transit and out. In reality the source shot-noise term scales as sqrt(f), so the true in-transit error is smaller than this by roughly 1 - depth / 2 in the source-limited regime, and by less than that whenever sky, host, dark or read noise contribute. The approximation is therefore conservative and accurate to first order in the transit depth: for a 1% transit it overstates the in-transit error by <0.5%. It becomes noticeably wrong for deep (>~5%) transits of source-noise-dominated targets; model those with an external, per-point error budget.

wcc_etc.lightcurve.supersample_factor(exptime, target_s=10.0)[source]

Odd number of sub-samples spanning an exptime-second exposure.

Chosen so that each sub-sample is no longer than target_s seconds, and forced odd so one sub-sample lands on the mid-exposure timestamp itself. Returns 1 for exposures at or below target_s, i.e. short exposures are not oversampled.

class wcc_etc.lightcurve.LightCurve(time, flux, flux_clean, flux_err, exptime, snr, supersample=1)[source]

Bases: object

Result of a light-curve simulation.

Variables:
  • time (ndarray # mid-exposure timestamps (days))

  • flux (ndarray # noisy realization)

  • flux_clean (ndarray # noiseless model, averaged over each exposure)

  • flux_err (float # per-point sigma (= 1 / snr), baseline value) – # applied in and out of transit (see module docs)

  • exptime (float # per-point exposure time (s))

  • snr (float # baseline photometric SNR)

  • supersample (int # sub-samples averaged per exposure)

plot(backend='mpl', **kw)[source]

Plot this light curve. Wired to plotting.py (lazy import to avoid an import cycle, mirroring SimulatedImage).

class wcc_etc.lightcurve.LightCurveSimulator(sim, model)[source]

Bases: object

Turn a FluxModel into a WCC-observed light curve via the ETC.

simulate(time, exptime, *, r_aper_mas=None, ee_frac=None, psf=None, jitter_sigma_mas=None, npix=128, seed=None, supersample=None)[source]

Simulate an observed light curve.

time holds mid-exposure timestamps in days; the model is averaged over the exptime-long window centred on each one. Pass supersample to override the number of sub-samples per exposure (default: supersample_factor(exptime)); supersample=1 restores the instantaneous sampling used before this was added.

The returned flux_err is the baseline (out-of-transit) sigma and is applied at every point – see the module docstring for the validity range of that approximation.