The vision of the SIMPLE project is to create a collaborative database of low-mass stars, brown dwarfs, and directly imaged exoplanets: a simple archive of complex objects. The tables and fields currently included in the database are described in the Documentation and currently include names, coordinates, photometry and reference and data provenance information and is visualized in the schema below. The archive includes kinematics, spectra, modeled and retrieved parameters.
There are several different methods to interact with the database, including:
- Python
- a website and API at https://simple-bd-archive.org/
- database browsers such as DB Browser for SQLite
To report missing data, data bugs or make feature requests, please use the SIMPLE-db issue tracker.
For day-to-day discussions, please join us in the #simple-db-dev channel in the Astropy Slack workspace. If you are not already in the Astropy Slack, request an account.
To see more details about how this project got started and our initial discussions, check out the archived running notes in the Wiki.
If you'd like to set up your own copy of the SIMPLE database, here's what we recommend:
-
Clone or download a copy of this repo locally onto your computer.
-
Set up an environment for the Python code and install dependencies. We recommend using a conda environment to handle python dependencies. The following commands will use that file to create and activate an environment called
simple-db
. Run these commands at the terminal command promptconda create -n "simple-db" python=3.10 conda activate simple-db pip install -e .
-
In Python, connect a database file
SIMPLE.sqlite
as a Database object calleddb
and recreate the database using the JSON files in thedata/
directory. Run these commands from within Python.from astrodb_utils import load_astrodb from simple.schema import * from simple.schema import REFERENCE_TABLES db = load_astrodb("SIMPLE.sqlite", recreatedb=True, reference_tables=REFERENCE_TABLES)
This step generates a "SIMPLE.sqlite" file which can be opened, explored, and modified using a variety of tools.
-
Use
astrodbkit
to explore, query, and/or modify the database. For example:-
Find all objects in the database with "0141" in the name
db.search_object('0141', fmt='astropy')
-
See all the data in the database for 2MASS J01415823-4633574
db.inventory('2MASS J01415823-4633574', pretty_print=True)
-
-
The database can also be modified using helper scripts found in
simple/utils
and in theastrodb_utils
package. Previously used scripts to modify and/or update the database are stored in thescripts/
directory and can be used for inspiration.
If you've made changes to the SIMPLE Archive that you would like to contribute to the public version, here's how to make a contribution.
-
If you've made changes to the database contents, write out the new/modified JSON files:
db.save_database(directory="data/")
-
(Optional, but highly recommended) Run and modify tests as necessary
pytest
-
Open a pull request with the modified JSON files and optionally, your ingest script.
The schema for the SIMPLE database is described
in the Documentation and can be found in simple/schema.py
.