Skip to content

Synthetic galaxy cluster generation for member catalogs and source injection

Notifications You must be signed in to change notification settings

LSSTDESC/synth_cluster

Repository files navigation

synth_cluster

Synthetic galaxy cluster generator for member catalogs and source injection by Tamas N. Varga. / GER-LMU-S3, PI-Seitz

Based on the research paper Synthetic Galaxy Clusters and Observations Based on Dark Energy Survey Year 3 Data 2102.10414

The instructions below are intended for DESC members. If you are using public DESC data sets, please follow the instructions on the DESC Data Portal: data.lsstdesc.org.

Python Package

skysampler is a python package which can draw random realizations of survey data, with the special aim of creating random realizations of galaxy clusters and their surrounding galaxies.

The package:

  • Handles wide field survey data to learn the joint feature distribution of detections and galaxies
  • Draws mock realizations of cluster line-of-sights

Generating mock observations takes place in a data driven way, i.e. clusters are constructed as they are seen in the survey, not according to our theoretical models for them. Hence the products are not critically dependent on our physical assumptions, only on survey conditions.

DES Y3 oriented version of this package is available at https://github.com/vargatn/skysampler

Tutorials

There are a set of jupyter notebooks to illustrate the use-case of this software for DESC DC2 data. These are located in the notebooks folder

  1. Data Preparation snyth_cluster_tutorial-1_preparation
  2. Emulate and extapolate snyth_cluster_tutorial-2
  3. Create mock catalog snyth_cluster_tutorial-3_preparation
  4. Render with source injection pipeline snyth_cluster_tutorial-4_render

Instructions for installation on nersc to work through the example notebooks

Now, you'll want to install this package in the desc-stack-weekly-latest environment.

cd $PSCRATCH   # I just chose PSCRATCH.. you could use another area
mkdir cl-area
export DESCSTACKUSERBASE=$PWD/cl-area   
python /global/common/software/lsst/common/miniconda/start-kernel-cli.py desc-stack-weekly-latest  
# Clone this repo in the cl-area 
cd cl-area
git clone https://github.com/LSSTDESC/synth_cluster.git
cd synth_cluster

If you want to install a branch other than main,

git checkout <branch we want to install>  # Not needed if main branch being used.

This will cause pip's --user install to use this new directory. Alternatively, you can simply install the main branch and continue below.

pip install --user --no-deps --no-build-isolation .

You have now installed the package! Now, to make this available in NERSC Jupyter, you will need to add the following line to the end of your $HOME/.bashrc

export DESCSTACKUSERBASE=$PSCRATCH/cl-area

Note: If you have, by default, a line in your bashrc that reads #module load python # Also loads anaconda, you may need to comment this out to get the package fully working in NERSC Jupyter. Now, you should be able to run through the tutorials in jupyter.nersc.gov.

  1. If you installed synth_cluster from the Jupyter terminal, completely stop and restart your Jupyter Hub using the Hub Control Panel. Otherwise, start up jupyter.nersc.gov.
  2. Open up the example jupyter notebooks. (with the environment ‘desk-stack-weekly-latest’, if you have followed the instructions above to use: python /global/common/software/lsst/common/miniconda/start-kernel-cli.py desc-stack-weekly-latest).
  3. Note, you will need to update paths since the notebook is currently pointing to some local directory, for example we can update to use: redmapper_path = "/global/cfs/cdirs/lsst/shared/xgal/cosmoDC2/addons/redmapper_v1.1.4/cosmoDC2_v1.1.4_redmapper_v0.7.5_clust.h5"

Instructions for installation on your local computer

git clone https://github.com/LSSTDESC/synth_cluster.git
cd synth_cluster
python setup.py install
export PYTHONPATH=$PATH_to_SYNTH_CLUSTER/synth_cluster:$PYTHONPATH

Utility for multiplying PDFs

represented as a set of points or mcmc samples

See this tutorial

About

Synthetic galaxy cluster generation for member catalogs and source injection

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •