Coder Social home page Coder Social logo

autocorr / nestfit Goto Github PK

View Code? Open in Web Editor NEW
11.0 1.0 2.0 2.67 MB

Bayesian spectral decomposition and model fitting using Nested Sampling

License: MIT License

Python 65.93% C 4.45% Makefile 0.05% Cython 29.57%
astronomy spectral-lines nested-sampling bayesian-inference

nestfit's Introduction

nestfit

Documentation Status

Welcome to the NestFit source code repository. NestFit is a Bayesian framework for fitting spectral line data containing multiple velocity components. The official documentation and installation instructions may be found at https://nestfit.readthedocs.io as well as in the included docs/ directory.

If you make use of NestFit or a derivative in an academic work, please cite the forth-coming publication (Svoboda in prep.) or this Zenodo DOI:

@software{brian_svoboda_2021_4470028,
author       = {Brian Svoboda},
title        = {autocorr/nestfit: Initial public release},
month        = jan,
year         = 2021,
publisher    = {Zenodo},
version      = {v0.2},
doi          = {10.5281/zenodo.4470028},
url          = {https://doi.org/10.5281/zenodo.4470028}
}

License

This software is licensed under the MIT license. A copy is supplied in the LICENSE file.

This software makes use of the ammonia model code found in pyspeckit by Adam Ginsburg & Jordan Mirocha and contributors. The Python implementation in pyspeckit was originally based on the IDL program nh3fit by Erik Rosolowsky, described in Rosolowsky et al. (2008).

The implementation of the fast exponential function is taken from the LIME radiative transfer code developed by Christian Brinch and the LIME development team. These modified files (fastexp.h, fastexp.c) are licensed under the GNU GPL v3.

nestfit's People

Contributors

autocorr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

nestfit's Issues

Improve details on installation

I am trying to install the package, however, it is not well documented what needs to be modified. I guess that this is the suggested method:

python setup.py install --user

However, this must be modified in the setup.py file

MNEST_DIR = Path('/users/bsvoboda/code/MultiNest')

maybe use the LD_LIBRARY_PATH variable.

Also, if I need to use the icc compiler instead of gcc, then this command line could be used:

LDSHARED="icc -shared" CC=icc python setup.py install --user

also, I think that -openmp should be removed from setup.py in the case of using icc

How do you setup the code for a new dataset? What is the shortcut?

How to add a new cold-ammonia model?

I want to add the cold-ammonia model. The implementation of the model is simply

    dT0 = 41.18 # Energy difference between (2,2) and (1,1) in K
    trot = tkin * (1 + (tkin/dT0)*np.log(1 + 0.6*np.exp(-15.7/tkin)))**-1
    return ammonia(xarr, trot=trot, **kwargs)

I guess a new function AmmoniaRunner_cold() should be created, which looks almost the same as AmmoniaRunner_cold(). Anything else?

UltraNest support

Would you be interested to add support for https://johannesbuchner.github.io/UltraNest/ ?
The interface should be very similar to pymultinest.

UltraNest is a very reliable tuning-parameter-free algorithm. I have published some examples where the UltraNest algorithm is unbiased while pymultinest gives a different answer. UltraNest is a pure-python package and very easy to install with pip or conda.

UltraNest also supports resuming from disk and MPI parallelisation, if that is useful to you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.