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

Make luminosity unit configurable #27

Merged
merged 1 commit into from
Feb 8, 2024
Merged

Make luminosity unit configurable #27

merged 1 commit into from
Feb 8, 2024

Conversation

clelange
Copy link
Member

@clelange clelange commented Feb 7, 2024

Fixes #26

Rather than using

if type(lumi)==float: 
        cms_lumi = f"{lumi:.0f}" if round_lumi else f"{lumi}"
        cms_lumi += " fb^{#minus1}"
elif type(lumi)==str:
        cms_lumi=lumi

as suggested in #26, I think that only changing the unit itself but without the -1 exponent might be safer to prevent people from accidentally using different ^-1. Let me know what you think, @pfs.

@clelange clelange mentioned this pull request Feb 7, 2024
@pfs
Copy link

pfs commented Feb 7, 2024

thanks a lot @clelange that's more elegant and will cover the needs

@clelange clelange merged commit 90d21c6 into master Feb 8, 2024
@clelange clelange deleted the lumi_unit branch February 8, 2024 17:20
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.

Definition of cms_lumi
3 participants