ZodiacalBackground#

class m4opt.synphot.background.ZodiacalBackground[source] [edit on github]#

Bases: object

Zodiacal light sky background: sunlight scattered by interplanetary dust.

This is the zodiacal light model that is described in the HST STIS Instrument Handbook [1]. The “high” zodiacal light spectrum is taken from Table 6.4 and the “average” and “low” spectra are scaled from it so that they have visual surface brightness of 22.1, 22.7, and 23.3 magnitudes per square arcsecond.

The dependence on sky position is taken from Table 16 of [2], which is a higher-resolution version of Table 6.2 from the HST STIS Instrument Handbook.

Warning

This model should only be used for observers near Earth — in Earth orbit, as Hubble is, or on the Earth, or even on the Moon or in cislunar space. It should NOT be used for observers in orbits around other planets, or in distant solar orbits, or at Earth-Sun Lagrange points.

References

Examples

You can specify the zodiacal light background in several different ways. You can get a typical background for “low”, “average”, or “high” conditions.

>>> from astropy import units as u
>>> from m4opt.synphot.background import ZodiacalBackground
>>> background = ZodiacalBackground.low()
>>> background(3000 * u.angstrom, flux_unit=u.ABmag)
<Magnitude 26.16417045 mag(AB)>
>>> background = ZodiacalBackground.mid()
>>> background(3000 * u.angstrom, flux_unit=u.ABmag)
<Magnitude 25.56417045 mag(AB)>
>>> background = ZodiacalBackground.high()
>>> background(3000 * u.angstrom, flux_unit=u.ABmag)
<Magnitude 24.96417045 mag(AB)>

You can get the background for a target at a particular sky position, observed at a particular time.

>>> background = ZodiacalBackground()
>>> background(3000 * u.angstrom, flux_unit=u.ABmag)
Traceback (most recent call last):
  ...
ValueError: Unknown target. Please evaluate the model by providing the     position and observing time in a `with:` statement, like this:
    from m4opt.synphot import observing
    with observing(observer_location=loc, target_coord=coord, obstime=time):
>>> from astropy.coordinates import EarthLocation, SkyCoord
>>> from astropy.time import Time
>>> loc = EarthLocation.from_geocentric(0 * u.m, 0 * u.m, 0 * u.m)
>>> coord = SkyCoord.from_name('NGC 4993')
>>> time = Time('2017-08-17T12:41:04.4')
>>> from m4opt.synphot import observing
>>> with observing(observer_location=loc, target_coord=coord, obstime=time):
...     background(3000 * u.angstrom, flux_unit=u.ABmag)
<Magnitude 24.75101362 mag(AB)>
from matplotlib import pyplot as plt
import numpy as np
from astropy import units as u
from astropy.visualization import quantity_support

from m4opt.synphot.background import ZodiacalBackground

quantity_support()

wave = np.linspace(1000, 11000) * u.angstrom
ax = plt.axes()
for key in ['high', 'mid', 'low']:
    surf = getattr(ZodiacalBackground, key)()(wave, flux_unit=u.ABmag)
    ax.plot(wave, surf, label=f'ZodiacalBackground.{key}()')
ax.invert_yaxis()
ax.legend()

(Source code)

../_images/m4opt-synphot-background-ZodiacalBackground-1.svg

Mid, low, and high zodiacal light spectra#

from astropy.coordinates import EarthLocation, get_body, ICRS
from astropy.time import Time
from astropy import units as u
from astropy_healpix import HEALPix
from matplotlib import pyplot as plt
from matplotlib.colors import LogNorm
import numpy as np
import ligo.skymap.plot

from m4opt.synphot.background import ZodiacalBackground
from m4opt.synphot import observing

wave = 10000 * u.angstrom
hpx = HEALPix(nside=512, frame=ICRS())
loc = EarthLocation.from_geocentric(0 * u.m, 0 * u.m, 0 * u.m)
coord = hpx.healpix_to_skycoord(np.arange(hpx.npix))
obstime = Time('2023-06-30T00:00:00')
zodi = ZodiacalBackground()
with observing(observer_location=loc, target_coord=coord, obstime=obstime):
    surf = zodi(wave, flux_unit=u.ABmag)

fig = plt.figure()
ax = fig.add_subplot(projection='astro hours mollweide')
im = ax.imshow_hpx(surf.value, cmap='viridis')
fig.colorbar(im, extend='both', orientation='horizontal').set_label(surf.unit)

sun = get_body('sun', obstime)
transform = ax.get_transform('world')
ax.plot(
    sun.ra, sun.dec, 'or', ms=1,
    transform=transform)
ax.plot(
    sun.ra, sun.dec, 'or', mfc='none',
    transform=transform)
ax.text(sun.ra, sun.dec, '  Sun', color='red', transform=transform)

ax.grid()

(Source code)

../_images/m4opt-synphot-background-ZodiacalBackground-2.svg

Zodiacal light at 10000 Å observed at 2023-06-30T00:00:00#

Methods Summary

high()

Zodiacal background for typical "high" background conditions.

low()

Zodiacal background for typical "low" background conditions.

mid()

Zodiacal background for "average" background conditions.

Methods Documentation

static high()[source] [edit on github]#

Zodiacal background for typical “high” background conditions.

classmethod low()[source] [edit on github]#

Zodiacal background for typical “low” background conditions.

Following the conventions in the HST STIS manual, this is 1.2 mag / arcsec2 fainter than the “high” model at all frequencies.

classmethod mid()[source] [edit on github]#

Zodiacal background for “average” background conditions.

Following the conventions in the HST STIS manual, this is 0.6 mag / arcsec2 fainter than the “high” model at all frequencies.