Giter VIP home page Giter VIP logo

mocksurvey's Introduction

mocksurvey

Some useful tools for conducting mock surveys of galaxies from the UniverseMachine empirical model.

Author

  • Alan Pearl

Prerequisites

  • python=3.9.* or python=3.8.*
  • At the time of writing, a prerequisite (halotools>=0.7) is incompatible with python>=3.10.
  • Optional, but recommended to install Corrfunc (pip install Corrfunc)
    • Requires gsl installation (check with gsl-config --version, install with conda install -c conda-forge gsl)

Example to automatically install prerequisites using a conda environment:

conda create -n py39-mocksurvey python=3.9 gsl
conda activate py39-mocksurvey
pip install Corrfunc

Note: If using pycorr, don't pip install Corrfunc. Instead, follow the pycorr instructions at https://py2pcf.readthedocs.io/en/latest/user/building.html

Installation and Getting Started

pip install --upgrade git+https://github.com/AlanPearl/mocksurvey.git

Set path to a directory where you would like to store downloaded data

  • Make a directory, for example:
mkdir -p ~/local/mocksurvey_downloads/
  • Set the path:
python -m mocksurvey set-data-path ~/local/mocksurvey_downloads

Download and install UniverseMachine source code

  • Make a directory, for example:
mkdir -p ~/local/src/
  • Install UniverseMachine:
cd ~/local/src
git clone https://bitbucket.org/pbehroozi/universemachine
cd universemachine
make
python -m mocksurvey config UM set-lightcone-executable ./lightcone

Download UniverseMachine snapshots. This redshift range (0 - inf) downloads all ~300 GB. You may choose a narrower range or enter a single value to download a single snapshot.

python -m mocksurvey download-um 0 inf

Download UltraVISTA photometry

python -m mocksurvey download-uvista

[Optional] Download raw synthetic spectra to assign to mock galaxies (~30 GB)

python -m mocksurvey download-uvista-mock-spectra

Get started by building a mock survey (see Pearl et al. 2022)

python -m mocksurvey lightcone [--help]

View all commands

python -m mocksurvey --help

mocksurvey's People

Contributors

alanpearl avatar

Stargazers

Song Huang avatar johan comparat avatar jacobic avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.