EMC2
Bayesian Image Analysis
Last Updated: 2007nov09
EMC2 is a mixed R/C program designed to carry out
multi-scale spatial modeling of Poisson events data.
The latest version is ver.11-10-2007
The code is a combination of C and R-based programs.
The theory behind it is described in detail in the
EMC2 paper (Esch et al., 2004, ApJ, 610, 1213;
this is the citation to use if you used this code in your analysis).
It has been successfully compiled and run on Mac OS X.4 and various
Linux flavors.
To install, first
download
the tar file that contains all the necessary files to a suitable
directory (e.g., /path/to/EMC2/installation/directory/)
and then type
cd /path/to/EMC2/installation/directory/
gunzip -c Bayes-Image-Analysis.tar.gz | tar xvf -
cd Bayes-Image-Analysis/
R CMD SHLIB bayes-image-analysis.c
Then, launch R from that directory, and within R, type:
dyn.load( "bayes-image-analysis.so" )
img <<- function(){ .C("bayes_image_analysis", map=double(1))
img()
Some example data sets (courtesy A.Connors) are available at
- Standard (i.e. Null) model (Galactic Diffuse from GALPROP etc.)
- Simulated datons from the null
- Simulated datons from Null + Bright extra discontinuous component
- Wrong model (squished above the Galactic plane) for Null
- Connors, A., van Dyk, D.., Chiang, J., & CHASC, 2008, AAS-HEAD, Meeting #10, #3.01
- 2008HEAD...10.0301C [ADS]
-
- Connors, A. & van Dyk, D.A., 2007, SCMA IV, ASP Conf. Series, Eds. G.J.Babu and E.D.Feigelson, Vol. 371, p101
- preprint from 2007-aug-17:
[.pdf]
- 2007ASPC..371..101C [ADS]
-
- Esch, D.N., Connors, A., Karovska, M., & van Dyk, D.A., 2004, ApJ, 610, 1213
- 2004ApJ...610.1213E [ADS]
- [.pdf]
-
Tutorial
- EMC2 is optimized to run as a batch job
- all the parameters are input via a text file.
-
- Each parameter must be explicitly specified
-
0 # 0 for MCMC, 1 for EM
1 # 1 to fit a scale parameter to background
20 # number of draws/iterations
1 # 0 for ML (Richardson Lucy if EM), 1 for MS, 2 for MRF
128 128 # size of data
3 4 5 6 7 8 10 # starting values for alpha. should be 7 numbers for 128 x 128
1 0.05 # gamma prior on total cnt from MS component
100 # MS smoothing parameter
- FOR ML fitting, the last three lines are ignored
- for MRF fitting there is a single smoothing parameter that should appear on line six.
-
- Unresolved Questions:
- what is the official acronym? TBD
- what is the official name? TBD
- how are you going to handle version control? BY DATE STAMPS; INCLUDE A PRINT STATEMENT FIRST THING IN CODE SAYING WHAT THE VERSION IS
- is it an alpha release? beta? who is the blamee? BETA, BUT INTERFACE IS ALPHA. DIRECT QUERIES TO JASON
- what machines has it been run on? MAC (TIGER), LINUX (GENTOO 32-BIT)
- tutorial and "How To"s need to be fleshed out TBD
- are there more/better references? TBD
[CHASC]