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

With pip via PyPI

pip install snapanalysis

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.

Documentation

Our documentation is hosted on ReadTheDocs here: [https://snapanalysis.readthedocs.io/en/latest/]

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.1.tar.gz (14.4 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.1-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: snapanalysis-0.1.1.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"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.1.tar.gz
Algorithm Hash digest
SHA256 555f6d2b94256eb6de713548bf1af73e510a8b2d7627caf0ce17ba4c422bba71
MD5 443bb2c67726f254863e1b584b0dcbe3
BLAKE2b-256 20841a0942a4c2d3ee4bb94569540d822d94875d67b0ab638e6a3a7d7b790785

See more details on using hashes here.

File details

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

File metadata

  • Download URL: snapanalysis-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 201eeb0ed886c723fa06c8656f41cc26b70f789e9f63b3ae0c6db946fed481b7
MD5 9e3adcb4a82ac65cf3f03a97cc1aa5cf
BLAKE2b-256 3c49752fff6a0fe39cb717c20b88769bb6baebf9db9bd8fae7262bbe35aaa114

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