Skip to main content

spelunker: a library to extract guidestar data and observe technical and stellar events

Project description

Spelunker — NIRISS FGS quicklook pipeline


spelunker is a package that assists on studying JWST FGS/NIRISS guidestar data.

Authors: Derod Deal (dealderod@ufl.edu), Néstor Espinoza (nespinoza@stsci.edu)

Statement of need

Every time JWST observes an object, it simultaneously observes a nearby star --- a so-called "guide star" --- with the NIRISS Fine Guidance Sensor (FGS) that is used to keep the telescope locked on the target of interest. While researchers typically focus on their science targets, the guide star data can be extremely interesting on its own right both to detect anomalies on science data, as well as to explore time-series data of guidestars themselves. spelunker provides an easy-to-access ("plug-and-play") library to access this guide star data. The library is able to generate time-series for several metrics of the FGS data in an automated fashion, including fluxes and PSF variations, along with derived products from those such as periodograms that can aid on their analysis given only a JWST program ID number.

Installation

To install spelunker, use pip install.

pip install spelunker

Using the library

Get started with spelunker with only two lines of code.

import spelunker

spk = spelunker.load(pid=1534)

This will download guidestar data for Program ID 1534; the spk object itself can then be used to explore this guidestar data! For example, let's make a plot of the guidestar time-series for the first minutes of this PID:

import matplotlib.pyplot as plt

# Convert times from MJD to minutes:
plt.plot( ( spk.fg_time - spk.fg_time[0] ) * 24 * 60, spk.fg_flux )

plt.xlim(0,10)
plt.xlabel('Time from start (minutes)')
plt.ylabel('Counts')

(See below on more information that can be extracted, including fitting 2D gaussians to each FGS integration!). We can even make a plot of the tracked guidestars within this Program ID:

spk.guidestar_plot()

Mnemonics from JWST technical events can be overplotted on any timeseries, such as high-gain antenna (HGA) movement or to identify if the FGS tracks a new guidestar if the jwstuser package is also installed:

import matplotlib.pyplot as plt

spk.mast_api_token = 'insert a token from auth.MAST here'

fig, ax = plt.subplots(figsize=(12,4),dpi=200)

ax = spk.mnemonics_local('GUIDESTAR')
ax = spk.mnemonics('SA_ZHGAUPST', 60067.84, 60067.9) 
ax.plot(spk.fg_time, spk.fg_flux)
plt.legend(loc=3)
plt.xlim(60067.84, 60067.9)
plt.show()

For more information on the tools under spelunker and how to get started, visit the quickstart guide or checkout our readthedocs. Get acquainted with spelunker with the following example notebooks:

Licence and attribution

This project is under the MIT License, which can be viewed here.

Acknowledgments

DD and NE would like to thank the STScI's Space Astronomy Summer Program (SASP) as well as the National Astronomy Consortium (NAC) program which made it possible for them to work together on this fantastic project!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spelunker-1.1.3.tar.gz (21.8 kB view details)

Uploaded Source

Built Distribution

spelunker-1.1.3-py3-none-any.whl (22.2 kB view details)

Uploaded Python 3

File details

Details for the file spelunker-1.1.3.tar.gz.

File metadata

  • Download URL: spelunker-1.1.3.tar.gz
  • Upload date:
  • Size: 21.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for spelunker-1.1.3.tar.gz
Algorithm Hash digest
SHA256 596349fed37839ad98703d5db38fd4e8779aaf0a195046fd4566dce60a3350c5
MD5 1177419777721b58bf536693d87b409b
BLAKE2b-256 9529d0bc4784252bcb6436f42d03f1bf7c0c09e7be2022d8f5cf5f170815dfb5

See more details on using hashes here.

File details

Details for the file spelunker-1.1.3-py3-none-any.whl.

File metadata

  • Download URL: spelunker-1.1.3-py3-none-any.whl
  • Upload date:
  • Size: 22.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for spelunker-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 891393bb9fe54c2120505c1f65a04183d2679231ae61f5a0997202c3294a93f9
MD5 827ffb6c9c01cffe6e25937af70da1d1
BLAKE2b-256 1a63a5d4756fbace06fd4eea6d320b98e034710e8b091fec926aa048676d93e8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page