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")
print("Gaia source id:", c.source_id)
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 Calspec table and the list of available Calspec names:
from getCalspec.getCalspec import getCalspecDataFrame
df = getCalspecDataFrame()
print(df.Name.values)
# Gaia IDs
print(df.source_id.values)
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()
Metadata
Release files for getCalspec 2.3.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| getcalspec-2.3.4.tar.gz | 33.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| getcalspec-2.3.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 65.3 kB
Release files / getcalspec-2.3.4.tar.gz
| Download URL | getcalspec-2.3.4.tar.gz |
|---|---|
| Size | 33.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1947576d47dd2e9ce01a54242928be3b0b86f5a970b63e0f7aa360ef2340a9fe
|
|
BLAKE2b-256 checksum How to use checksums |
7b77a97969baa6e3171a824fe042ba0e72f028e4fe3d235528e462e89aefd05c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.8
|
Release files / getcalspec-2.3.4-py3-none-any.whl
| Download URL | getcalspec-2.3.4-py3-none-any.whl |
|---|---|
| Size | 31.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9b1740571e289145d644d7879e7879672d952abdc1af55412aedb3f0c6fb2c9b
|
|
BLAKE2b-256 checksum How to use checksums |
e2da30473b3f39a7d9462da7e6513af61ce59f1345c1918285f3c2a0261cdb45
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.8
|