Page 1 of 1

GetDist - renaming in GUI script

Posted: April 08 2021
by David Figuer
Dear all,

I am trying to analyze with GetDist some chains (not from CosmoMC), but I want to have plots with not the same names for the parameters as the ones I have in the chains files, using the GUI script. My code is something like :

Code: Select all

from getdist import plots
from getdist import paramnames

g=plots.get_subplot_plotter(chain_dir=['a', 'b', 'c'])
roots = []

params = ['paramA','paramB'] #these are the names in the chains files

g.triangle_plot(roots, params ,filled=True, contour_colors=['orange','gray','green'])
This plots a triangle plot with names for the parameters paramA and paramB, the same they have in the chains files.
Is there any option one can include in the script here that allows having in the triangle plot generated not paramA and paramB names but, for example, invented_rename_A and invented_rename_B ?

Thank you and regards.

Re: GetDist - renaming in GUI script

Posted: April 09 2021
by Antony Lewis
Just add latex labels in your input chain .paramnames file.

Or when making MCSamples instances in Python, use the labels argument.

Re: GetDist - renaming in GUI script

Posted: July 23 2021
by suresh kumar p
Step 1: Open corresponding dataset ".paramnames" file, using Notepad++

Step 2: Rename the our desired parameter name latex code corresponding to "Parameter name"

For example, if you want to rename the parameter name of omegal* of [math] as [math], then delete the existing latex code and type your desired Latex code.

Step 3: Now run the GetDist-GUI, you will get the plot with your desired name of the parameter.

Note: If you want to combine more than two data sets and plotting, then change the same manner in all the selected data sets ".paramnames" files.