Coronagraph Noise Modeling

The crux of coronagraph noise modeling is to determine the photon count rate incident upon the detector due to both the target planet and an assortment of different telescope, instrumental, and astrophysical noise sources. The following classes and functions serve as your interface to the photon count rate calculations. The core function for these calculations is count_rates(), but it may be accessed using the CoronagraphNoise object.

class coronagraph.count_rates.CoronagraphNoise(telescope=<coronagraph.teleplanstar.Telescope object>, planet=<coronagraph.teleplanstar.Planet object>, star=<coronagraph.teleplanstar.Star object>, texp=10.0, wantsnr=10.0, FIX_OWA=False, COMPUTE_LAM=False, SILENT=False, NIR=False, THERMAL=True, GROUND=False, vod=False, set_fpa=None, roll_maneuver=True)

The primary interface for coronagraph noise modeling. This object wraps around the functionality of count_rates(). Simply instantiate a CoronagraphNoise object by passing it telescope, planet, and star objects, and then call CoronagraphNoise.run_count_rates() to perform the photon count rate calculation.

Parameters:
  • telescope (Telescope) – Initialized object containing Telescope parameters
  • planet (Planet) – Initialized object containing Planet parameters
  • star (Star) – Initialized object containing Star parameters
  • texp (float) – Exposure time for which to generate synthetic data [hours]
  • wantsnr (float, optional) – Desired signal-to-noise ratio in each pixel
  • FIX_OWA (bool, optional) – Set to fix OWA at OWA*lammin/D, as would occur if lenslet array is limiting the OWA
  • COMPUTE_LAM (bool, optional) – Set to compute lo-res wavelength grid, otherwise the grid input as variable lam is used
  • SILENT (bool, optional) – Set to suppress print statements
  • NIR (bool, optional) – Re-adjusts pixel size in NIR, as would occur if a second instrument was designed to handle the NIR
  • THERMAL (bool, optional) – Set to compute thermal photon counts due to telescope temperature
  • GROUND (bool, optional) – Set to simulate ground-based observations through atmosphere
  • vod (bool, optional) – “Valley of Death” red QE parameterization from Robinson et al. (2016)
  • set_fpa (float, optional) – Specify the fraction of planetary signal in Airy pattern, default will calculate it from the photometric aperture size X
  • roll_maneuver (bool, optional) – This assumes an extra factor of 2 hit to the background noise due to a telescope roll maneuver needed to subtract out the background. See Brown (2005) for more details.

Note

The results of the coronagraph noise calculation will become available as attributes of the CoronagraphNoise object after CoronagraphNoise.run_count_rates() is called.

run_count_rates(Ahr, lamhr, solhr)

Calculate the photon count rates and signal to noise on a coronagraph observation given a wavelength-dependent planetary geometric albedo and stellar flux density.

Parameters:
  • Ahr (array) – High-res, wavelength-dependent planetary geometric albedo
  • lamhr (array) – High-res wavelength grid [um]
  • solhr (array) – High-res TOA solar spectrum [W/m**2/um]

Calling run_count_rates() creates the following attributes for the CoronagraphNoise instance:

Variables:
  • Ahr (array) – High-res, wavelength-dependent planetary geometric albedo
  • lamhr (array) – High-res wavelength grid [um]
  • solhr (array) – High-res TOA solar spectrum [W/m**2/um]
  • lam (array) – Observed wavelength grid [$mu$m]
  • dlam (array) – Observed wavelength grid widths [$mu$m]
  • A (array) – Planetary geometric albedo at observed resolution
  • Cratio (array) – Planet-to-star flux contrast ratio
  • cp (array) – Planetary photon count rate [photons/s]
  • csp (array) – Speckle count rate [photons/s]
  • cz (array) – Zodi photon count rate [photons/s]
  • cez (array) – Exo-zodi photon count rate [photons/s]
  • cth (array) – Thermal photon count rate [photons/s]
  • cD (array) – Dark current photon count rate [photons/s]
  • cR (array) – Read noise photon count rate [photons/s]
  • cc (array) – Clock induced charge photon count rate [photons/s]
  • cb (array) – Total background photon noise count rate [photons/s]
  • DtSNR (array) – Integration time to wantsnr [hours]
  • SNRt (array) – S/N in a texp hour exposure
  • Aobs (array) – Observed albedo with noise
  • Asig (array) – Observed uncertainties on albedo
  • Cobs (array) – Observed Fp/Fs with noise
  • Csig (array) – Observed uncertainties on Fp/Fs
make_fake_data(texp=None)

Make a fake/synthetic dataset by sampling from a Gaussian.

Parameters:texp (float, optional) – Exposure time [hours]. If not provided, the CoronagraphNoise.texp will be used by default.

Calling make_fake_data() creates the following attributes for the CoronagraphNoise instance:

Variables:
  • SNRt (array) – S/N in a texp hour exposure
  • Aobs (array) – Observed albedo with noise
  • Asig (array) – Observed uncertainties on albedo
  • Cobs (array) – Observed Fp/Fs with noise
  • Csig (array) – Observed uncertainties on Fp/Fs
plot_spectrum(SNR_threshold=1.0, Nsig=6.0, ax0=None, err_kws={'alpha': 1, 'c': 'k', 'fmt': '.'}, plot_kws={'alpha': 0.5, 'c': 'C4', 'lw': 1.0}, draw_box=True)

Plot noised direct-imaging spectrum.

Parameters:
  • SNR_threshold (float) – Threshold SNR below which do not plot
  • Nsig (float) – Number of standard deviations about median observed points to set yaxis limits
  • ax0 (matplotlib.axes) – Optional axis to provide
  • err_kws (dic) – Keyword arguments for errorbar
  • plot_kws (dic) – Keyword arguments for plot
  • draw_box (bool) – Draw important quantities in a box?
Returns:

  • fig (matplotlib.figure.Figure) – Returns a figure if ax0 is None
  • ax (matplotlib.axes) – Returns an axis if ax0 is None

Note

Only returns fig and ax is ax0 is None

plot_SNR(ax0=None, plot_kws={'ls': 'steps-mid'})

Plot the S/N on the planet as a function of wavelength.

Parameters:
  • ax0 (matplotlib.axes) – Optional axis to provide
  • plot_kws (dic) – Keyword arguments for plot
Returns:

  • fig (matplotlib.figure.Figure) – Returns a figure if ax0 is None
  • ax (matplotlib.axes) – Returns an axis if ax0 is None

Note

Only returns fig and ax is ax0 is None

plot_time_to_wantsnr(ax0=None, plot_kws={'alpha': 1.0, 'ls': 'steps-mid'})

Plot the exposure time to get a SNR on the planet spectrum.

Parameters:
  • ax0 (matplotlib.axes) – Optional axis to provide
  • plot_kws (dic) – Keyword arguments for plot
Returns:

  • fig (matplotlib.figure.Figure) – Returns a figure if ax0 is None
  • ax (matplotlib.axes) – Returns an axis if ax0 is None

Note

Only returns fig and ax is ax0 is None

coronagraph.count_rates.count_rates(Ahr, lamhr, solhr, alpha, Phi, Rp, Teff, Rs, r, d, Nez, mode='IFS', filter_wheel=None, lammin=0.4, lammax=2.5, Res=70.0, diam=10.0, Tput=0.2, C=1e-10, IWA=3.0, OWA=20.0, Tsys=260.0, Tdet=50.0, emis=0.9, De=0.0001, DNHpix=3.0, Re=0.1, Rc=0.0, Dtmax=1.0, X=1.5, qe=0.9, MzV=23.0, MezV=22.0, A_collect=None, diam_circumscribed=None, diam_inscribed=None, lam=None, dlam=None, Tput_lam=None, qe_lam=None, lammin_lenslet=None, wantsnr=10.0, FIX_OWA=False, COMPUTE_LAM=False, SILENT=False, NIR=False, THERMAL=False, GROUND=False, vod=False, set_fpa=None, CIRC=True, roll_maneuver=True)

Runs coronagraph model (Robinson et al., 2016) to calculate planet and noise photon count rates for specified telescope and system parameters.

Parameters:
  • Ahr (array) – High-res, wavelength-dependent planetary geometric albedo
  • lamhr (array) – High-res wavelength grid [um]
  • solhr (array) – High-res TOA solar spectrum [W/m**2/um]
  • alpha (float) – Planet phase angle [deg]
  • Phi (float) – Planet phase function
  • Rp (float) – Planet radius [R_earth]
  • Teff (float) – Stellar effective temperature [K]
  • Rs (float) – Stellar radius [R_sun]
  • r (float) – Planet semi-major axis [AU]
  • d (float) – Distance to observed star-planet system [pc]
  • Nez (float) – Number of exozodis in exoplanetary disk
  • mode (str, optional) – Telescope observing mode: “IFS” or “Imaging”
  • filter_wheel (Wheel, optional) – Wheel object containing imaging filters
  • lammin (float, optional) – Minimum wavelength [um]
  • lammax (float, optional) – Maximum wavelength [um]
  • Res (float, optional) – Instrument spectral resolution (lam / dlam)
  • diam (float, optional) – Telescope diameter [m]
  • Tput (float, optional) – Telescope and instrument throughput
  • C (float, optional) – Coronagraph design contrast
  • IWA (float, optional) – Coronagraph Inner Working Angle (lam / diam)
  • OWA (float, optional) – Coronagraph Outer Working Angle (lam / diam)
  • Tsys (float, optional) – Telescope mirror temperature [K]
  • Tdet (float, optional) – Telescope detector temperature [K]
  • emis (float, optional) – Effective emissivity for the observing system (of order unity)
  • De (float, optional) – Dark current [counts/s]
  • DNHpix (float, optional) – Number of horizontal/spatial pixels for dispersed spectrum
  • Re (float, optional) – Read noise counts per pixel
  • Rc (float, optional) – Clock induced charge [counts/pixel/photon]
  • Dtmax (float, optional) – Detector maximum exposure time [hours]
  • X (float, optional) – Width of photometric aperture (lam / diam)
  • qe (float, optional) – Detector quantum efficiency
  • MzV (float, optional) – V-band zodiacal light surface brightness [mag/arcsec**2]
  • MezV (float, optional) – V-band exozodiacal light surface brightness [mag/arcsec**2]
  • A_collect (float, optional) – Mirror collecting area (m**2) (uses \(\pi(D/2)^2\) by default)
  • diam_circumscribed (float, optional) – Circumscribed telescope diameter [m] used for IWA and OWA (uses diam if None provided)
  • diam_inscribed (float, optional) – Inscribed telescope diameter [m] used for lenslet calculations (uses diam if None provided)
  • lam (array-like, optional) – Wavelength grid for spectrograph [microns] (uses lammin, lammax, and resolution to determine if None provided)
  • dlam (array-like, optional) – Wavelength grid widths for spectrograph [microns] (uses lammin, lammax, and resolution to determine if None provided)
  • Tput_lam (tuple of arrays) – Wavelength-dependent throughput e.g. (wls, tputs)
  • qe_lam (tuple of arrays) – Wavelength-dependent throughput e.g. (wls, qe)
  • lammin_lenslet (float, optional) – Minimum wavelength to use for lenslet calculation (default is lammin)
  • wantsnr (float, optional) – Desired signal-to-noise ratio in each pixel
  • FIX_OWA (bool, optional) – Set to fix OWA at OWA*lammin/D, as would occur if lenslet array is limiting the OWA
  • COMPUTE_LAM (bool, optional) – Set to compute lo-res wavelength grid, otherwise the grid input as variable lam is used
  • SILENT (bool, optional) – Set to suppress print statements
  • NIR (bool, optional) – Re-adjusts pixel size in NIR, as would occur if a second instrument was designed to handle the NIR
  • THERMAL (bool, optional) – Set to compute thermal photon counts due to telescope temperature
  • GROUND (bool, optional) – Set to simulate ground-based observations through atmosphere
  • vod (bool, optional) – “Valley of Death” red QE parameterization from Robinson et al. (2016)
  • set_fpa (float, optional) – Specify the fraction of planetary signal in Airy pattern, default will calculate it from the photometric aperture size X
  • CIRC (bool, optional) – Set to use a circular aperture
  • roll_maneuver (bool, optional) – This assumes an extra factor of 2 hit to the background noise due to a telescope roll maneuver needed to subtract out the background. See Brown (2005) for more details.
Returns:

  • lam (ndarray) – Observational wavelength grid [um]
  • dlam (ndarray) – Observational spectral element width [um]
  • A (ndarray) – Planetary geometric albedo on lam grid
  • q (ndarray) – Quantum efficiency grid
  • Cratio (ndarray) – Planet-star contrast ratio
  • cp (ndarray) – Planetary photon count rate on detector [1/s]
  • csp (ndarray) – Speckle photon count rate on detector [1/s]
  • cz (ndarray) – Zodiacal photon count rate on detector [1/s]
  • cez (ndarray) – Exozodiacal photon count rate on detector [1/s]
  • cD (ndarray) – Dark current photon count rate on detector [1/s]
  • cR (ndarray) – Read noise photon count rate on detector [1/s]
  • cth (ndarray) – Instrument thermal photon count rate on detector [1/s]
  • cc (ndarray) – Clock induced charge photon count rate [1/s]
  • DtSNR (ndarray) – Exposure time required to get desired S/N (wantsnr) [hours]