-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Bill Freeman edited this page Jun 13, 2017
·
15 revisions
Welcome to the mpmcmcfun wiki!
To install, navigate to any directory in your IDL path and type >git clone https://github.com/billfreeman44/mpmcmcfun.git
- IDL not run on a virtual machine (execute command doesn't work, which is critical)
- Coyote library (needed for plots)
- Astronomy library (needed for the example)
- BMEP, another program of mine. This program uses some of the little subroutines within that program. Put it in your path https://github.com/billfreeman44/bmep
- calculate initial likelihood
- perturb one parameter
- recalculate likelihood (NOTE: if one of the parameters exceeds one of the limits in parinfo, the likelihood is set to 0)
- if better likelihood, add this set of parameters to the chain
- if worse likelihood, add parameters to chain if random number between 0 and 1 is greater than the ratio of the two likelihoods.
- go back to step 2 until you run out of iterations.
- calculate histogram w/ 50 elements
- fit gaussian to histogram to estimate best value and error.
The output plots show the histogram and the guess for the gaussian (dashed line) and the actual gaussian fit (solid line). The best fit value is in the top left and the sigma is below that. If there is a second set of numbers, those are from the guess. The number at the end of the plot title is the sigma of that parameter (so you can compare your input sigma to the output sigma)
Important: your parinfo should contain fixed
, limited
, limits
, and tied
tags. No more or fewer. See lines 15-17 in the test program.