plot_order_counts#
- arcesetc.plot_order_counts(sptype, wavelength, V, exp_time=None, signal_to_noise=None, **kwargs)[source]#
Plot the counts as a function of wavelength for the spectral order nearest to
wavelength
for a star of spectral typesptype
and V magnitudeV
.Either
exp_time
orsignal_to_noise
should be supplied to the function (but not both).Warning
arcesetc
doesn’t know anything about saturation. Ye be warned!- Parameters:
- sptypestr
Spectral type of the star.
- wavelength
Quantity
- Vfloat
V magnitude of the target.
- exp_timeNone or float
If
exp_time
is a float, show the counts curve for that exposure time. Otherwise, usesignal_to_noise
to compute the appropriate exposure time.- signal_to_noiseNone or float
If
signal_to_noise
is a float, compute the appropriate exposure time to generate the counts curve that has S/N =signal_to_noise
at wavelengthwavelength
. Otherwise, generate counts curve for exposure timeexp_time
.- kwargsdict
All extra keyword arguments will be passed to the plot function.
- Returns:
- fig
Figure
Matplotlib figure object.
- ax
Axes
Matplotlib axes object.
- exp_time
Quantity
Exposure time input, or computed to achieve S/N ratio
signal_to_noise
at wavelengthwavelength
.
- fig
Examples
Given an exposure time:
>>> import matplotlib.pyplot as plt >>> import astropy.units as u >>> from arcesetc import plot_order_counts >>> sptype = 'G4V' >>> wavelength = 6562 * u.Angstrom >>> exp_time = 30 * u.min >>> V = 10 >>> fig, ax, exp_time = plot_order_counts(sptype, wavelength, V, exp_time=exp_time) >>> plt.show()
…or given a desired signal-to-noise ratio:
>>> import matplotlib.pyplot as plt >>> import astropy.units as u >>> from arcesetc import plot_order_counts >>> sptype = 'G4V' >>> wavelength = 6562 * u.Angstrom >>> signal_to_noise = 30 >>> V = 10 >>> fig, ax, exp_time = plot_order_counts(sptype, wavelength, V, signal_to_noise=signal_to_noise) >>> plt.show()