Skip to main content

A package for analyzing N-body snapshots from Gadget and Arepo.

Project description

snapAnalysis

An N-body simulation snapshot analysis package. snapAnalysis is designed specifically for working with idealized simulations of at most a few galaxies, rather than cosmological simulations. Currently, it supports any GADGET-format snapshots stored in the hdf5 format, though compatibility with older GADGET binary files is planned for the future. snapAnalysis can also handle fuzzy dark matter snapshots generated by Arepo's BECDM module.

snapAnalysis supports many common workflows for handling snapshots, including particle loading, particle filtering, centering, rotations, coordinate transformations, galaxy shape analysis, particle orbit extraction, galaxy center-of-mass orbit extraction, and more. Also included are a few basic visualization functions for plotting density and potential fields, density and anisotropy profiles, and more. Units are detected automatically from snapshot headers and handled using astropy's units module.

snapAnalysis is still under active development, and may still be missing planned functionality.

Installation

  1. I recommend installing snapAnalysis inside a virtual environment. If you already have one set up, activate it before cloning this repo. Otherwise, create a virtual environment with
python -m venv --system-site-packages </path/to/virtual/env>

then activate it

source </path/to/virtual/env>/bin/activate

and upgrade pip if needed

pip install --upgrade pip

From Source

NOTE: If you intend to develop/contribute to snapAnalysis, please use the development install instructions.

  1. Clone this repository:
git clone https://github.com/hfoote/snapAnalysis.git
  1. Install with pip:
cd snapAnalysis
python -m pip install .

Tutorials

Tutorial notebooks are available in the tutorials folder. I also encourage you to look through the test suite for further examples of how to use snapAnalysis.

Issues and Contributing

Please see the contribution guidelines.

Acknowledgement

If you use snapAnalysis as part of a published work, we request that you include the URL of this repository (https://github.com/hfoote/snapAnalysis) as a footnote upon the first mention of snapAnalysis in the text, and/or as part of your software acknowledgements.

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

snapanalysis-0.1.0.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

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

snapanalysis-0.1.0-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

Details for the file snapanalysis-0.1.0.tar.gz.

File metadata

  • Download URL: snapanalysis-0.1.0.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for snapanalysis-0.1.0.tar.gz
Algorithm Hash digest
SHA256 73c46d75fa4d3242d26745ad47e13dbff40206fe95204cd2311a1c9cc43d197e
MD5 27b4bba06023209b92ecac54a0fb0803
BLAKE2b-256 ad1c5bd65d2aca107a8711927c8129fadef232a429f9d322dbbcc6a9854ae594

See more details on using hashes here.

File details

Details for the file snapanalysis-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: snapanalysis-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for snapanalysis-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1bd9f96ed3e9c4b8bc843d17bf694d4d4898f5a2ef8b0b1eaea0bd05c1212a1e
MD5 2df8e7512ac747c4040fe8a16ba66931
BLAKE2b-256 3cacff6184a9039a020c305a213cc8dfe7e64c1e58d2a6cdfb825951548080da

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