EXP
EXP: a Python/C++ package for basis function expansion methods in galactic dynamics - Published in JOSS (2025)
Science Score: 98.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 6 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: joss.theoj.org -
○Academic email domains
-
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords
Repository
Basis Function Expansion C++ library and Python package for running N-body galactic simulations and dynamical discovery
Basic Info
- Host: GitHub
- Owner: EXP-code
- License: gpl-3.0
- Language: C++
- Default Branch: main
- Homepage: https://EXP-code.github.io/EXP-docs
- Size: 23.6 MB
Statistics
- Stars: 23
- Watchers: 4
- Forks: 8
- Open Issues: 18
- Releases: 4
Topics
Metadata Files
README.md
EXP: nbody EXPansion code
EXP is a Basis Function Expansion C++ library and Python package for running N-body galactic simulations and dynamical discovery.
Repo organization
| Directory | Description |
| --- | --- |
| Paper | The JOSS paper for EXP |
| cmake | Helpers for cmake installation process |
| doc | The doxygen documentation for EXP |
| expui | Classes used by Python wrappers and by the nbody code and other standalone utilities for coefficient IO support. |
| exputil | The main EXP function and class library used by both pyEXP and EXP |
| extern | The directory for external code needed for installation |
| include | Include file for all common classes |
| pyEXP | Source for Python wrappers |
| src | Source for nbody code |
| tests | An assortment of automatic tests for EXP |
| utils | Older but still useful standalone C++ utilities |
Version reporting
EXP automatically stashes its compile time, git branch, and git commit
hash when make is invoked in the src directory (e.g. as part of the cmake installation). You can see this info using pyEXP using the pyEXP.util.getVersionInfo() command. You can also see this
info using the -v flag, i.e. mpirun -np 1 exp -v or exp -v. Note:
some MPI implementations require the MPI-aware executable to be run
using 'mpirun'. Some recent HPC systems using slurm require the use
of srun instead of mpirun to better administer and schedule your
resource request.
Compile hints
See INSTALL.md for a brief synposis and pointers to more detailed information.
A few quick additional notes. By default, both the n-body code and the
Python bindings, the pyEXP interface, will be compiled by default.
For those of you that only want pyEXP, add -DENABLE_NBODY=OFF to
your cmake invocation or toggle ENABLE_NBODY using ccmake or
your favorite gui configurator.
Documentation
Currently, EXP is extensively documented using doxygen. The
documentation is in doc/html. You will need to enable the build
using the cmake flag -DBUILD_DOCS=ON. A permanent online presense
is in the works.
Companion repositories
We are developing two repositories of examples and tutorials:
| Repo | Description | | --- | --- | | EXP-examples | Each subdirectory contains a full set of body files and configurations to run EXP with with model galaxy | | pyEXP-examples | Tutorials and example workflows for a variety of envisioned use cases |
Both of these are available from the origin as EXP.
pyEXP
Provides a collection of EXP tools for processing and analyzing simulation data using BFE techniques and MSSA.
The main documentation is the many docstrings embedded in the code and
a set of examples provided in the auxiliary pyEXP-examples repository.
An online reference guide is in the works. We
recommend beginning with the example Python scripts and IPython
notebooks and adapting them to your own needs. You can explore
the available classes and member functions using the usual Python
help function. The classes are organized into six submodules
that are described briefly below. Run help(pyEXP.xxxx) for each
of the submodules below for more detailed usage info...
The pyEXP submodules
| Submodule | Description | | --- | --- | | read | Read particle snapshots of various types. Currently EXP, Gadget, Tipsy, and Bonzai types are supported. | | basis | Create and apply specific biorthogonal bases to generate coefficients from particle data and evaluate potential, density, and force fields. | | coefs | Classes for reading, passing, writing, converting, and querying coefficient sets. | | field | Create two- and three-dimension rectangular grids of fields for visualization. | | mssa | Tools to apply Multivariate Singular Spectrum Analysis (mSSA) to the coefficients computed using the 'basis' classes. | | edmd | Tools to test extended Dynamical Mode Decomposition (eDMD) using the basis as the 'observable' functions. | | util | Miscellaneous tools that support the others. Currently this include centering algorithms. While EXP has native methods for doing this, others will need to supply an estimated center. |
pyEXP example workflow
To provide some context, suppose you want to read some snapshots, make some coefficients, and then analyze them with MSSA. The class construction would go something like this:
- Create a reader instance for your simulation, call it 'reader'.
- Create a basis designed to represent the a particular particle type. Star particles, perhaps, so let's call it 'disk'.
- We then pass 'reader' to the createCoefficients member of 'disk' to get coefficients for your snapshots, called 'coefs'
- We might then want to explore dynamical patterns in these coefficients by passing 'coefs' to 'expMSSA'. 'expMSSA' will return principal signals as an updated coefficient object, that we call 'newcoefs'
- 'newcoefs' and 'disk' can then be passed to the FieldGenerator to provide density, potential, force fields, etc. for the each principal signal
This is only one example of many possible uses. There are many variants to this work flow, of course, and we expect that you will invent some interesting ones.
Citation
If you use EXP in your research, please cite the JOSS paper, and consider including other papers from the list in CITATIONS.bib.
Owner
- Name: EXP-code
- Login: EXP-code
- Kind: organization
- Repositories: 1
- Profile: https://github.com/EXP-code
JOSS Publication
EXP: a Python/C++ package for basis function expansion methods in galactic dynamics
Authors
Tags
Python astronomy dynamics galactic dynamics Milky WayCitation (CITATION.cff)
cff-version: "1.2.0"
authors:
- family-names: Petersen
given-names: Michael S.
orcid: "https://orcid.org/0000-0003-1517-3935"
- family-names: Weinberg
given-names: Martin D.
orcid: "https://orcid.org/0000-0003-2660-2889"
doi: 10.5281/zenodo.15164151
message: If you use this software, please cite our article in the
Journal of Open Source Software.
preferred-citation:
authors:
- family-names: Petersen
given-names: Michael S.
orcid: "https://orcid.org/0000-0003-1517-3935"
- family-names: Weinberg
given-names: Martin D.
orcid: "https://orcid.org/0000-0003-2660-2889"
date-published: 2025-05-05
doi: 10.21105/joss.07302
issn: 2475-9066
issue: 109
journal: Journal of Open Source Software
publisher:
name: Open Journals
start: 7302
title: "EXP: a Python/C++ package for basis function expansion methods
in galactic dynamics"
type: article
url: "https://joss.theoj.org/papers/10.21105/joss.07302"
volume: 10
title: "EXP: a Python/C++ package for basis function expansion methods
in galactic dynamics"
GitHub Events
Total
- Create event: 37
- Release event: 3
- Issues event: 28
- Watch event: 7
- Delete event: 32
- Issue comment event: 196
- Push event: 206
- Pull request review event: 121
- Pull request review comment event: 100
- Pull request event: 78
- Fork event: 6
Last Year
- Create event: 37
- Release event: 3
- Issues event: 28
- Watch event: 7
- Delete event: 32
- Issue comment event: 196
- Push event: 206
- Pull request review event: 121
- Pull request review comment event: 100
- Pull request event: 78
- Fork event: 6
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 14
- Total pull requests: 35
- Average time to close issues: 3 months
- Average time to close pull requests: 21 days
- Total issue authors: 7
- Total pull request authors: 5
- Average comments per issue: 2.07
- Average comments per pull request: 2.57
- Merged pull requests: 17
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 14
- Pull requests: 35
- Average time to close issues: 3 months
- Average time to close pull requests: 21 days
- Issue authors: 7
- Pull request authors: 5
- Average comments per issue: 2.07
- Average comments per pull request: 2.57
- Merged pull requests: 17
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- michael-petersen (6)
- The9Cat (4)
- schuhmaj (3)
- M1ssing-N0 (1)
- pmocz (1)
- CarrieFilion (1)
- sophialilleengen (1)
- teuben (1)
Pull Request Authors
- The9Cat (33)
- michael-petersen (10)
- M1ssing-N0 (2)
- georgiastuart (2)
- CarrieFilion (2)
- schuhmaj (1)
- adrn (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- actions/checkout v3 composite
