Miscellaneous methods for astronomy, dealing with arrays, statistical distributions and computing goodness-of-fit
Project description
nmmn
package
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 simulations
Very basic documentation for the package. Generated with Sphinx.
Installation
You have a couple of options to install the module:
- Install using
pip
:
pip install nmmn
- Install the module on the system’s python library path:
python setup.py install
- Install the package with a symlink, so that changes to the source files will be immediately available:
python setup.py develop
This last method is preferred to sync with changes in the repo. You may need to run the last command with sudo
.
To upgrade the package to the latest stable version, try
pip install --upgrade nmmn
if you installed with pip
. If you installed with the setup.py
script and the develop
option, try
cd /path/to/nmmn
git pull
Usage
First import the specific module that you need:
import nmmn.lsd
Then call the method you need. For example, to remove all nan
and inf
elements from a numpy
array:
import numpy
# generates some array with nan and inf
x=numpy.array([1,2,numpy.nan,numpy.inf])
# removes strange elements
xok=nmmn.lsd.delweird(x)
For more examples, please refer to the examples doc.
TODO
- need more examples of how to use the modules
- add IFU data cubes method
License
See LICENSE
file.
If you have suggestions of improvements, by all means please contribute with a pull request! :)
The MIT License (MIT). Copyright (c) 2018 Rodrigo Nemmen
Visit the author's web page and/or follow him on twitter (@nemmen).
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.