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.0.tar.gz (71.7 kB view details)

Uploaded Source

Built Distribution

halo_analysis-1.0.0-py3-none-any.whl (72.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: halo_analysis-1.0.0.tar.gz
  • Upload date:
  • Size: 71.7 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.0.tar.gz
Algorithm Hash digest
SHA256 8f5017c09c37e597b6e0a83aec883108506d8a20e3d77d538412b3a1e8eb9b9d
MD5 3f0b58753a846e644e377adc51d7d6ee
BLAKE2b-256 6e1f2e840309eea4886325c604d0756eaa429acd6c5474d127b8efd47ba0a237

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for halo_analysis-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 55d2be2b7a3f432b914695b389ab7bbaa62187f8ae7d749f1f46246651f39828
MD5 5ebd387ea65d96d571511090efecc93e
BLAKE2b-256 437bba255c8ba64409114f31f832c9dcf82795a493160ccb03cf87a85a0483cd

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