Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ and upgrade pip if needed
pip install --upgrade pip
```

### With `pip` via PyPI
```bash
pip install snapanalysis
```

### 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:
Expand Down
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
7 changes: 7 additions & 0 deletions docs/source/api/modules.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
src
===

.. toctree::
:maxdepth: 4

snapanalysis
53 changes: 53 additions & 0 deletions docs/source/api/snapanalysis.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
snapanalysis package
====================

Submodules
----------

snapanalysis.orbit module
-------------------------

.. automodule:: snapanalysis.orbit
:members:
:show-inheritance:
:undoc-members:

snapanalysis.sim module
-----------------------

.. automodule:: snapanalysis.sim
:members:
:show-inheritance:
:undoc-members:

snapanalysis.snap module
------------------------

.. automodule:: snapanalysis.snap
:members:
:show-inheritance:
:undoc-members:

snapanalysis.utils module
-------------------------

.. automodule:: snapanalysis.utils
:members:
:show-inheritance:
:undoc-members:

snapanalysis.vis module
-----------------------

.. automodule:: snapanalysis.vis
:members:
:show-inheritance:
:undoc-members:

Module contents
---------------

.. automodule:: snapanalysis
:members:
:show-inheritance:
:undoc-members:
36 changes: 36 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

import os
import sys
sys.path.insert(0,os.path.abspath('../src/snapAnalysis/'))

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'snapAnalysis'
copyright = '2026, Hayden Foote'
author = 'Hayden Foote'
release = '0.1.0'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
"nbsphinx",
"sphinx.ext.autosummary",
"sphinx.ext.napoleon",
]

templates_path = ['_templates']
exclude_patterns = []



# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'alabaster'
html_static_path = ['_static']
27 changes: 27 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.. _home:

.. snapAnalysis documentation master file, created by
sphinx-quickstart on Fri May 22 16:15:06 2026.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

``snapAnalysis`` documentation
==============================

``snapAnalysis`` is 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.

.. note::
``snapAnalysis`` is still in early development. We encourage contributions following `our guidelines <https://github.com/hfoote/snapAnalysis/blob/main/CONTRIBUTING.md>`__.

Contents
--------
.. toctree::
:maxdepth: 2
:caption: Contents:

Installation <installation>
Tutorials <tutorials/tutorials>
User Guide <api/modules>

30 changes: 30 additions & 0 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.. _installation:

Installing ``snapAnalysis``
===========================

``snapAnalysis`` is available on PyPI, or can also be installed from source.

To install from PyPI using pip, run

.. code-block:: bash

pip install snapanalysis

Alternatively, to install from source, clone the repository

.. code-block:: bash

git clone https://github.com/hfoote/snapAnalysis.git

and install using pip locally:

.. code-block:: bash

cd snapAnalysis
python -m pip install .

Next Steps
----------

Take a look at the :ref:`tutorials` to get started with using ``snapAnalysis``.
Loading