Skip to content

Adding external likelihood in the report#197

Open
TommasoArmadillo wants to merge 17 commits into
mainfrom
report_ext_likelihood
Open

Adding external likelihood in the report#197
TommasoArmadillo wants to merge 17 commits into
mainfrom
report_ext_likelihood

Conversation

@TommasoArmadillo
Copy link
Copy Markdown
Collaborator

Hi :) With this PR we want to add in the final report a table including the external likelihood for each dataset, which is currently not included, as pointed out in #114.

Now it is possible to add to the report runcard an option for that:

chi2_plots:
  table: True # display chi2 tables per dataset?
  table_external_chi2: True # display tables for external chi2 datasets?

If no option is provided the default behaviour is not to include the external likelihood table. This is because the calculation of the rge matrix is done when importing the external likelihood module and hence might require some time. It is true that this might be avoided by modifying the yaml in the result folder in order to load the rge matrix, but I think it is not advisable to do that and moreover not all the external likelihood modules currently have this option.

The table include the external likelihood as computed by the compute_chi2 method in each module and looks like this:

Screenshot 2025-10-28 at 18 28 09

I also added a test. Let me know if you would like to modify something either in the look of the table or in the functionalities

@LucaMantani
Copy link
Copy Markdown
Collaborator

@TommasoArmadillo Hi Tommaso, a quick comment just by looking at the table. For the "normal" datasets we always display the value of the chi2 for both SM and the best_fit point solution, would it be possible to do the same?

@TommasoArmadillo
Copy link
Copy Markdown
Collaborator Author

I rebased onto main to solve the problem with the pre-commit.

I modified a bit the chi2 table, now it also shows the SM value for the external likelihood. The table looks like this

Screenshot 2025-11-19 at 15 15 52

@LucaMantani LucaMantani changed the base branch from main to pca_rotation_subspace November 19, 2025 16:51
@LucaMantani LucaMantani changed the base branch from pca_rotation_subspace to main November 19, 2025 16:51
@LucaMantani
Copy link
Copy Markdown
Collaborator

Thank you @TommasoArmadillo , I just skimmed it and noticed that you define (correctly) a method to load the external chi2. This is actually done once and for all in PR #190, precisely because there were different parts of the code that needed to load the external chi2. Unfortunately that is not yet merged, but maybe the best thing you can do is to simply copy the external_chi2.py file from there and load the external chi2 calling the function therein without defining again. Eventually things will converge between the two PRs, but at least you take advantage of that instead of redefining it.

@jacoterh jacoterh requested a review from LucaMantani February 25, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants