Simulating Transmission and Emission Spectroscopy¶
Simulate exoplanet transmission and/or emission spectroscopy without using the coronagraph routines. This uses the same telesope and detector parameters as the coronagraph model, but does not suppress the star’s light. As a result, stellar photons dominate the noise budget.
For transmission spectroscopy calculations use TransitNoise
,
and for emission spectroscopy use EclipseNoise
. You may also get an
example transmission and emission spectrum of the Earth by calling
get_earth_trans_spectrum()
.
-
class
coronagraph.transits.
EclipseNoise
(tdur=3432.0, telescope=<coronagraph.teleplanstar.Telescope object>, planet=<coronagraph.teleplanstar.Planet object>, star=<coronagraph.teleplanstar.Star object>, ntran=1, nout=1, wantsnr=1000.0, NIR=True, THERMAL=True, GROUND=False, vod=False, IMAGE=False)¶ Simulate exoplanet secondary eclipse emission spectroscopy with a next-generation telescope.
- Parameters
telescope (Telescope) – Initialized object containing
Telescope
parametersplanet (Planet) – Initialized object containing
Planet
parametersstar (Star) – Initialized object containing
Star
parameterstdur (float) – Transit duration [s]
ntran (float) – Number of transits/eclipses
nout (float) – Number of out-of-eclipse transit durations to observe
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 OWACOMPUTE_LAM (bool, optional) – Set to compute lo-res wavelength grid, otherwise the grid input as variable
lam
is usedSILENT (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)
-
run_count_rates
(lamhr=None, Fphr=None, Fshr=None)¶ Calculate the photon count rates and signal to noise on a secondary eclipse spectrum observation
- Parameters
lamhr (numpy.ndarray) – Wavelength [$mu$m]
Fphr (numpy.ndarray) – Dayside exoplanet TOA flux spectrum [W/m$^2$/$mu$]
Fshr (numpy.ndarray) – Stellar flux incident at the planet’s TOA [W/m$^2$/$mu$]
run_count_rates() creates the following attributes for (Calling) –
EclipseNoise instance (the) –
- Variables
lamhr (array) – Wavelength [$mu$m]
Fphr (array) – Dayside exoplanet TOA flux spectrum [W/m$^2$/$mu$]
Fshr (array) – Stellar flux incident at the planet’s TOA [W/m$^2$/$mu$]
cs (array) – Stellar photon count rate [photons/s]
cback (array) – Background photon 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]
cmiss (array) – Occulted stellar photon count rate [photons/s]
SNR1 (array) – S/N for one eclipse
SNRn (array) – S/N for
ntran
eclipsestSNR (array) – Exposure time to
wantsnr
[s]nSNR (array) – Number of eclipses to
wantsnr
lam (array) – Observed wavelength grid [$mu$m]
dlam (array) – Observed wavelength grid widths [$mu$m]
FpFslr (array) – Low-res planet/star flux ratio
FpFshr (array) – High-res planetr/star flux ratio
-
make_fake_data
()¶ Make a fake dataset by sampling from a Gaussian.
- Variables
SNRn (array) – S/N in
ntran
eclipsesobs (array) – Observed emission specrum with noise
sig (array) – Observed uncertainties on emission spectrum
-
recalc_wantsnr
(wantsnr=None)¶ Recalculate the time and number of eclipses required to achieve a user specified SNR via wantsnr.
- Variables
tSNR (array) – Exposure time to
wantsnr
[s]nSNR (array) – Number of eclipses to
wantsnr
-
plot_spectrum
(SNR_threshold=0.0, Nsig=None, ax0=None, err_kws={'alpha': 1, 'c': 'k', 'fmt': '.'}, plot_kws={'alpha': 0.5, 'c': 'C4', 'lw': 1.0}, draw_box=True)¶ Plot noised emission 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_SNRn
(ax0=None, plot_kws={'ls': 'steps-mid'})¶ Plot the S/N on the Eclipse Depth 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_ntran_to_wantsnr
(ax0=None, plot_kws={'alpha': 1.0, 'ls': 'steps-mid'})¶ Plot the number of eclipses to get a SNR on the eclipse depth 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 time to get a SNR on the eclipse depth 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_count_rates
(ax0=None)¶ Plot the photon count rate for all sources.
- Parameters
ax0 (matplotlib.axes) – Optional axis to provide
- 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
-
class
coronagraph.transits.
TransitNoise
(tdur=3432.0, telescope=<coronagraph.teleplanstar.Telescope object>, planet=<coronagraph.teleplanstar.Planet object>, star=<coronagraph.teleplanstar.Star object>, ntran=1, nout=1, wantsnr=1000.0, NIR=True, THERMAL=True, GROUND=False, vod=False, IMAGE=False)¶ Simulate exoplanet transit transmission spectroscopy with a next-generation telescope.
- Parameters
telescope (Telescope) – Initialized object containing
Telescope
parametersplanet (Planet) – Initialized object containing
Planet
parametersstar (Star) – Initialized object containing
Star
parameterstdur (float) – Transit duration [s]
ntran (float) – Number of transits
nout (float) – Number of out-of-transit transit durations to observe
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 OWACOMPUTE_LAM (bool, optional) – Set to compute lo-res wavelength grid, otherwise the grid input as variable
lam
is usedSILENT (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)
-
run_count_rates
(lamhr=None, tdhr=None, Fshr=None)¶ Calculate the photon count rates and signal to noise on a transmission spectrum observation
- Parameters
lamhr (numpy.ndarray) – Wavelength [$mu$m]
tdhr (numpy.ndarray) – Transit Depth $(Rp/Rs)^2$
Fshr (numpy.ndarray) – Flux density incident at the planet’s TOA [W/m$^2$/$mu$]
run_count_rates() creates the following attributes for (Calling) –
TransitNoise instance (the) –
- Variables
lamhr (array) – Wavelength [$mu$m]
tdhr (array) – Transit Depth $(Rp/Rs)^2$
Fshr (array) – Flux density incident at the planet’s TOA [W/m$^2$/$mu$]
cs (array) – Stellar photon count rate [photons/s]
cback (array) – Background photon 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]
cmiss (array) – Occulted stellar photon count rate [photons/s]
SNR1 (array) – S/N for one transit
SNRn (array) – S/N for
ntran
transitstSNR (array) – Exposure time to
wantsnr
[s]nSNR (array) – Number of transits to
wantsnr
lam (array) – Observed wavelength grid [$mu$m]
dlam (array) – Observed wavelength grid widths [$mu$m]
RpRs2 (array) – Low-res transit depth
-
make_fake_data
()¶ Make a fake dataset by sampling from a Gaussian.
- Variables
SNRn (array) – S/N in
ntran
transitsobs (array) – Observed transit depth with noise
sig (array) – Observed uncertainties on transit depth
-
recalc_wantsnr
(wantsnr=None)¶ Recalculate the time and number of transits required to achieve a user specified SNR via wantsnr.
- Variables
tSNR (array) – Exposure time to
wantsnr
[s]nSNR (array) – Number of transits to
wantsnr
-
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 transmission 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_SNRn
(ax0=None, plot_kws={'ls': 'steps-mid'})¶ Plot the S/N on the Transit Depth 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_ntran_to_wantsnr
(ax0=None, plot_kws={'alpha': 1.0, 'ls': 'steps-mid'})¶ Plot the number of transits to get a SNR on the transit depth 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 time to get a SNR on the transit depth 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_count_rates
(ax0=None)¶ Plot the photon count rate for all sources.
- Parameters
ax0 (matplotlib.axes) – Optional axis to provide
- 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.transits.
get_earth_trans_spectrum
()¶ Get the transmission spectrum of the Earth around the Sun.
- Returns
lam (numpy.ndarray) – Wavelength grid [um]
tdepth (numpy.ndarray) – Transit depth (Rp/Rs)^2
fplan (numpy.ndarray) – TOA planet flux [W/m^2/um]
fstar (numpy.ndarray) – Stellar flux at planet [W/m^2/um]