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.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| getcalspec-2.3.5.tar.gz | 33.7 kB | Without provenance | Details for getcalspec-2.3.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| getcalspec-2.3.5-py3-none-any.whl | Python 3 | none | any | Details for getcalspec-2.3.5-py3-none-any.whl |
Total release size: 65.4 kB
Release files / getcalspec-2.3.5.tar.gz
| Download URL | getcalspec-2.3.5.tar.gz |
|---|---|
| Size | 33.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
99fde70c5fa1e19ba5c6ff41ed873e0501d9123ab291900d7cd53c6094fb52c7
|
|
BLAKE2b-256 checksum How to use checksums |
8772ccda8756be3337d85ea818a86ae0d00e94f8d941277168693d480e1416b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.8
|
Release files / getcalspec-2.3.5-py3-none-any.whl
| Download URL | getcalspec-2.3.5-py3-none-any.whl |
|---|---|
| Size | 31.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9e6fdef48f364bbc6a9d1c63d87a636d1ff9a4d6792733fbc9dbe36fc6543e35
|
|
BLAKE2b-256 checksum How to use checksums |
b9fd9e0abeb30e3ea7569eef8f70e1e8b2f12270a0d0fa63f21ad077e9b04ce0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.8
|
Security for getCalspec 2.3.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.