Tools for astronomy, data analysis, time series, numerical simulations, gamma-ray astronomy and more! These are modules I wrote which I find useful—for whatever reason—in my research.
List of modules available (more info here):
astro: astronomydsp: signal processinglsd: misc. operations on arrays, lists, dictionaries and setsstats: statistical methodssed: spectral energy distributionsplots: custom plotsfermi: Fermi LAT analysis methodsbayes: Bayesian tools for dealing with posterior distributionsgrmhd: tools for dealing with GRMHD numerical simulationsml: machine learning utilitiesfinance: financial data tools
Very basic documentation for the package. Generated with Sphinx.
You have a couple of options to install the module:
pip install nmmn
git clone https://github.com/rsnemmen/nmmn.git
cd nmmn
pip install .
git clone https://github.com/rsnemmen/nmmn.git
cd nmmn
pip install -e .
This last method is preferred if you want the latest, bleeding-edge updates in the repo.
If you installed with pip (method 1), to upgrade the package to the latest stable version use
pip install --upgrade nmmn
If you installed with the setup.py script and the develop option (method 3), use
cd /path/to/nmmn
git pull
First import the specific module that you want to use:
import nmmn.lsd
Then call the method you need. For example, to remove all nan and inf elements from a numpy array:
import numpy as np
# generates some array with nan and inf
x=np.array([1,2,np.nan,np.inf])
# removes strange elements
xok=nmmn.lsd.delweird(x)For more examples, please refer to the examples doc.
See TODO.md.
The MIT License (MIT). Copyright (c) 2026 Rodrigo Nemmen.