Metadata-Version: 2.3
Name: snapanalysis
Version: 0.1.0
Summary: A package for analyzing N-body snapshots from Gadget and Arepo.
Author: hfoote
Author-email: hfoote <haydenfoote@arizona.edu>
Requires-Dist: astropy>=5.0
Requires-Dist: h5py>=3.7.0
Requires-Dist: matplotlib>=3.8
Requires-Dist: numpy>2.0.0
Requires-Dist: scipy>=1.11.4
Requires-Python: >=3.11
Project-URL: Homepage, https://github.com/hfoote/snapAnalysis
Project-URL: Issues, https://github.com/hfoote/snapAnalysis/issues
Description-Content-Type: text/markdown

# `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
0. 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
```bash
python -m venv --system-site-packages </path/to/virtual/env>
```
then activate it 
```bash
source </path/to/virtual/env>/bin/activate
```
and upgrade pip if needed
```bash
pip install --upgrade pip
```

### From Source
NOTE: If you intend to develop/contribute to `snapAnalysis`, please use the [development install instructions](/CONTRIBUTING.md#contributing-code). 
1. Clone this repository:
```bash
git clone https://github.com/hfoote/snapAnalysis.git
```

2. Install with pip:
```bash
cd snapAnalysis
python -m pip install .
```

## Tutorials
Tutorial notebooks are available in the [tutorials folder](/tutorials/). 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](/CONTRIBUTING.md). 


## 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. 
