CosmoMC - GetDist: NaN in plot_data 2D files

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Antonio Cuesta
Posts: 2
Joined: March 09 2016
Affiliation: University of Barcelona

CosmoMC - GetDist: NaN in plot_data 2D files

Post by Antonio Cuesta » March 09 2016

Just wanted to point out that when I run getdist with distparams.ini to create 2D plots, the files generated in plot_data directory are always full of NaN. This only happens with 2D files (root_2D_param1_param2) and not with 1D files (root_p_param.dat).

If I use the parameter file disttest.ini instead, the problem seems to be solved. I was puzzled by this, then I realized that distparams.ini defaults are contained in the file "python/getdist/analysis_defaults.ini" whereas disttest.ini defaults are linked to "batch2/getdist_common.ini". In the former, the setting "smooth_scale_2D" is set to -1, where a negative value is interpreted as an "automatic smoothing length" which depends on the parameter. In the latter, that same setting is set to 2, which seems to work.

Using GetDist GUI with Planck public chains I sometimes see some glitches when rendering 2D plots, which I have solved by going to "Options" then "Analysis Settings" and then changing the value of "smooth_scale_2D" to 2. For example, if you plot mnu vs. H0 using the chains base_nnu_mnu_plikHM_TTTEEE_lowTEB and base_nnu_mnu_plikHM_TTTEEE_lowTEB_post_H070p6, the former (the one without postprocessing) will be rendered with glitches, which are gone after setting "smooth_scale_2D" to 2.

Not sure if I am the only one having this problem, but if confirmed, I think the default value of "smooth_scale_2D" should be set back to 2 to avoid this issue, or instead, the automatic smoothing length algorithm should be revised. Thanks a lot!

Antony Lewis
Posts: 1941
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

Re: CosmoMC - GetDist: NaN in plot_data 2D files

Post by Antony Lewis » March 10 2016

Yes, the settings are a bit inconsistent at the moment as I made many of the improvements to the analysis tools after the Planck 2015 chains were done (which used plot_data, no auto-bandwidth selection nor bias correction), so some settings aim to replicate the published Planck results. plot_data files are now deprecated (though I think should be OK in most cases, esp. if generated with the old fortran getdist as for the Planck results).

However I can't actually replicate an issue with base_nnu_mnu_plikHM_TTTEEE_lowTEB in GetDist Gui with auto-bandwidth, did you change any other settings? The auto bandwidth selection can certainly fail (any suggestions for improvement are welcome), though in practice I've not seen it fail often. If there are problems, you can avoid them by manually playing width the widths until you think the result is smooth (but not oversmoothed).

Antonio Cuesta
Posts: 2
Joined: March 09 2016
Affiliation: University of Barcelona

CosmoMC - GetDist: NaN in plot_data 2D files

Post by Antonio Cuesta » March 10 2016

Thanks for your prompt answer. Regarding GetDist Gui, I just found the glitches to be completely random using one python distribution, and did not find any glitches at all when using a different python distribution. So that bug is in my environment. Sorry about that.

Regarding the subject of this thread, I will follow your recommendation and I'll set manually the widths if necessary and avoid using the deprecated plot_data files (which don't seem to play well with the automatic smoothing). Thanks a lot!

Post Reply