Skip to content
/ nmmn Public

Miscellaneous methods for Astronomy and Data Science. Array methods, statistical distributions, computing goodness-of-fit, numerical simulations and much more

License

Notifications You must be signed in to change notification settings

rsnemmen/nmmn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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: astronomy
  • dsp: signal processing
  • lsd: misc. operations on arrays, lists, dictionaries and sets
  • stats: statistical methods
  • sed: spectral energy distributions
  • plots: custom plots
  • fermi: Fermi LAT analysis methods
  • bayes: Bayesian tools for dealing with posterior distributions
  • grmhd: 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:

1. Install using pip:

pip install nmmn

2. Install the module on the system’s python library path:

git clone https://github.com/rsnemmen/nmmn.git
cd nmmn
python setup.py install

3. Install the package with a symlink, so that changes to the source files will be immediately available:

git clone https://github.com/rsnemmen/nmmn.git
cd nmmn
python setup.py develop

This last method is preferred if you want the latest, bleeding-edge updates in the repo. You may need to run the last command with sudo.

Updating

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

Usage

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.

TODO

  • need more examples of how to use the modules
  • add IFU data cubes method (refer to ifscube)

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) 2020 Rodrigo Nemmen

Visit the author's web page and/or follow him on twitter (@nemmen).

About

Miscellaneous methods for Astronomy and Data Science. Array methods, statistical distributions, computing goodness-of-fit, numerical simulations and much more

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages