nmmn¶
Tools for astronomy, data analysis, time series, numerical simulations and more! These are modules I wrote which I find useful – for whatever reason – in my research.
List of submodules available:
- astro: astronomy
- dsp: signal processing
- lsd: misc. operations on arrays, lists, dictionaries and sets
- stats: statistical methods
- plots: custom plots
- fermi: Fermi LAT analysis methods
- bayes: Bayesian tools for dealing with posterior distributions
- grmhd: tools for dealing with GRMHD numerical simulations
- sed: tools for dealing with spectral energy distributions (SEDs)
Usage¶
Example 1: Remove all nan and inf (\(\infty\)) elements from a numpy array.
>>> import nmmn.lsd, numpy
>>> x=numpy.array([1,2,numpy.nan,numpy.inf])
>>> xok=nmmn.lsd.delweird(x)
Example 2: Reads SED generated by grmonty.
>>> import nmmn.sed
>>> s=nmmn.sed.SED()
>>> s.grmonty('grmonty.spec')
>>> plot(s.lognu, s.ll)
Now it is easy to compute the bolometric luminosity: s.bol().
Contents¶
Todo¶
- [ ] need more examples