Skip to main content

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: 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
  1. Install the module on the system’s python library path:
python setup.py install
  1. 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.

Source Distribution

nmmn-0.8.6.tar.gz (70.0 kB view details)

Uploaded Source

Built Distribution

nmmn-0.8.6-py3-none-any.whl (73.1 kB view details)

Uploaded Python 3

File details

Details for the file nmmn-0.8.6.tar.gz.

File metadata

  • Download URL: nmmn-0.8.6.tar.gz
  • Upload date:
  • Size: 70.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for nmmn-0.8.6.tar.gz
Algorithm Hash digest
SHA256 f59f143d4c14827e885df353c31335072966adef7c2e44dd806caabccdbf3e0c
MD5 b2deca765250d9ec626715e225e08bc9
BLAKE2b-256 786e716367a65fbd327ac9c5eb583e7fd7e5c0d25fe62029900cd23084cfdbc4

See more details on using hashes here.

File details

Details for the file nmmn-0.8.6-py3-none-any.whl.

File metadata

  • Download URL: nmmn-0.8.6-py3-none-any.whl
  • Upload date:
  • Size: 73.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for nmmn-0.8.6-py3-none-any.whl
Algorithm Hash digest
SHA256 6762fd7b74e2181b505bdf0ec10180969c60aa04fb9983ab413123a997f5bd08
MD5 a35389a022d0c962f1d3b65a026b0d07
BLAKE2b-256 e7f2e9fc3e3968ff5b0aa4a33cc7652856816683a1760511e82ea74b57c2836d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page