desihub/gcr-catalogs

Name: gcr-catalogs

Owner: desihub

Description: This repository hosts DESI GCR catalogs

Created: 2018-01-17 22:34:54.0

Updated: 2018-04-24 14:44:50.0

Pushed: 2018-04-24 14:44:49.0

Homepage:

Size: 460

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

GCR Catalogs

This repo hosts the mock galaxy catalogs used by DESIQA.

On a NERSC machine, all these catalogs can be directly accessed through the “Generic Catalog Reader” (GCR) inferface. More information about GCR can be found here.

Currently these sets of catalogs are available (Note that these catalogs are not perfect and will continue to be updated):

  1. Buzzard series: by Joe DeRose, Risa Wechsler, Eli Rykoff et al.
  2. buzzard (full catalog, DES Y3 area)
  3. buzzard_test (same as buzzard but a small subset for testing purpose)
  4. buzzard_high-res (higher resolution, smaller sky area)
  5. buzzard_v1.6
  6. EZMocks created by Albert Chuang and Marcos Pellejero Ibanez
  7. MXXL BGS created by Alex Smith, Shaun Cole, Carlton Baugh, Zheng Zheng, Raul Angulo, Peder Norberg, and Idit Zehavi

Each of the catalogs is specified by a YAML config file, which can be found here. The galaxy quantities in these catalogs conform to this schema.

Use GCRCatalogs under the DESIQA Python environment on NERSC

Note: These instructions about Python environment may change in the future. If you encounter issues, please check if there's any updates on these instructions.

with Jupyter notebooks:

First, start a NERSC notebook server and open a notebook with a DESI kernel. Make sure you add the DESIQA Python enviornment to sys.path:

rt sys
path.insert(0, '/project/projectdirs/desi/mocks/desiqa/cori/lib/python3.6/site-packages/')
in a terminal:

Activate DESIQA Python environment by running the following on NERSC (needs to be in bash or zsh):

source /project/projectdirs/desi/software/desi_environment.sh export PYTHONPATH=/project/projectdirs/desi/mocks/desiqa/cori/lib/python3.6/site-packages/:$PYTHONPATH

with a python script:

To be able to import GCRCatalogs, make sure you first source the desi environment (source /project/projectdirs/desi/software/desi_environment.sh) and the first line of the script should be:

!/usr/bin/env python

rt sys
path.insert(0, '/project/projectdirs/desi/mocks/desiqa/cori/lib/python3.6/site-packages/')
Install GCRCatalogs on your own

You can install the latest version by running (but note that you need to change the python paths accordingly)

pip install https://github.com/desihub/gcr-catalogs/archive/master.zip

But note that the actual catalogs can only be accessed on a NERSC machine.

Usage and examples
Contribute to GCRCatalogs:
  1. On GitHub fork the GCRCatalogs GitHub repo.

  2. On NERSC, clone your fork (you can skip this if you've done it)

    cd /your/own/directory git clone git@github.com:YourGitHubUsername/gcr-catalogs.git git remote add upstream https://github.com/desihub/gcr-catalogs.git

  3. Sync with the upstream master branch

    cd /your/own/directory/gcr-catalogs git checkout master git pull upstream master git push origin master

  4. Create a new branch for this edit:

    git checkout -b newBranchName

  5. Make changes

  6. Test by adding your clone to the path when running Python:

    rt sys
    path.insert(0, '/your/own/directory/gcr-catalogs')
    
  7. Commit and push to your forked repo

    git add git commit -m git push origin newBranchName

  8. Go to your forked repo's GitHub page and “create a pull request”.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.