sdss_tree provides environment variables to manage paths for SDSS data as they organized on the Science Archive Server (SAS). sdss_tree can be pip installed:

pip install sdss-tree

The full documentation is hosted on Read The Docs. The source code is managed on GitHub.

A Local SAS

sdss_tree works by copying the structure of the SAS on a local machine, making it a key component of products like sdss_access.

# import the tree
from tree import Tree

# load the environment for DR18
my_tree = Tree('dr18')
Tree(sas_base_dir=/path/to/sdss, config=dr18)

Using sdss_tree

While it is straightforward to use sdss_tree directly, it is perhaps most useful when combined with products like sdss_access to download SDSS data. In any case, it is important to remember the SAS structure sdss_tree expects and to set the SAS_BASE_DIR environment variable thoughtfully.

Back to Top