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 low-level 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 the analysis code and all dependencies is by using pip or conda.

python -m pip install halo_analysis

To install from source, clone the latest version of gizmo_analysis from bitbucket using git:

git clone git://bitbucket.org/awetzel/halo_analysis.git

To build and install the project, inside the cloned halo_analysis directory:

python -m pip install .

Using

Once installed, you can use individual modules like this:

import halo_analysis
halo_analysis.halo_io

or more succinctly 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.1.tar.gz (71.9 kB view details)

Uploaded Source

Built Distribution

halo_analysis-1.0.1-py3-none-any.whl (73.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: halo_analysis-1.0.1.tar.gz
  • Upload date:
  • Size: 71.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.2

File hashes

Hashes for halo_analysis-1.0.1.tar.gz
Algorithm Hash digest
SHA256 c335cbcd56e2ef60b65b807b1eacc66521e147f8ccbe9bdf891b3035ea77f9af
MD5 a7de1e31fb94a551ce8e063c5d1e3e8c
BLAKE2b-256 5917b5f689678d452eb0314e4566403c0b1a9c4f0680706f8c1fab1f9854fd76

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for halo_analysis-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f10fdd96cbc2731e3f05cb2bee0b57b3447f3b5ba8fd8ea3a0a72117646725a8
MD5 53b819584757103d89cb503002f7fa72
BLAKE2b-256 f7462547878857a8bfe2de9fec01794dbdcd9759de7ab025ae9ae0a0b921ca6e

See more details on using hashes here.

Supported by

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