Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

utilities_awetzel-1.0.4.tar.gz (107.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

utilities_awetzel-1.0.4-py3-none-any.whl (112.1 kB view details)

Uploaded Python 3

File details

Details for the file utilities_awetzel-1.0.4.tar.gz.

File metadata

  • Download URL: utilities_awetzel-1.0.4.tar.gz
  • Upload date:
  • Size: 107.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for utilities_awetzel-1.0.4.tar.gz
Algorithm Hash digest
SHA256 f066bb4f1f9e5be4c82f4c17845a63306be9188dd51dde66977966e7cd9b0987
MD5 724fb0599832fb9a716a3cf8e632490e
BLAKE2b-256 8fdc6c1b4d086fde0781f4a751b65c3f4bfd11f223e0d668e6146470022cafe2

See more details on using hashes here.

File details

Details for the file utilities_awetzel-1.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for utilities_awetzel-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 681b75f714d652859718bdbae2da198de4a1d9585407bc6a47c4c423faf57a71
MD5 fb154175e399408b34adc17e7a20f4d2
BLAKE2b-256 a8c9bc7bb4963a7cac1d13130572df32e3cac30c1d068fdba77b090b0f2276d1

See more details on using hashes here.

Supported by

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