nirHiss Documentation

  • Created: 9 August, 2022
  • Update: 9 August, 2022

If you have any questions that are beyond the scope of this help file, Please feel free to open a GitHub Issue.

The purpose of nirHiss is to extract 1D spectra from JWST Near-Infrared Imager and Slitless Spectrograph (NIRISS) instrument.


We have two primary ways to install nirHiss

  1. Install through the Python Package Index (PyPI)
    pip install nirhiss
  2. Install the developer's version on GitHub:
    git clone
    cd nirHiss
    python install

Data Products

nirHiss saves all outputs as a FITS file.

Citing nirHiss & dependencies

If you find nirHiss useful for your work, please cite the following works:


Here are some frequently asked questions (FAQs) and their answers!

When you query an object, nirHiss performs the following steps:
  1. Determines in which sectors this target was observed.
  2. Locates the object on TESS's many cameras/chips.
  3. Downloads a time series of "postcards" containing TESS data for the object and its immediate surroundings.
  4. Creates and stores a target pixel file (TPF) of the object.
  5. Traces centroid shifts for the object across the time series.
  6. Chooses an optimal pixel aperture for photometry.
  7. Creates a light curve using the chosen aperture and centroid trace.
  8. Performs basic systematics corrections on the light curve and stores it.


class nirHiss.ffi(sector=None, camera=None, chip=None)
This class allows the user to download all full-frame images for a given sector,

camera, and chip. It also allows the user to create their own pointing model based on each cadence for a given combination of sector, camera, and chip.

No individual user should have to download all of the full-frame images because

stacked postcards will be available for the user to download from MAST.

  • sector (int, optional) –

  • camera (int, optional) –

  • chip (int, optional) –

build_pointing_model(pos_predicted, pos_inferred, outlier_removal=False)
Builds an affine transformation to correct the positions of stars

from a possibly incorrect WCS.

  • pos_predicted (tuple) – Positions taken straight from the WCS; [[x,y],[x,y],…] format.

  • pos_inferred (tuple) – Positions taken using any centroiding method; [[x,y],[x,y],…] format.

  • outlier_removal (bool, optional) – Whether to clip 1-sigma outlier frames. Default False.


xhat – (3, 3) affine transformation matrix between WCS positions and inferred positions.

Return type



Sorts FITS files by start date of observation.

nirHiss.use_pointing_model(coords, pointing_model)

Applies pointing model to correct the position of star(s) on postcard.

  • coords (tuple) – (x, y) position of star(s).

  • pointing_model (astropy.table.Table) – pointing_model for ONE cadence.


coords – Corrected position of star(s).

Return type



See what's new added, changed, fixed, improved or updated in the latest versions.

Version 0.0.1 (9 August, 2022)

  • Added Ability to use local postcards
  • Added Addition of nirHiss.Update() for automatic sector updates
  • Updated Significant speedups when TIC, Coords, and a Gaia ID are all provided