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
:
git clone git://bitbucket.org/awetzel/halo_analysis.git
then either point your PYTHONPATH to this repository (along with our utilities repository that it depends on), or build and install this project via pip by going inside the top-level halo_analysis
directory and:
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file halo_analysis-1.0.2.tar.gz
.
File metadata
- Download URL: halo_analysis-1.0.2.tar.gz
- Upload date:
- Size: 71.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf827452f59b3750b50154f9ffc9f6b09c490fd5d1c932a640568728be2d908c |
|
MD5 | 27b9d06ff96acc8784ddad305f240c03 |
|
BLAKE2b-256 | 4653bf597a0c87674ebea70380a590eb6ae36c30dc0b6dc1e7ee942a438db88d |
File details
Details for the file halo_analysis-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: halo_analysis-1.0.2-py3-none-any.whl
- Upload date:
- Size: 73.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7aa6f22c0491268ca7fa7492dcf2eef089389260269134e4359d42532a7f038a |
|
MD5 | a327619102abaf277f1286a466218d33 |
|
BLAKE2b-256 | 19f86f3935bf158b50f9983c9f48a9c280baf16dcc0fe51aa1ccbe83fa076956 |