Skip to content

Tools for computing and analyzing properties derived from the dark matter density field in cosmological simulations.

Notifications You must be signed in to change notification settings

computationalAstroUAM/density_field_properties

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

density_field_properties

Tools for computing and analyzing properties derived from the dark matter density field in cosmological simulations.

This repository provides methods and scripts for:

  • Building the density field from dark matter particles using grid assignment schemes (CIC, TSC, etc.).
  • Computing the tidal tensor and its eigenvalues/eigenvectors.
  • Deriving related quantities such as tidal anisotropy and linear bias.
  • Performing auxiliary analyses on density fields, including smoothing, Fourier transforms, and memory-efficient batching.

Installation

Clone the repository and create the environment:

git clone https://github.com/<your-username>/density_field_properties.git
cd density_field_properties
conda env create -f environment.yml
conda activate density_field

Alternatively, install it as a local editable package:

pip install -e .

Pre-commit installation

To ensure consistent code style and quality, this repository uses pre-commit hooks configured with:

  • Black — automatic code formatter
  • isort — import sorting
  • flake8 — code linting

Install pre-commit

pip install pre-commit

Set up hooks in your local repository

pre-commit install

Run checks manually (optional)

pre-commit run --all-files

The hooks will automatically run on every git commit, ensuring that code is formatted, imports are sorted, and style issues are caught early.


Main dependencies

  • numpy
  • scipy
  • h5py
  • matplotlib
  • tqdm
  • numba (optional, for JIT acceleration)

Scientific context

This codebase is designed for studies involving:

About

Tools for computing and analyzing properties derived from the dark matter density field in cosmological simulations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages