Atmospheric emission and absorption¶
- class qmostetc.Atmosphere(wavelength, zenith_transmission, dark_sky_flux, moon_flux, airmasses, moon_sun_coeff, twilight_flux=None, twilight_coeff=None)¶
Atmosphere properties
This includes sky transmission and sky emission. Both values are taken basically from the ESO skymodel. Seeing calculation is not included.
The implementation takes one data file from the ESO sky model that was taken with standard parameters. For the moon brightness, coefficients for moon-target and moon-sun separation are applied.
The most convenient way to create a 4MOST standard atmosphere is the function
Atmosphere.paranal()
.- Parameters:
- wavelength
astropy.units.Quantity
Central wavelength bins for all other arrays [nm]
- zenith_transmission
numpy.ndarray
Atmospheric transmission for airmass = 1.0 (zenith)
- dark_sky_flux
astropy.units.Quantity
Combined starlight, zodiacal light, airglow and emission lines sky spectrum [photon/(s m² arcsec² nm)]. This is a two-dimensional array with the airmass as the first index and the wavelengt as the second one.
- moon_flux
astropy.units.Quantity
Standard moon light sky flux [photon/(s m² arcsec² nm)]. This is a two-dimensional array with the airmass as the first index and the wavelength as the second one.
- airmasses
numpy.ndarray
Airmass array corresponding to the flux bins
- moon_sun_coefffunction
Coefficient to scale the moon flux for a determined moon-sun separation. The function must take the separation angle and a wavelength array as Quantities and return a wavelength dependent array.
- twilight_flux
astropy.units.Quantity
Standard twilight flux [photon/(s m² arcsec² nm)].
- twilight_coeff
astropy.units.Quantity
Coefficient to scale the twilight flux for a determined airmass and sun altitude. The function must take the airmass, the sun altitude, and a wavelength array as arguments and return a wavelength dependent array.
- wavelength
Examples
The following example extracts the average emission and absorption within a specified wavelength range during grey time:
>>> atm = Atmosphere.paranal() >>> sky = atm.emission(1.3, 90*u.deg) >>> sky = sky.subspectrum(575*u.nm, 585*u.nm) >>> print(f'{sky.flux.mean():.2f}') 0.64 ph / (nm s arcsec2 m2) >>> absorption = atm.transmission(1.3).subspectrum(575*u.nm, 585*u.nm) >>> print(f'{absorption.flux.mean():.2f}') 0.85
Alternatively, the airmass may be given as zenith angle:
>>> atm = Atmosphere.paranal() >>> sky_emission = atm.emission(65*u.deg, 90*u.deg) >>> sky_emission = sky_emission.subspectrum(575*u.nm, 585*u.nm) >>> print(f'{sky_emission.flux.mean():.2f}') 1.04 ph / (nm s arcsec2 m2) >>> absorption = atm.transmission(65*u.deg) >>> absorption = absorption.subspectrum(575*u.nm, 585*u.nm) >>> print(f'{absorption.flux.mean():.2f}') 0.75
- limit_wavelength(wl_range)¶
Create a new Atmosphere with a limited wavelength
- Parameters:
- wl_range
astropy.units.Quantity
Pair with (lower, upper) limits of the wavelength [nm], or None.
- wl_range
- Returns:
Atmosphere
A new atmosphere with the limited wavelengths. If the paramter was None, the original
Atmosphere
object is returned.
- transmission(airmass=1.0)¶
Return the air transmission for a specified airmass.
This plot shows the used transmission at Paranal:
- Parameters:
- airmass
float
orastropy.units.Quantity
Airmass to use (default 1.0). The airmass may also be given as zenith angle [deg].
- airmass
- Returns:
Spectrum
Transmission spectrum for the atmosphere
- emission(airmass=1.0, moon_sun_sep=<Quantity 90. deg>, sun_altitude=None)¶
Return the sky emission.
The sky emission consists of the following elements:
Scattered moonlight (depending on moon-sun-target separations). The moon altitude is fixed to the value used in the ESO data file.
Scattered starlight,
Zodiacal light,
Airglow, and
Emission lines of the upper atmosphere.
Twilight spectrum (optional)
For 4MOST predefined moon brightness settings, choose the values according to the following table:
brightness
moon_sun_sep
dark
35 deg
grey
90 deg
bright
143 deg
superbright
175 deg
This plot shows the used emission at Paranal for airmass=1.0:
- Parameters:
- airmass
float
orastropy.units.Quantity
Airmass to use (default 1.0). The airmass may also be given as zenith angle [deg].
- moon_sun_sep
astropy.units.Quantity
Angular sepearation between moon and sun [deg]. Defaults to 90 deg (grey).
- sun_altitude
astropy.units.Quantity
Sun altitude for twilight sky. If
None
(default), then no twilight is added.
- airmass
- Returns:
Spectrum
Sky background flux spectrum according to the wavelengths [photon/(s m² arcsec² nm)]
- static paranal()¶
Standard Paranal (4MOST) atmosphere
This is the atmosphere taken from the ESO sky model data that are delivered with the package.
- Returns:
Atmosphere
Atmosphere model created from the standard data files included in the package
- static dummy()¶
Non-emitting, non-absorbing dummy atmosphere
- Returns:
Atmosphere
Atmosphere model with zero emission and zero absorption
Examples
Evaluate the dummy atmosphere:
>>> atm = Atmosphere.dummy() >>> sky = atm.emission() >>> print(sky.flux.mean(), sky.flux.std()) 0.0 ph / (nm s arcsec2 m2) 0.0 ph / (nm s arcsec2 m2) >>> absorption = atm.transmission() >>> print(absorption.flux.mean(), absorption.flux.std()) 1.0 0.0
Default sky model¶
The sky model is based on the ESO sky model, which interpolates the spectra individually for
scattered moonlight (dependent on moon phase and airmass),
atmospheric emission lines and airglow (dependent on airmass),
zodacial light emission and scatteres starlight (dependent on airmass)
Additionally, the atmospheric transmission is computed.
Data format¶
All data are stored in the file qmostetc/data/skymodel.fits
, which
is a FITS file with three tables:
MAIN_SPECTRUM
High-res sky model with standard parameters. Columns:
wavelength: Wavelength (0.01 nm steps) [nm]
trans: Zenith transmission spectrum
flux_moon: Moon light flux for grey light [ph / (arcsec² m² nm s)]
flux_ext: Flux of scattered starlight and zodacial light [ph / (arcsec² m² nm s)]
flux_air: Flux of atmospheric emission lines and air glow continuum [ph / (arcsec² m² nm s)]
The emission fluxes are without the transmission spectrum
MOON_SUN_SEP
Moon flux parameters depending on the moon-sun separation. Columns:
wavelength: Wavelength (10 nm steps) [nm]
moon_sun_sep: Moon-Sun separation [deg]
coeff: Coefficient for the moon flux
AIRMASS_PROP
Wavelength dependent coefficients for selected airmasses. These numbers are to be multiplied to the spectra. Columns:
wavelength: Wavelength (10 nm steps) [nm]
airmass: Airmass
moon: Coefficient for the moon flux
ext: Coefficient for the flux of scattered starlight and zodacial light
air: coefficient for the flux of atmospheric emission lines and air glow continuum
The data file can be recreated with the tools/get_skymodel program.
Scattered moonlight¶
The scattered moonlight is based on a gray moonlight spectrum with airmass 1.05 stored in the flux_moon column of the MAIN_SPECTRUM table. The angular moon-target separation is 45°, the moon altitude 45°.
This spectrum is multiplied with an interpolated wavelength dependent factor from the coeff column in the MOON_SUN_SEP table for the given moon-sun separation angle moon_sun_sep:
Second the spectrum is multiplied by an airmass and wavelength dependent factor taken from the moon column of the AIRMASS_PROP table:
And finally, the spectrum is multiplied by the atmospheric absorption spectrum for the given airmass.
Atmospheric light emission¶
The atmospheric light emission (atmospheric emission lines and airglow) is based on the spectrum with airmass 1.05 stored in the flux_air column of the MAIN_SPECTRUM table.
The spectrum is multiplied by an airmass and wavelength dependent factor taken from the air column of the AIRMASS_PROP table:
And finally, the spectrum is multiplied by the atmospheric absorption spectrum for the given airmass.
Zodacial light emission¶
The zodacial light emission and scatteres starlight spectrum is based on the spectrum with airmass 1.05 stored in the flux_ext column of the MAIN_SPECTRUM table.
The spectrum is multiplied by an airmass and wavelength dependent factor taken from the ext column of the AIRMASS_PROP table:
And finally, the spectrum is multiplied by the atmospheric absorption spectrum for the given airmass.
Atmospheric light transmission¶
The atmospheric light transmission is based on the spectrum with airmass 1.05 stored in the trans column of the MAIN_SPECTRUM table.
The wavelength dependent transmission at a specific airmass \(a\) is then taken by the formula \(t(\lambda) = t_0(\lambda)^{a - 1.05}\).
Twilight sky model¶
The twilight sky model is taken from data generated with the rubin_sim package. To save space and computation time, only one hi-res spectrum is stored. An additional low-res coefficient grid provides the dependencies on sun altitude and airmass.
Note that all values for sun altitudes above -12° were extrapolated by rubin_sim, so they should be taken with care.
The twilight data are stored in the file
qmostetc/data/twilightmodel.fits
, which is a FITS file with two
tables:
MAIN_SPECTRUM
High-res sky model with standard parameters. Columns:
wavelength: Wavelength (0.2 nm steps) [nm]
twilight: Twilight zenith flux for sun altitude -12°
The non-twilight components were subtracted from the spectrum.
SUNALT_PROP
Wavelength dependent coefficients for selected airmasses and sun altitudes. These numbers are relative magnitudes to be applied to the spectra. Columns:
wavelength: Wavelength (10 nm steps) [nm]
airmass: Airmass (1…2.8 in steps of 0.1)
sunAlt: Sun altitude [deg] (-19°…-1° in steps of 1°)
twilight: Magnitude to be applied to the spectral flux [mag]
The values spawn a rectangular grid.
If the rubin_sim Python package is installed, the data file can be recreated with the tools/get_twilight program.
Twilight base spectrum¶
The twilight base spectrum is based on the spectrum with airmass 1.0 and sun altitude -12° stored in the twilight column of the MAIN_SPECTRUM table.
Twilight magnitude coefficients¶
The coefficients scale the base spectrum dependent on airmass and sun altitude. They are stored as magnitudes in the twilight column of the SUNALT_PROP table.