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

Tuple assignment error in Datacard renameNuisanceParameter #999

Open
GiacomoBoldrini opened this issue Aug 7, 2024 · 2 comments
Open

Tuple assignment error in Datacard renameNuisanceParameter #999

GiacomoBoldrini opened this issue Aug 7, 2024 · 2 comments

Comments

@GiacomoBoldrini
Copy link

renameNuisanceParameter method of Datacard class does not work because self.systs is a list of tuple.
The code searches for the old syst name entry in the list and tries to change the name by assignment on the tuple object

self.systs[nuisanceID][0] = newname

tested using latest combine image
gitlab-registry.cern.ch/cms-analysis/general/combine-container:CMSSW_14_1_0_pre4-combine_v10.0.1-harvester_v3.0.0-pre1

@kcormi
Copy link
Collaborator

kcormi commented Aug 30, 2024

Hi Giacomo,

Indeed, this might not have been properly updated reflecting some recent changes -- I think this function may be orphaned and fallen out of use. Where are you running into the error, are you using it in some private code?

@GiacomoBoldrini
Copy link
Author

Hi Kyle,

Yes I am building a very simple framework on top of standard Combine tools for EFT combinations at datacard level. This function allows for easy uncertainties renaming. I find it pretty useful.

We are running the function with a dirty fix converting the tuple to list and then back to tuple.

# allow to modify this
nuis_entry = list(DC.systs[nuisanceID])
nuis_entry[0] = newname
DC.systs[nuisanceID] = tuple(nuis_entry)

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

No branches or pull requests

2 participants