Skip to content

Code to build and access the data catalogs of the SAGA Survey.

License

Notifications You must be signed in to change notification settings

sagasurvey/saga

Repository files navigation

SAGA

arXiv:2008.12783

The SAGA Survey is a spectroscopic survey that aims to determine dwarf galaxy satellite systems around 100 Milky Way analogs down to the brightness of the Leo I galaxy (Mr < −12.3).

This SAGA package contains code to generate and access SAGA data catalogs. This package is intended for SAGA internal use, but it is licensed under the MIT license. If you use this package or part of it in your research, please considering citing SAGA II paper (Mao et al., 2021).

Installation

To install the code, run:

pip install https://github.com/sagasurvey/saga/archive/master.zip

To force an update, run

pip install --upgrade --no-deps --force-reinstall https://github.com/sagasurvey/saga/archive/master.zip

As of April 2022, this code base is compatible with Python 3.7 and above.

Dependencies

All required dependencies will be installed automatically. There are two optional dependencies that require manual installation:

  1. casjobs OR sciserver

    You need to install casjobs or sciserver to download SDSS catalogs.

    • To install casjobs:

      pip install https://github.com/dfm/casjobs/archive/master.zip

      (Note: Do NOT use pip install casjobs as the version on PyPI is outdated.)

    • To install sciserver (recommended):

      pip install "git+https://github.com/sciserver/[email protected]#egg=sciserver&subdirectory=py3"

    In both cases you need to set environmental variables to store your credentials. (CASJOBS_WSID and CASJOBS_PW for casjobs; SCISERVER_USER and SCISERVER_PASS for sciserver).

  2. Extreme Deconvolution

    You only need to install Extreme Deconvolution if you want to build GMM (you don't need it to use GMMs).

    pip install https://github.com/jobovy/extreme-deconvolution/archive/master.zip

Usage

When using SAGA, your code would almost always start with this block:

import SAGA
saga = SAGA.QuickStart('/path/to/saga/dropbox/folder', '/path/to/saga/local/folder')

You can then load various datasets:

# load host list
hosts = saga.host_catalog.load()

# load base catalogs of Paper I hosts
base_paper1 = saga.object_catalog.load(hosts='paper2', return_as='list')

# count number of satellites
for base in base_paper1:
    print(base['HOSTID'][0], '# of satellites =', saga.is_sat.count(base))

You can find more examples at https://github.com/sagasurvey/examples/tree/master/notebooks

You can also find the schema for the host list and for object catalogs at SCHEMA.md.

About

Code to build and access the data catalogs of the SAGA Survey.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages