Giter Site home page Giter Site logo

awesimsoss's Introduction

awesimsoss

GitHub release 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

conda install -c jfilippazzo awesimsoss

You can also do it with

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
from hotsoss import 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 plot method generates an interactive figure of counts, SNR, and saturation values for the entire exposure as well as the wavelength value at each pixel for each order and a slider to inspect each frame in the cross dispersion direction.

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 hotsoss 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)
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')

awesimsoss's People

Contributors

hover2pi avatar exowanderer avatar pyup-bot avatar jotaylor avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.