A Python API for the OTTER.
To install the OTTER API use
python3 -m pip install astro-otter
- Set the
OTTER_ROOT
environment variableexport OTTER_ROOT=/path/to/where/to/clone
- Clone the relevant repos:
git clone https://github.com/astro-otter/otter.git $OTTER_ROOT/otter git clone https://github.com/astro-otter/otterdb.git $OTTER_ROOT/otterdb git clone https://github.com/astro-otter/otter-web.git $OTTER_ROOT/otter-web
- Install the NASA ADS Python API by following the instructions at https://ads.readthedocs.io/en/latest/#getting-started
- Install otter, the API for this database. From
the root directory where you installed these repos:
cd $OTTER_ROOT/otter python -m pip install -e .
- Process the data to build the local copy of the database. Follow the instructions in the otterdb repo README.
- Easily access the data using the Otter code! In python:
import os
from otter import Otter
otter = Otter(os.path.join(os.environ['OTTER_ROOT'], 'otterdb', '.otter'))
res = otter.query(names='AT2018hyz')
print(res)
To install the OTTER API from the source code use
git clone https://github.com/astro-otter/otter.git
cd otter
python -m pip install .
This will be changed into the more convenient python -m pip install astro-otter
at a later date!
For developers, please also enable the pre-commit hooks using
pre-commit install
Directory | Contents |
---|---|
src/otter |
A pip installable API for interfacing with the OTTER database |
scripts |
The pipeline scripts for converting unprocessed data into the OTTER JSON format |
docs |
Documentation for the OTTER API |
test |
Some Unit tests for the source code |