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.3.tar.gz (107.1 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.3-py3-none-any.whl (111.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: utilities_awetzel-1.0.3.tar.gz
  • Upload date:
  • Size: 107.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.11

File hashes

Hashes for utilities_awetzel-1.0.3.tar.gz
Algorithm Hash digest
SHA256 145f0fbaaed7d8c483ed4b3236ebed2eac41cc5b3079d52418c3db6e9b522c11
MD5 e44354c90a7abcb01934a72c54ad0386
BLAKE2b-256 08b0f762d7ecd0152d4a32f1b7bad23c041dadea446e033701936b9082bef785

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for utilities_awetzel-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 fa0b240b7d3ef3803895620dccbd2e1ad8b3ac40d3096ff1735de7fd672a5fd6
MD5 4b8b23d1e32aa0bf2349a1cca5b3d389
BLAKE2b-256 1bfdbef8e12a5044c0074bad08835ce92b0887a39dc48fd7566a309bb7df746f

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