/awesimsoss

Advanced Webb Exposure SIMulator for SOSS

Primary LanguageJupyter NotebookMIT LicenseMIT

awesimsoss

Documentation Status Updates

Advanced Webb Exposure SIMulator for SOSS

Authors: Joe Filippazzo, Kevin Volk, Jonathan Fraine, Michael Wolfe

This pure Python 3.5+ package produces simulated time-series data for the Single Object Slitless Spectroscopy (SOSS) mode of the NIRISS instrument onboard the James Webb Space Telescope.

Additional resources:

Installation

The best way to install awesimsoss is

git clone https://github.com/spacetelescope/awesimsoss.git
cd awesimsoss
conda env create --name awesimsoss -f environment.yml
conda activate awesimsoss
python setup.py develop

Simulating SOSS Observations

Given a 1D spectrum of a target, this module produces a 2D SOSS ramp image with the given number of groups and integrations. For example, if I want to produce 5 integrations of 3 groups each for a J=9 A0 star as seen through SOSS, my code might look like:

# Imports
from awesimsoss import TSO, STAR_DATA

# Initialize simulation
tso256_clear = TSO(ngrps=3, nints=5, star=STAR_DATA)

# Run it and make a plot
tso256_clear.simulate()
tso256_clear.plot()
The output trace

The SUBSTRIP256 subarray is the default but the SUBSTRIP96 subarray and FULL frame configurations are also supported:

tso96_clear = TSO(ngrps=3, nints=5, star=STAR_DATA, subarray='SUBSTRIP96')
tso2048_clear = TSO(ngrps=3, nints=5, star=STAR_DATA, subarray='FULL')

The default filter is CLEAR but you can also simulate observations with the F277W filter like so:

tso256_f277w = TSO(ngrps=3, nints=5, star=STAR_DATA, filter='F277W')

Simulated Planetary Transits

The example above was for an isolated star though. To include a planetary transit we must additionally provide a transmission spectrum and the orbital parameters of the planet.

Here is a sample transmission spectrum generated with PandExo:

from awesimsoss import PLANET_DATA
The input transmission spectrum

And here are some orbital parameters for our planetary system using batman:

# Simulate star with transiting exoplanet by including transmission spectrum and orbital params
import batman
tso_transit = TSO(ngrps=3, nints=5, star=STAR_DATA, run=False)
params = batman.TransitParams()
params.t0 = 0. # time of inferior conjunction
params.per = 5.7214742 # orbital period (days)
params.a = 7.92 # semi-major axis (in units of stellar radii)
params.rp = 0.1 # radius ratio for Jupiter orbiting the Sun
params.inc = 89.8 # orbital inclination (in degrees)
params.ecc = 0. # eccentricity
params.w = 90. # longitude of periastron (in degrees) p
params.limb_dark = 'quadratic' # limb darkening profile to use
params.u = [0.1,0.1] # limb darkening coefficients

tmodel = batman.TransitModel(params, tso_transit.time)
tmodel.teff = 3500 # effective temperature of the host star
tmodel.logg = 5 # log surface gravity of the host star
tmodel.feh = 0 # metallicity of the host star

Now the code to generate a simulated planetary transit around our star might look like:

tso_transit.simulate(planet=PLANET_DATA, tmodel=tmodel)
tso_transit.plot_lightcurve()

We can write this to a FITS file directly ingestible by the JWST pipeline with:

tso_transit.export('my_SOSS_simulation.fits')