brinckmann / montepython_public

Public repository for the Monte Python Code
MIT License
92 stars 78 forks source link

Compatibility to "to_change" and "to_reorder" #336

Open TonyZhou729 opened 11 months ago

TonyZhou729 commented 11 months ago

Hi!

I made small modifications to the to_reorder function in the analyze.Information class (analyze.py, lines 2248-2308).

Reason: info.to_reorder used to fail for parameters renamed by info.to_change, as the to_reorder function checks the backup_names list, which does not include the renamed parameter. Passing in the original name does not work either, since it is the new name that must be passed into info.to_plot. This resulted in element not in list error when either the original or changed names was passed into info.to_change.

The modification fixes this, so now the new name defined in info.to_change can be passed into info.to_reorder for proper reordering. Testing confirms that this works for comparing multiple models as well. All modified parts in the code are enclosed in comments "Analyze modification" for you to view the details.

Thanks! Tony