https://github.com/behrouzz/stelspec
A python package for retrieving and analysing stellar spectra (ELODIE-SOPHIE Archive)
https://github.com/behrouzz/stelspec
astronomy elodie sophie spectra spectroscopy stellar
Last synced: 2 months ago
JSON representation
A python package for retrieving and analysing stellar spectra (ELODIE-SOPHIE Archive)
- Host: GitHub
- URL: https://github.com/behrouzz/stelspec
- Owner: behrouzz
- License: mit
- Created: 2021-08-12T01:03:14.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-08-12T22:22:56.000Z (almost 5 years ago)
- Last Synced: 2025-12-17T02:37:37.184Z (6 months ago)
- Topics: astronomy, elodie, sophie, spectra, spectroscopy, stellar
- Language: Python
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
**Author:** [Behrouz Safari](https://behrouzz.github.io/)
**License:** [MIT](https://opensource.org/licenses/MIT)
# stelspec
*A python package for retrieving and analysing stellar spectra (ELODIE-SOPHIE Archive)*
## Installation
Install the latest version of *stelspec* from [PyPI](https://pypi.org/project/stelspec/):
pip install stelspec
Requirements are *requests*, *numpy* and *pandas*.
## Quick start
Let's start by creating an Elodie instance by passing an object name:
```python
import stelspec as sp
el = sp.Elodie('HD217014')
```
You can access two tables, CCF and Spectra, as pandas DataFrame.
```python
# table: Cross-Correlation Functions
df_ccf = el.ccf()
# table: Spectra
df_spc = el.spec()
```
You can also download spectra as FITS file, whether in *s1d* or *s2d* format:
```python
# download spectrum FITS file in s1d format
el.get_spec(dataset=19960831, imanum='0017', path='data/', s1d=True)
# download spectrum FITS file in s2d format
el.get_spec(dataset=19960831, imanum='0017', path='data/', s1d=Flase)
```
The same process can be done for Sophie, except that instead of *dataset* and
*imanum*, you should pass the *seq* number.
For a brief help on the structure of FITS files, see [ELODIE](http://atlas.obs-hp.fr/elodie/500/download.html) and [SOPHIE](http://atlas.obs-hp.fr/sophie/spec_help.html).