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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: utilities_awetzel-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 cdd64ea878b17d0d3eb267afa41b0bd25f10bcf50bac1b3844490bae170a5573
MD5 bce9ac78610cdbd0dbcc751b047cff7c
BLAKE2b-256 c3752bd2ac88fa76070aa4338c7eaf309450e429dbe739585df588007e482c1f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for utilities_awetzel-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 62c6de1f3a70a1f9f1b8919e564048d841e2d2515ea32e4a132cf9b568d67246
MD5 37aa1220b1638f357ec7c0f71e7767cb
BLAKE2b-256 b5559163923196653ff5c7388990eb6c75c0d25582f7f045e081a486f7aef9cf

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