A Mathematica Interface for CosmoMC

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Savvas Nesseris
Posts: 77
Joined: April 05 2005
Affiliation: UAM/IFT
Contact:

A Mathematica Interface for CosmoMC

Post by Savvas Nesseris » October 15 2012

I am very pleased to announce my new project called:
"A Mathematica Interface for CosmoMC."

With this tool you can:
1) Analyze your MCMC chains made with CosmoMC or downloaded from the WMAP site.
2) Use it as an educational tool, eg while teaching a cosmology class.
3) Harness the power of Mathematica and apply it to your cutting edge research.

Detailed instructions:
1) Grab the code from here.
2) Unzip the file in some folder.
3) Open "chains_interface_v1.nb" with Mathematica. Version 8.01+ recommended.
4) Evaluate the cell that contains "Chains[]".
5) If you get a message about evaluating "all the initialization cells", click yes.
6) Click the button "Open WMAP chain..." or "Open CosmoMC chain..." and navigate to a folder where you keep your chains. For testing purposes I have included a sample CosmoMC chain in the ".\test chain" directory.
7) To save a plot right click on it and choose "Save graphic as...". Then choose the name of the file, the filetype (pdf, eps etc), a folder where you intend to put the figure and click OK.
8) Have fun!

Developed in Windows 7 with Mathematica 8.0.1.

Current issues with this version (v1):
1) You have to quit the kernel before loading a new chain.
2) Some of the Greek letters are not properly displayed in the 2D tab.
3) Linux users might experience some lag (<0.5secs).
4) Mathematica on Macs may give a warning in the first tab about assigning "a raw object", however the rest of the code seems to work OK.

For more details, snapshots of the GUI in action and future updates, please visit my site.

Comments/questions are welcome!

Savvas Nesseris
Posts: 77
Joined: April 05 2005
Affiliation: UAM/IFT
Contact:

A Mathematica Interface for CosmoMC

Post by Savvas Nesseris » October 16 2012

Version 1.1 is now out. The code is again available from the same link.

New in this version (v1.1):
1) Fixed issue where some of the Greek letters are not properly displayed in the 2D tab.

Current issues with this version (v1.1):
1) You have to quit the kernel before loading a new chain.
2) Linux users might experience some lag (<0.5secs).
3) Mathematica on Macs may give a warning in the first tab about assigning "a raw object", however the rest of the code seems to be working OK.

I'm still working on the other issues and also I'm planning to add a few new features in the next versions.

Any feedback is welcome.

Savvas Nesseris
Posts: 77
Joined: April 05 2005
Affiliation: UAM/IFT
Contact:

A Mathematica Interface for CosmoMC

Post by Savvas Nesseris » October 19 2012

Update:
The lag on Linux seems to be an OS specific problem, ie the Linux version of Mathematica does not handle Dynamic content as well as it does on Windows. I have asked for help from Wolfram Research to see if it can somehow be fixed.

Cassio Pigozzo
Posts: 4
Joined: June 17 2015
Affiliation: Federal University of Bahia / Imperial College London

A Mathematica Interface for CosmoMC

Post by Cassio Pigozzo » June 17 2015

Dear Savvas Nesseris,

Great work on the adaptation to Mathematica. I just have one problem: the code seems to have difficult to make concave regions of plots. It tends to make it convex. I tried some changes, but with no success.
Would you have any suggestion?

Best regards,

Casssio

Savvas Nesseris
Posts: 77
Joined: April 05 2005
Affiliation: UAM/IFT
Contact:

A Mathematica Interface for CosmoMC

Post by Savvas Nesseris » June 21 2015

Hi Cassio,

Yes, I'm aware of that problem and I'm actually working on a solution. I am planning to update it soon.

Cheers,
Savvas

Savvas Nesseris
Posts: 77
Joined: April 05 2005
Affiliation: UAM/IFT
Contact:

A Mathematica Interface for CosmoMC

Post by Savvas Nesseris » July 27 2015

Hi Cassio,

I have a solution for this problem that works great. I will update the code in the next few days.

If you want to have a look at the code earlier, please PM me.

Cheers,
Savvas

Cassio Pigozzo
Posts: 4
Joined: June 17 2015
Affiliation: Federal University of Bahia / Imperial College London

A Mathematica Interface for CosmoMC

Post by Cassio Pigozzo » September 15 2015

Dear Savvas,

Sorry, just saw your last answer now. Is the code updated?

Cheers,

Cassio

Post Reply