Skip to content

computationalAstroUAM/hod_madrid_py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hod_madrid_py

Code to construct mock catalogues bwith an Halo Occupation Distribution (HOD) model. The code is based on Avila+2020. Please cite this paper if you use the code.

Installing and running the code

  1. Download the code. In the command line you can clone the repository: git clone git@github.com:computationalAstroUAM/hod_madrid_py.git
  2. Get to the repository. In the command line: '''cd [PATH TO REPOSITORY]/hod_madrid_py/'''
  3. Get the adequate libraries. For this, you might want to create a conda environment from the repository's environment.yml (this is not neccessary if you already have the needed libraries): '''conda env create -f environment.yml'''
    1. Activate the environment: '''conda activate hod_madrid_py'''
    2. To deactivate the environment when you are done: '''conda deactivate'''
  4. Run the code using the provided example: '''python produce_hod_mock.py'''

Test run

This repository comes with an example file, data/example/UNIT_haloes_logMmin13.500_logMmax14.500.txt. The file contains UNIT dark matter haloes, identified with ROCKSTAR, with masses $13.5<log_{10}M/M_{odot}<14.5$ at $z=0.86$ from Vos Gines+2024.

Running the example code, python produce_hod_mock.py, will generate an HOD mock catalogue in the output folder (this is set not to be part of the repository).

Project Organization

├── produce_hod_mock_updated.py <- Example to run the code
├── README.md          <- The top-level README for developers using this project.
├── data
│   ├── example        <- File with UNIT haloes to make a test run
│
├── docs               <- A default mkdocs project; see www.mkdocs.org for details
│
├── pyproject.toml     <- Project configuration file with package metadata for 
│                         hod_madrid_py and configuration for tools like black
│
├── environment.yml    <- The requirements file for reproducing the analysis environment
│
│
└── src                <- Source code for use in this project.
    │
    ├── __init__.py    <- Makes src a Python module
    │
    ├── hod_model.py   <- Main code for the HOD modelling
    │    │
    ├── hod_io.py      <- Read input parameters and file properties
    │
    ├── hod_shape.py   <- Shape of the average HOD
    │
    ├── hod_pdf.py     <- Probability distributions
    │
    ├── hod_radial_profile.py  <- Radial profile for satellite galaxies 
    │
    ├── hod_v_profile.py       <- Velocity profile for satellite galaxies 
    │
    ├── hod_cosmology.py       <- Codes for cosmological parameters
    │
    └── hod_plots.py   <- Code to create visualizations

About

Code to produce galaxy catalogues with a Halo Occupation Distribution (HOD) model, using a python code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors