Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove pointless fivetheories and seventheories #2186

Merged
merged 3 commits into from
Oct 28, 2024
Merged

Conversation

RoyStegeman
Copy link
Member

@RoyStegeman RoyStegeman commented Oct 22, 2024

This cleans up the theory covmat implementation by removing fivetheories and seventheories from the namespace and instead directly checking for the value of pointprescription.

@RoyStegeman RoyStegeman changed the title Clean up theory covmat implementation Remove pointless fivetheories and seventheories Oct 24, 2024
return f(*args, **kwargs)

# Set this to get the same filename regardless of the action.
res.__name__ = "theory_covmat"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this was done to uniform the name for the stored theory covmat. Do we plan to have different names then?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it was, but the name of that function is not what decides the name of the stored .csv file and instead we have this

generic_path = "datacuts_theory_theorycovmatconfig_total_theory_covmat.csv"

Changing it now would break some old fits so probably not worth it

s = covmat_5pt(name1, name2, deltas1, deltas2)
# 5bar-point -----------------------------------------------------------
else:
s = covmat_5barpt(name1, name2, deltas1, deltas2)
# ---------------------------------------------------------------------
elif l == 7:
# Outdated 7pts implementation: left for posterity ---------------------
if seventheories == "original":
if point_prescription == "7original point":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to use an elif == "7 point" instead of an else? I get that there are only two options at the moment, so the elif statement should be enough. But then any value in the runcard different from "7original point" would give "7 point".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, it's more readable this way

@RoyStegeman
Copy link
Member Author

@achiefa are you happy with this? If so, can you approve the PR?

Sorry for being in a rush, but I'd like to try to clean up the CRM and TCM implementations this week

@RoyStegeman
Copy link
Member Author

Thanks! :)

@RoyStegeman RoyStegeman merged commit 0a1b8d1 into master Oct 28, 2024
6 checks passed
@RoyStegeman RoyStegeman deleted the sum_th_covmats branch October 28, 2024 11:21
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