Keck-FOBOS Exposure Time Calculator
To run the Keck-FOBOS exposure-time calculator:
$ fobos_etc -h
usage: fobos_etc [-h] [--spec_file SPEC_FILE] [--spec_wave SPEC_WAVE]
[--spec_wave_units SPEC_WAVE_UNITS] [--spec_flux SPEC_FLUX]
[--spec_flux_units SPEC_FLUX_UNITS] [--ignore_mag]
[--spot_fwhm SPOT_FWHM]
[--spec_res_indx SPEC_RES_INDX | --spec_res_value SPEC_RES_VALUE]
[--spec_table SPEC_TABLE] [-m MAG] [--mag_band MAG_BAND]
[--mag_system MAG_SYSTEM] [--sky_mag SKY_MAG]
[--sky_mag_band SKY_MAG_BAND] [--sky_mag_system SKY_MAG_SYSTEM]
[-z REDSHIFT] [-l EMLINE] [-s SERSIC SERSIC SERSIC SERSIC | -u]
[-t TIME] [-f FWHM] [-a AIRMASS] [-i] [-p]
[--snr_units SNR_UNITS] [--sky_err SKY_ERR]
FOBOS Exposure-Time Calculator (v0.2)
optional arguments:
-h, --help show this help message and exit
--spec_file SPEC_FILE
A fits or ascii file with the object spectrum to use
(default: None)
--spec_wave SPEC_WAVE
Extension or column number with the wavelengths.
(default: WAVE)
--spec_wave_units SPEC_WAVE_UNITS
Wavelength units (default: angstrom)
--spec_flux SPEC_FLUX
Extension or column number with the flux. (default:
FLUX)
--spec_flux_units SPEC_FLUX_UNITS
Input units of the flux density. Must be interpretable
by astropy.units.Unit. Code assumes 1e-17 erg / (cm2 s
angstrom) if units are not provided. (default: None)
--ignore_mag Ignore the provided magnitude of the source and use the
provided spectrum directly. Only valid if a spectrum is
provided. (default: False)
--spot_fwhm SPOT_FWHM
FHWM of the monochromatic spot size on the detector in
pixels. (default: 5.8)
--spec_res_indx SPEC_RES_INDX
Extension or column number with the flux. (default:
None)
--spec_res_value SPEC_RES_VALUE
Single value for the spectral resolution (R =
lambda/dlambda) for the full spectrum. (default: None)
--spec_table SPEC_TABLE
Extension in the fits file with the binary table data.
(default: None)
-m MAG, --mag MAG Total apparent magnitude of the source (default: 24.0)
--mag_band MAG_BAND Broad-band used for the provided magnitude. Must be u,
g, r, i, or z. (default: g)
--mag_system MAG_SYSTEM
Magnitude system. Must be either AB or Vega. (default:
AB)
--sky_mag SKY_MAG Surface brightness of the sky in mag/arcsec^2 in the
defined broadband. If not provided, default dark-sky
spectrum is used. (default: None)
--sky_mag_band SKY_MAG_BAND
Broad-band used for the provided sky surface brightness.
Must be u, g, r, i, or z. (default: g)
--sky_mag_system SKY_MAG_SYSTEM
Magnitude system. Must be either AB or Vega. (default:
AB)
-z REDSHIFT, --redshift REDSHIFT
Redshift of the object, z (default: 0.0)
-l EMLINE, --emline EMLINE
File with emission lines to add to the spectrum.
(default: None)
-s SERSIC SERSIC SERSIC SERSIC, --sersic SERSIC SERSIC SERSIC SERSIC
Use a Sersic profile to describe the object surface-
brightness distribution; order must be effective radius,
Sersic index, ellipticity (1-b/a), position angle (deg).
(default: None)
-u, --uniform Instead of a point source or Sersic profile, assume the
surface brightness distribution is uniform over the
fiber face. If set, the provided magnitude is assumed to
be a surface brightness. See the MAG option. (default:
False)
-t TIME, --time TIME Exposure time (s) (default: 3600.0)
-f FWHM, --fwhm FWHM On-sky PSF FWHM (arcsec) (default: 0.65)
-a AIRMASS, --airmass AIRMASS
Airmass (default: 1.0)
-i, --ipython After completing the setup, embed in an IPython session.
(default: False)
-p, --plot Provide a plot of the components of the calculation.
(default: False)
--snr_units SNR_UNITS
The units for the S/N. Options are pixel, angstrom,
resolution. (default: pixel)
--sky_err SKY_ERR The fraction of the Poisson error in the sky incurred
when subtracting the sky from the observation. Set to 0
for a sky subtraction that adds no error to the sky-
subtracted spectrum; set to 1 for a sky-subtraction
error that is the same as the Poisson error in the sky
spectrum acquired during the observation. (default: 0.1)
Source spectrum
The possible source spectra are:
A featureless spectrum with a constant AB magnitude: This is the default spectrum, and the magnitude is set by the
-mcommand-line options.A spectrum read from a file: You can provide a spectrum directly using either a fits or columnated ascii text file. See the
--spec_*command-line options. To check that the spectrum will be read correctly, seesynospec.etc.spectrum.Spectrum.from_ascii()orsynospec.etc.spectrum.Spectrum.from_fits(). E.g.:from synospec.etc.spectrum import Spectrum spec = Spectrum.from_ascii('spec.db.gz', wavecol=0, waveunits='nm', fluxcol=1, fluxunits = 'erg/s/cm2/angstrom', resolution=3e5, use_sampling_assessments=True) spec.plot(show=True)Emission-line spectrum. This functionality is currently in development.
Note that the code always rescales the spectrum to the provided
magnitude, which defaults to an AB mag of 24 in the g band. To
rescale to a different magnitude, in a different band or in a
different magnitude system (AB or Vega) use the --mag*
command-line arguments. You can also redshift the provided spectrum
using the -z command-line option, but this hasn’t been well
tested.
Sky Spectrum
The sky spectrum defaults to
synospec.etc.spectrum.MaunakeaSkySpectrum, which is an empirical
dark night-sky spectrum provided by Chuck Steidel.
Warning
Efforts are ongoing to improve the inclusion of the sky spectrum.
The current script does not change the resolution of the sky spectrum!
The sky flux between 0.31-0.32 \(\mu{\rm m}\) is just a constant added to match the level of the continuum between 0.321-0.4 \(\mu{\rm m}\).
You can adjust the magnitude of the sky spectrum using the
--sky_mag* command-line options; however, this is a simple
scaling of the dark-sky spectrum and will not be a true
representation of the sky spectrum under brighter moon conditions.
Source Surface-Brightness Distribution
The source can be:
An unresolved point source (default)
A source that fills the focal-plane aperture with a constant surface brightness; see
--uniform.Follow a Sersic profile; see
--sersic. This should be provided with the expected intrinsic parameters (i.e., before convolution with the seeing).
The source profile is convolved with a Gaussian seeing distribution
with a full-width at half maximum (FWHM) set by the --fwhm
argument.
Note that when the source is selected to be a uniform surface brightness within the focal-plane aperture, the provided magnitude of the source is taken to be the surface brightness. In the other distribution cases (point, Sersic), the magnitude is taken to be the total magnitude.
Source Extraction
The ETC uses a nominal box extraction for the S/N calculation. This is primarily
used to calculate the aperture loss and the number of pixel read-noise hits to
include. By default the extraction aperture is set to the FWHM of the
monochromatic spot of the fiber image on the detector (see --spot_fwhm).
Observing Specifications
You can change the exposure time (--time), airmass
(--airmass), and seeing (--fwhm) conditions for the
observation; defaults are 1 hr, 1.0, and 0.65 arcsec, respectively.
S/N calculation
The main output of the ETC is a plot of the S/N as a function of wavelength. An example looks like this:
Output from simply executing fobos_etc with no command-line
arguments. The object and sky spectra are shown in the top panel.
The S/N per pixel is shown in the bottom panel.
You can change the error incurred from the sky subtraction
(--sky_err) and the units for the S/N vector (--snr_units).
By default, the plot will not be produced, and the code will simply provide some
text to the terminal giving the mean S/N in different broad-band windows. To
turn the plot on, set --plot. To drop into an ipython session at the end of
the script, use --ipython.