Skip to main content

read and analyze halo/galaxy catalogs

Project description

Description

Python package to read and analyze halo/galaxy catalogs (generated from Rockstar or AHF) and merger trees (generated from ConsistentTrees).


Requirements

python 3, numpy, scipy, h5py, matplotlib

This package also requires the utilities/ Python package for various utility functions.


Contents

halo_analysis

halo_io.py

  • read halo files, convert from text to hdf5 format, assign particle species to dark-matter halos

halo_plot.py

  • analyze and plot halos/galaxies

halo_select.py

  • select halos from large simulations for generating initial conditions for zoom-in

tutorials

halo_tutorial.ipynb

  • Jupyter notebook tutorial for using this package

data

snapshot_times.txt

  • example file for storing information about snapshots: scale-factors, redshifts, times, etc

Units

Unless otherwise noted, this package stores all quantities in (combinations of) these base units

  • mass [M_sun]
  • position [kpc comoving]
  • distance, radius [kpc physical]
  • time [Gyr]
  • temperature [K]
  • magnetic field [Gauss]
  • elemental abundance [linear mass fraction]

These are the common exceptions to those standards

  • velocity [km/s]
  • acceleration [km/s / Gyr]
  • gravitational potential [km^2 / s^2]
  • rates (star formation, cooling, accretion) [M_sun / yr]
  • metallicity (if converted from stored massfraction) [log10(mass_fraction / mass_fraction_solar)], using Asplund et al 2009 for Solar

Installing

The easiest way to install this packages and all of its dependencies is by using pip:

python -m pip install halo_analysis

Alternately, to install the latest stable version from source, clone from bitbucket, in one of two ways:

  1. either using HTTPS:
git clone https://bitbucket.org/awetzel/halo_analysis.git
  1. or using SSH:
git clone git://bitbucket.org/awetzel/halo_analysis.git

Then do one of the following:

  1. either point your PYTHONPATH to this repository (and also install and point PYTHONPATH to the utilities/ repository that it depends on)

  2. or build and install this project via pip by going inside the top-level halo_analysis/ directory and doing:

python -m pip install .

Using

Once installed, you can use individual modules like this:

import halo_analysis as halo
halo.io

Citing

If you use this package, please cite it, along the lines of: 'This work used HaloAnalysis (http://ascl.net/2002.014), which first was used in Wetzel et al. 2016 (https://ui.adsabs.harvard.edu/abs/2016ApJ...827L..23W).'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

halo_analysis-1.0.5.tar.gz (72.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

halo_analysis-1.0.5-py3-none-any.whl (73.6 kB view details)

Uploaded Python 3

File details

Details for the file halo_analysis-1.0.5.tar.gz.

File metadata

  • Download URL: halo_analysis-1.0.5.tar.gz
  • Upload date:
  • Size: 72.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for halo_analysis-1.0.5.tar.gz
Algorithm Hash digest
SHA256 d849b0e33fce9f5a5bfc96b04a93491385627e08f2196f3df4a843bad673b0cf
MD5 ad0a42afd7cef235d5fe443df121d039
BLAKE2b-256 9180a5528b77c8386e11901671361620c3e65e89cd0aed046cbf4979937c0a61

See more details on using hashes here.

File details

Details for the file halo_analysis-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: halo_analysis-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 73.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for halo_analysis-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e45770396b1b42d65fc452fa920f6fce2b891e852772e0c6f9fcd295e8b82e86
MD5 1c78c0f2d656cf291877697bfb7b5b14
BLAKE2b-256 5a5b676869307c8724bdc7a194a842dc3035b1a807222d0aa535154772e0a8cd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page