Skip to main content

No project description provided

Project description

PyPI version Documentation Status Code style: black

getCalspec

Python package to download Calspec spectra.

The main function query the Calspec table located in calspec_data/calspec.csv to download spectrum FITS files from STSC archive.

Example:

from getCalspec.getCalspec import *

test = is_calspec("eta1 dor")
c = Calspec("eta1 dor")
c.get_spectrum_table(type="stis", date="latest")  # download and return an Astropy table
c.get_spectrum_numpy(type="mod", date="2010-12-11")  # download and return a dictionnary of numpy arrays with units
c.plot_spectrum()  # download and plot the spectrum

To get all Calspec data in one time in cache, write:

from getCalspec.rebuild import rebuild_cache
rebuild_cache()

When the STSC webpage is updated, it might be necessary to rebuild the calspec_data/calspec.csv table and the cache:

from getCalspec.rebuild import rebuild_tables, rebuild_cache
rebuild_tables()
rebuild_cache()

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

getCalspec-2.2.2-py3-none-any.whl (34.4 kB view details)

Uploaded Python 3

File details

Details for the file getCalspec-2.2.2-py3-none-any.whl.

File metadata

  • Download URL: getCalspec-2.2.2-py3-none-any.whl
  • Upload date:
  • Size: 34.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for getCalspec-2.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 eef61fbde257f6459bdec2676549db2c1853ff38c24f40cdd512abb5dc7bbad5
MD5 14b4d8548ef331664aa5220e02edcd5e
BLAKE2b-256 c1086e1b05f2fe791e4a6aa011a4f4cc40df47fe0bb8fb7a6bf7610272e4fc85

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