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

Definition of cms_lumi #26

Closed
pfs opened this issue Feb 7, 2024 · 2 comments · Fixed by #27
Closed

Definition of cms_lumi #26

pfs opened this issue Feb 7, 2024 · 2 comments · Fixed by #27

Comments

@pfs
Copy link

pfs commented Feb 7, 2024

Hi,
thanks a lot for the tool. Can the following lines be changed?

if lumi != "":
cms_lumi = f"{lumi:.0f}" if round_lumi else f"{lumi}"
cms_lumi += " fb^{#minus1}"
else:
cms_lumi = lumi

the user may want to force a different unit (1/pb 1/nb, whatever) depending on the dataset being analyzed. S.th. like

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

thanks

@clelange
Copy link
Member

clelange commented Feb 7, 2024

Hi @pfs -- thanks for the feedback. This is certainly something that should be fixed. Please have a look at the proposed solution in #27 and let me know if that addresses your use cases.

@clelange
Copy link
Member

clelange commented Feb 8, 2024

v0.2.0 should show on PyPI soon and will have this change implemented.

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 a pull request may close this issue.

2 participants