Description
Python package for reading and analyzing 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, and especially if you want to ensure that you have the latest version, you can clone and install from bitbucket, in one of two ways:
using HTTPS:
git clone https://awetzel@bitbucket.org/awetzel/gizmo_analysis.git
or using SSH:
git clone git@bitbucket.org:awetzel/gizmo_analysis.git
Then do one of the following:
-
either point your PYTHONPATH to this repository (and also install and point PYTHONPATH to the utilities/ repository that it depends on)
-
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).'
Metadata
Release files for halo-analysis 1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| halo_analysis-1.1.tar.gz | 72.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| halo_analysis-1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 146.2 kB
Release files / halo_analysis-1.1.tar.gz
| Download URL | halo_analysis-1.1.tar.gz |
|---|---|
| Size | 72.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b15cd59fc7ac55b3a307ed762195a0fd33484434e92bdc812522252cb5744c16
|
|
BLAKE2b-256 checksum How to use checksums |
e1ddcedcdc3579001f07fb1de31c0983906d265b40e1fbd2b0d71fb23a647791
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / halo_analysis-1.1-py3-none-any.whl
| Download URL | halo_analysis-1.1-py3-none-any.whl |
|---|---|
| Size | 73.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a21e8cd745f32bf16c5947cf0b56c90612bd47f9914f1433db30b0071406ff4a
|
|
BLAKE2b-256 checksum How to use checksums |
b60cb7c1e20f9053f765b4b7d15e1b10fcf4311c31917112f7f49e72da99d3fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|