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 type sptype and V magnitude V.

Either exp_time or signal_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.

wavelengthQuantity
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, use signal_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 wavelength wavelength. Otherwise, generate counts curve for exposure time exp_time.

kwargsdict

All extra keyword arguments will be passed to the plot function.

Returns:
figFigure

Matplotlib figure object.

axAxes

Matplotlib axes object.

exp_timeQuantity

Exposure time input, or computed to achieve S/N ratio signal_to_noise at wavelength wavelength.

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()