coronalyze.analysis.yields#

Simplified analysis tools for yield modeling and noise floor estimation.

Implements ‘Faux-RDI’ and related tools for yield calculations where we assume perfect knowledge of the background model (stellar speckles + disk).

Functions#

get_perfect_residuals(observation, expectation_model)

Calculate residuals assuming perfect subtraction of static structure.

get_photon_noise_map(expectation_rate, exposure_time)

Calculate the theoretical 1-sigma noise map in rate units.

simulate_observation(clean_signal, background_model[, ...])

Generate a noisy realization of the scene for yield tests.

Module Contents#

coronalyze.analysis.yields.get_perfect_residuals(observation, expectation_model)[source]#

Calculate residuals assuming perfect subtraction of static structure.

This simulates ‘Faux-RDI’: we subtract the exact expectation value of the star and disk. The residual contains only the fundamental noise (photon + read noise) and any signals not in the model (planets).

Args:

observation: The noisy data (Data = Poisson(Model) + ReadNoise). expectation_model: The noiseless expectation of background sources

(stellar PSF + disk, excluding planets).

Returns:

Residual image containing noise + unmodeled signals (planets).

Parameters:
  • observation (jax.numpy.ndarray)

  • expectation_model (jax.numpy.ndarray)

Return type:

jax.numpy.ndarray

coronalyze.analysis.yields.get_photon_noise_map(expectation_rate, exposure_time, read_noise=0.0)[source]#

Calculate the theoretical 1-sigma noise map in rate units.

Properly converts between rate and count units to combine photon noise with read noise. Returns noise in the same units as input (counts/sec).

Formula: Sigma_rate = sqrt(Rate * t + RN^2) / t

Args:

expectation_rate: Expected count rate image (counts/sec). exposure_time: Integration time in seconds. read_noise: Read noise in electrons (per pixel). Default 0.

Returns:

1-sigma noise map in rate units (counts/sec), same shape as input.

Parameters:
  • expectation_rate (jax.numpy.ndarray)

  • exposure_time (float)

  • read_noise (float)

Return type:

jax.numpy.ndarray

coronalyze.analysis.yields.simulate_observation(clean_signal, background_model, exposure_time=1.0, rng_key=None)[source]#

Generate a noisy realization of the scene for yield tests.

Applies Poisson noise to the combined scene (signal + background). Returns data in rate units (counts/sec).

Args:

clean_signal: Planet image (counts/sec). background_model: Star + Disk expectation (counts/sec). exposure_time: Integration time (seconds). rng_key: JAX PRNG Key. If None, uses key 0.

Returns:

Noisy image in units of counts/sec (Poisson noise added in counts, then divided back by exposure time).

Parameters:
  • clean_signal (jax.numpy.ndarray)

  • background_model (jax.numpy.ndarray)

  • exposure_time (float)

  • rng_key (jax.Array)

Return type:

jax.numpy.ndarray