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 hashes)

Uploaded Python 3

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