{"id":45294733,"url":"https://github.com/mcfit/idl_emcee","last_synced_at":"2026-02-21T03:35:57.747Z","repository":{"id":178400983,"uuid":"88304498","full_name":"mcfit/idl_emcee","owner":"mcfit","description":"idl_emcee - IDL/GDL Implementation of the Affine-invariant MCMC Hammer","archived":false,"fork":false,"pushed_at":"2025-11-07T18:21:14.000Z","size":793,"stargazers_count":3,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-11-07T20:10:06.589Z","etag":null,"topics":["emcee","ensemble-sampler","hammer","idl","mcmc"],"latest_commit_sha":null,"homepage":"https://mcfit.github.io/idl_emcee","language":"IDL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mcfit.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.rst","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-04-14T21:25:36.000Z","updated_at":"2025-11-07T18:21:18.000Z","dependencies_parsed_at":"2023-07-10T05:33:05.573Z","dependency_job_id":null,"html_url":"https://github.com/mcfit/idl_emcee","commit_stats":null,"previous_names":["mcfit/idl_emcee"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/mcfit/idl_emcee","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcfit%2Fidl_emcee","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcfit%2Fidl_emcee/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcfit%2Fidl_emcee/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcfit%2Fidl_emcee/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcfit","download_url":"https://codeload.github.com/mcfit/idl_emcee/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcfit%2Fidl_emcee/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29672710,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T03:11:15.450Z","status":"ssl_error","status_checked_at":"2026-02-21T03:10:34.920Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["emcee","ensemble-sampler","hammer","idl","mcmc"],"created_at":"2026-02-21T03:35:57.175Z","updated_at":"2026-02-21T03:35:57.736Z","avatar_url":"https://github.com/mcfit.png","language":"IDL","funding_links":[],"categories":[],"sub_categories":[],"readme":"=========\nidl_emcee\n=========\n    \n.. image:: https://app.travis-ci.com/mcfit/idl_emcee.svg?branch=master\n    :target: https://app.travis-ci.com/github/mcfit/idl_emcee\n    :alt: Build Status\n\n.. image:: https://ci.appveyor.com/api/projects/status/52mh7p2qfa2qnu30?svg=true\n    :target: https://ci.appveyor.com/project/danehkar/idl-emcee\n    :alt: Build Status\n\n.. image:: http://mybinder.org/badge.svg\n    :target: http://mybinder.org/repo/mcfit/idl_emcee\n    :alt: Binder\n\n.. image:: https://img.shields.io/badge/license-MIT-blue.svg\n    :target: https://github.com/mcfit/idl_emcee/blob/master/LICENSE\n    :alt: GitHub license\n    \n.. image:: https://img.shields.io/badge/DOI-10.5281/zenodo.4495897-blue.svg\n    :target: https://doi.org/10.5281/zenodo.4495897\n    :alt: Zenodo\n\n.. image:: https://mybinder.org/badge_logo.svg\n :target: https://mybinder.org/v2/gh/mcfit/idl_emcee/HEAD?labpath=Notebook.ipynb\n\n\n**The IDL implementation of the affine-invariant MCMC Hammer**\n\nDescription\n============\n\n**idl_emcee** is an `Interactive Data Language \u003chttp://www.harrisgeospatial.com/ProductsandSolutions/GeospatialProducts/IDL.aspx\u003e`_ (IDL)/`GNU Data Language \u003chttp://gnudatalanguage.sourceforge.net/\u003e`_ (GDL) implementation of the *affine-invariant Markov chain Monte Carlo (MCMC) ensemble sampler*, based on `sl_emcee \u003chttps://github.com/mcfit/sl_emcee\u003e`_ by `M. A. Nowak \u003chttp://space.mit.edu/home/mnowak/isis_vs_xspec/\u003e`_, an S-Lang/`ISIS \u003chttp://space.mit.edu/cxc/isis/\u003e`_ implementation of the MCMC Hammer proposed by `Goodman \u0026 Weare (2010) \u003chttp://dx.doi.org/10.2140/camcos.2010.5.65\u003e`_, and then implemented in Python (`emcee \u003chttps://github.com/dfm/emcee\u003e`_) by `Foreman-Mackey et al. (2013) \u003chttps://ui.adsabs.harvard.edu/abs/2013PASP..125..306F/abstract\u003e`_. \n\nInstallation\n============\n \n* To get this package, you can simply use ``git`` command as follows:\n\n.. code-block::\n\n        git clone --recursive https://github.com/mcfit/idl_emcee.git\n\n* This package does not include any dependent packages in the current version.\n\nInstallation in IDL\n-------------------\n\n* To install the **idl_emcee** IDL library in the Interactive Data Language (IDL), you need to add the path of this package directory to your IDL path. For more information about the path management in IDL, read `the tips for customizing IDL program path \u003chttps://www.harrisgeospatial.com/Support/Self-Help-Tools/Help-Articles/Help-Articles-Detail/ArtMID/10220/ArticleID/16156/Quick-tips-for-customizing-your-IDL-program-search-path\u003e`_ provided by Harris Geospatial Solutions or `the IDL library installation note \u003chttp://www.idlcoyote.com/code_tips/installcoyote.php\u003e`_ by David Fanning in the Coyote IDL Library. \n\n* This package requires IDL version 7.1 or later. \n\n\nInstallation in GDL\n-------------------\n\n*  You can install the GNU Data Language (GDL) if you do not have it on your machine:\n\n    - Linux (Fedora):\n    \n    .. code-block::\n\n        sudo dnf install gdl\n    \n    - Linux (Ubuntu):\n    \n    .. code-block::\n    \n        sudo apt-get install gnudatalanguage\n    \n    - OS X (`brew \u003chttps://brew.sh/\u003e`_):\n    \n    .. code-block::\n\n        brew tap brewsci/science\n        brew install gnudatalanguage\n\n    - OS X (`macports \u003chttps://www.macports.org/\u003e`_):\n    \n    .. code-block::\n\n        sudo port selfupdate\n        sudo port upgrade libtool\n        sudo port install gnudatalanguage\n        \n    - Windows: You can use the `GNU Data Language for Win32 \u003chttps://sourceforge.net/projects/gnudatalanguage-win32/\u003e`_ (Unofficial Version) or you can compile the `GitHub source \u003chttps://github.com/gnudatalanguage/gdl\u003e`_ using Visual Studio 2015 as shown in `appveyor.yml \u003chttps://github.com/gnudatalanguage/gdl/blob/master/appveyor.yml\u003e`_.\n\n* To install the **idl_emcee** library in GDL, you need to add the path of this package directory to your ``.gdl_startup`` file in your home directory:\n\n  .. code-block::\n\n    !PATH=!PATH + ':/home/idl_emcee/pro/'\n\n  You may also need to set ``GDL_STARTUP`` if you have not done in ``.bashrc`` (bash):\n  \n  .. code-block::\n\n    export GDL_STARTUP=~/.gdl_startup\n\n  or in ``.tcshrc`` (cshrc):\n  \n  .. code-block::\n\n    setenv GDL_STARTUP ~/.gdl_startup\n\n* This package requires GDL version 0.9.9 or later.\n\n\nHow to Use\n==========\n\nThe Documentation of the IDL functions provides in detail in the *API Documentation* (`mcfit.github.io/idl_emcee/doc \u003chttps://mcfit.github.io/idl_emcee/doc\u003e`_). This IDL library creates the MCMC sampling  for given upper and lower uncertainties, and propagates uncertainties of parameters into the function.\n\nSee *Jupyter Notebook*: `Notebook.ipynb \u003chttps://github.com/mcfit/idl_emcee/blob/master/Notebook.ipynb\u003e`_\n\nRun *Jupyter Notebook* on `Binder \u003chttps://mybinder.org/v2/gh/mcfit/idl_emcee/HEAD?labpath=Notebook.ipynb\u003e`_:\n\n.. image:: https://mybinder.org/badge_logo.svg\n :target: https://mybinder.org/v2/gh/mcfit/idl_emcee/HEAD?labpath=Notebook.ipynb\n\nYou need to define your function. For example:\n\n.. code-block:: idl\n      \n    function myfunc1, input\n      result1 = total(input)\n      result2 = input[1]^input[0]\n      return, [result1, result2]\n    end\n\nand use the appropriate confidence level and uncertainty distribution. For example, for a 1.645-sigma standard deviation with a uniform distribution:\n\n.. code-block:: idl\n\n    clevel=.9; 1.645-sigma\n    use_gaussian=0 ; uniform distribution from min value to max value\n\nfor a 1-sigma standard deviation with a Gaussian distribution:\n\n.. code-block:: idl\n\n    clevel=0.68268949 ; 1.0-sigma\n    use_gaussian=1 ; gaussian distribution from min value to max value\n\nand specify the number of walkers and the number of iterations:\n\n.. code-block:: idl\n\n    walk_num=30\n    iteration_num=100\n\nNow you provide the given upper and lower uncertainties of the input parameters:\n\n.. code-block:: idl\n\n    input=[1. , 2.]\n    input_err=[0.2, 0.5]\n    input_err_p=input_err\n    input_err_m=-input_err\n    output=myfunc1(input)\n    temp=size(output,/DIMENSIONS)\n    output_num=temp[0]\n\nYou can create the MCMC sample and propagate the uncertainties of the input parameters into your defined functions as follows:\n\n.. code-block:: idl\n\n    mcmc_sim=emcee_hammer('myfunc1', input, input_err_m, $\n                          input_err_p, output, walk_num, $\n                          iteration_num, use_gaussian)\n\nTo determine the upper and lower errors of the function outputs, you need to run:\n\n.. code-block:: idl\n\n    output_error=emcee_find_errors(output, mcmc_sim, clevel, do_plot=1)\n\nAlternatively, you could load the **emcee** object class as follows:\n\n.. code-block:: idl\n\n    mc=obj_new('emcee')\n    mcmc_sim=mc-\u003ehammer('myfunc1', input, input_err_m, $\n                        input_err_p, output, walk_num=walk_num, $\n                        iteration_num=iteration_num, $\n                        use_gaussian=use_gaussian)\n    output_error=mc-\u003efind_errors(output, mcmc_sim, clevel=clevel, do_plot=1)\n\nwhich shows the following distribution histograms:\n\n.. image:: https://raw.githubusercontent.com/mcfit/idl_emcee/master/examples/images/histogram0.jpg\n    :width: 100\n\n.. image:: https://raw.githubusercontent.com/mcfit/idl_emcee/master/examples/images/histogram1.jpg\n    :width: 100\n\nTo print the results:\n\n.. code-block:: idl\n\n    for i=0, output_num-1 do begin\n      print, output[i], transpose(output_error[i,*])\n    endfor\n\nwhich provide the upper and lower limits on each parameter:\n\n.. code-block::\n\n    3.00000     -0.35801017      0.35998471\n    2.00000     -0.37573196      0.36297235\n\nFor other standard deviation, you should use different confidence levels:\n\n.. code-block:: idl\n\n    clevel=0.38292492 ; 0.5-sigma\n    clevel=0.68268949 ; 1.0-sigma\n    clevel=0.86638560 ; 1.5-sigma\n    clevel=0.90       ; 1.645-sigma\n    clevel=0.95       ; 1.960-sigma\n    clevel=0.95449974 ; 2.0-sigma\n    clevel=0.98758067 ; 2.5-sigma\n    clevel=0.99       ; 2.575-sigma\n    clevel=0.99730020 ; 3.0-sigma\n    clevel=0.99953474 ; 3.5-sigma\n    clevel=0.99993666 ; 4.0-sigma\n    clevel=0.99999320 ; 4.5-sigma\n    clevel=0.99999943 ; 5.0-sigma\n    clevel=0.99999996 ; 5.5-sigma\n    clevel=0.999999998; 6.0-sigma\n\nDocumentation\n=============\n\nFor more information on how to use the API functions from the idl_emcee libray, please read the `API Documentation  \u003chttps://mcfit.github.io/idl_emcee/doc\u003e`_ published on `mcfit.github.io/idl_emcee \u003chttps://mcfit.github.io/idl_emcee\u003e`_.\n\nAcknowledgement\n===============\n\nIf you employ **idl_emcee** in your work, please acknowledge the usage by citing the following reference:\n\t\n* Danehkar, A. (2025). idl_emcee: IDL Implementation of the MCMC Ensemble Sampler. *ASP Conf. Ser.*, **538**, 385. doi: `10.26624/BIVU8108 \u003chttps://doi.org/10.26624/BIVU8108\u003e`_ ads: `2025ASPC..538..385D \u003chttps://ui.adsabs.harvard.edu/abs/2025ASPC..538..385D/abstract\u003e`_.\n\n.. code-block:: bibtex\n\n   @article{Danehkar2025,\n     author = {{Danehkar}, Ashkbiz,\n     title = {idl\\_emcee: IDL Implementation of the MCMC Ensemble Sampler},\n     journal = {ASP Conf. Ser.},\n     volume = {538},\n     pages = {385},\n     year = {2025},\n     doi = {10.26624/BIVU8108}\n   }\n\nLearn More\n==========\n\n==================  =============================================\n**Documentation**   https://mcfit.github.io/idl_emcee/doc/\n**Repository**      https://github.com/mcfit/idl_emcee\n**Issues \u0026 Ideas**  https://github.com/mcfit/idl_emcee/issues\n**DOI**             `10.26624/BIVU8108 \u003chttps://doi.org/10.26624/BIVU8108\u003e`_\n**Archive**         `10.5281/zenodo.4495897 \u003chttps://doi.org/10.5281/zenodo.4495897\u003e`_\n==================  =============================================\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcfit%2Fidl_emcee","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcfit%2Fidl_emcee","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcfit%2Fidl_emcee/lists"}