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.


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 utilities is with pip

python -m pip install git+ssh://git@bitbucket.org/awetzel/utilities.git

We recommend working on a virtual environment with venv or conda within which to install the package.

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.0.tar.gz (106.7 kB view details)

Uploaded Source

Built Distribution

utilities_awetzel-1.0.0-py3-none-any.whl (111.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: utilities_awetzel-1.0.0.tar.gz
  • Upload date:
  • Size: 106.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.2

File hashes

Hashes for utilities_awetzel-1.0.0.tar.gz
Algorithm Hash digest
SHA256 724466d24ac378cdcdd92d7441779f19d8317ec99bc97211b818cc77570e63ef
MD5 4ed2e3ddbbbb064e1472b82caacbf999
BLAKE2b-256 513540a737b9b5e27b7cf8a4dcdb31c9c8ed6ed97479e17bf5c80023feff4b12

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for utilities_awetzel-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e1ff72e0b85ad3b12da904703b8b7697723f0beb933f8468f7ef94cda3948728
MD5 fe2e0a281ca2c4f668d6b37721397ce9
BLAKE2b-256 6bcad262d430f9fdc2305f928e6a429c514939946448c7bfb5ac85e3d288ec26

See more details on using hashes here.

Supported by

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