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
- 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 "database" (although it is really just a directory).
Then, you can build the "database" by running the
following commands:
cd $OTTER_ROOT/otter/scripts/ python3 gen_summary_table.py --otterroot $OTTER_ROOT
- 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 |