Metadata-Version: 2.4
Name: desi_retriever
Version: 0.5.1
Summary: Tool to fetch pragrammatically fetch DESI spectra of individual objects
Author-email: Sergey Koposov <skoposov@ed.ac.uk>
License: BSD
Project-URL: Homepage, https://github.com/segasai/desi_retriever
Keywords: DESI,spectrum
Classifier: Development Status :: 3 - Alpha
Classifier: Topic :: Utilities
Classifier: License :: OSI Approved :: BSD License
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: astropy
Requires-Dist: httpio
Requires-Dist: urllib3
Requires-Dist: pylru
Requires-Dist: fsspec
Requires-Dist: pyarrow
Requires-Dist: scipy
Requires-Dist: indexed_gzip
Dynamic: license-file

# desi_retriever

This is a tool that allows you to fetch DESI spectra without manually downloading them.
This tool can be run on your laptop and does not have to run on NERSC. (it still can run on NERSC, in 
this case it will be typically faster)

You may also consider using SPARCL 
https://astrosparcl.datalab.noirlab.edu/
for another interface.

Author: Sergey Koposov, Email: skoposov AT ed DOT ac _DOT uk, University of Edinburgh

Please acknowledge the software if you use it.

## Installation

To install just do 

`pip install desi_retriever`

or the version from github
`pip install -U desi_retriever@git+https://github.com/segasai/desi_retriever`

### Authentication

desi_retriever works with public DR1 data and private DESI data.
If you want to use non-public DESI data, you must set up the DESI user / password

You need to put in the standard DESI web login/password in the home folder in the file:
$HOME/.desi_http_user
in the following format
login:password

The login password are the same ones as used to access data.desi.lbl.gov 

## Usage

To fetch a given coadd spectrum you can do 

```
import desi_retriever.dr1
SP = desi_retriever.dr1.get_specs(survey='sv1',
               program='dark',
               hpx=17683,
               targetid=39627652591521181)[0]
```

You could also get the RVSpecFit models by using 

`Dmod = desi_retriever.dr1.get_rvspec_models(survey='sv1',
               program='dark',
               hpx=17683,
               targetid=39627652591521181)[0]`

More examples are in jupyter notebooks in example folder.


