Skip to content

Commit

Permalink
Fix Quadratic Scaling (docstring and allow pickle) (#1013)
Browse files Browse the repository at this point in the history
* Fix the docstring (EFT->QuadraticScaling, is the filename) and also allow_pickle=True for reading dicts from np gz

* Depracating py2 for combine v10 (#1014)

Remove py2.7 build in CI

---------

Co-authored-by: Jonathon Langford <[email protected]>
  • Loading branch information
JaLuka98 and jonathon-langford authored Oct 31, 2024
1 parent a9ec39f commit 21238d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/QuadraticScaling.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Quadratic(PhysicsModel):
>>> np.save('scales.npy', scales)
Example for running:
text2workspace.py ttV.txt -P HiggsAnalysis.CombinedLimit.EFT:quad --PO scaling=scales.npy --PO process=ttZ --PO process=ttW --PO coefficient=cuW -o cuW.root
text2workspace.py ttV.txt -P HiggsAnalysis.CombinedLimit.QuadraticScaling:quad --PO scaling=scales.npy --PO process=ttZ --PO process=ttW --PO coefficient=cuW -o cuW.root
combine -M MultiDimFit cuW.root --setParameterRanges=-4,4
"""

Expand All @@ -37,7 +37,7 @@ def setPhysicsOptions(self, options):
self.scaling = value

def setup(self):
scaling = np.load(self.scaling)[()]
scaling = np.load(self.scaling, allow_pickle=True)[()]
for process in self.processes:
self.modelBuilder.out.var(process)
name = "r_{0}_{1}".format(process, self.coefficient)
Expand Down

0 comments on commit 21238d9

Please sign in to comment.