utilities for Andrew Wetzel's packages
Project description
Description
Python package of utility functions that are useful in analyzing various datasets, in particular, catalogs of particles or galaxies/halos from cosmological simulations. (The GizmoAnalysis and HaloAnalysis packages depend on this package.)
Requirements
python 3, numpy, scipy, h5py, matplotlib
Content
lower-level utilities
array.py
- create, manipulate, analyze arrays
binning.py
- binning of array data
constant.py
- physical constants and unit conversions
coordinate.py
- manipulate positions and velocities
io.py
- read, write, print during run time
math.py
- math, statistics, and fitting
plot.py
- supplementary functions for plotting with matplotlib
higher-level utilities
catalog.py
- analyze catalogs of halos/galaxies
cosmology.py
- calculate cosmological values, including cosmic density, distance, age, volume
halo_property.py
- calculate halo properties at different radii, convert between virial definitions
orbit.py
- compute orbital quantities such as peri/apo-centric distance, orbital time, in a given gravitational potential
particle.py
- high-level analysis of N-body particle data
simulation.py
- tools to help set up and run a simulation
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 is by using pip
:
python -m pip install utilities_awetzel
Alternately, to install the latest stable version from source, clone from bitbucket
:
git clone git://bitbucket.org/awetzel/utilities.git
then either point your PYTHONPATH to this repository or you build and install this project via pip by going inside the top-level utilities
directory and:
python -m pip install .
Using
Once installed, you can use individual modules like this:
import utilities as ut
ut.particle
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 utilities_awetzel-1.0.2.tar.gz
.
File metadata
- Download URL: utilities_awetzel-1.0.2.tar.gz
- Upload date:
- Size: 107.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ece12e488495a69be55f4c9ef0bc02e0f176dc7d90beb223f9adda53906a387 |
|
MD5 | c7e596ef942bdae27bec32776fbebac7 |
|
BLAKE2b-256 | bdf81b6a46334331e6121eae28fd255e83e28f4873635ee3e0e35ff00ae9a797 |
File details
Details for the file utilities_awetzel-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: utilities_awetzel-1.0.2-py3-none-any.whl
- Upload date:
- Size: 111.5 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 | aa2f7e15e29ce20fff1c9e3dfafb0f313f0f62e475a3a123ebe0b776dbf58475 |
|
MD5 | 7a5bc5b5ef713f3d55ea78d88e5b77de |
|
BLAKE2b-256 | d18d87240a4a1cc0014bfa0d86de2feac3208dcaeda1a807ba0011f714e1e911 |