Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 26, 2020
1 parent a6c776e commit 9dd6470
Show file tree
Hide file tree
Showing 9 changed files with 335 additions and 101 deletions.
223 changes: 222 additions & 1 deletion docs/examples/notebooks/custom_modifiers.ipynb

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/pyhf/modifiers/histosys.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class histosys_combined:
def __init__(
self, histosys_mods, pdfconfig, mega_mods, interpcode='code0', batch_size=None
):
self.name = histosys.name
self.op_code = histosys.op_code
self.name = histosys.name
self.op_code = histosys.op_code
self.batch_size = batch_size
self.interpcode = interpcode
assert self.interpcode in ['code0', 'code2', 'code4p']
Expand Down
4 changes: 2 additions & 2 deletions src/pyhf/modifiers/lumi.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ def required_parset(cls, sample_data, modifier_data):
class lumi_combined:
def __init__(self, lumi_mods, pdfconfig, mega_mods, batch_size=None):
self.batch_size = batch_size
self.name = lumi.name
self.op_code = lumi.op_code
self.name = lumi.name
self.op_code = lumi.op_code

keys = [f'{mtype}/{m}' for m, mtype in lumi_mods]
lumi_mods = [m for m, _ in lumi_mods]
Expand Down
4 changes: 2 additions & 2 deletions src/pyhf/modifiers/normfactor.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ def required_parset(cls, sample_data, modifier_data):
class normfactor_combined:
def __init__(self, normfactor_mods, pdfconfig, mega_mods, batch_size=None):
self.batch_size = batch_size
self.name = normfactor.name
self.op_code = normfactor.op_code
self.name = normfactor.name
self.op_code = normfactor.op_code

keys = [f'{mtype}/{m}' for m, mtype in normfactor_mods]
normfactor_mods = [m for m, _ in normfactor_mods]
Expand Down
4 changes: 2 additions & 2 deletions src/pyhf/modifiers/normsys.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class normsys_combined:
def __init__(
self, normsys_mods, pdfconfig, mega_mods, interpcode='code1', batch_size=None
):
self.name = normsys.name
self.op_code = normsys.op_code
self.name = normsys.name
self.op_code = normsys.op_code
self.interpcode = interpcode
assert self.interpcode in ['code1', 'code4']

Expand Down
4 changes: 2 additions & 2 deletions src/pyhf/modifiers/shapefactor.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def __init__(self, shapefactor_mods, pdfconfig, mega_mods, batch_size=None):
and at that point can be used to compute the effect of shapefactor.
"""
self.name = shapefactor.name
self.op_code = shapefactor.op_code
self.name = shapefactor.name
self.op_code = shapefactor.op_code
self.batch_size = batch_size
keys = [f'{mtype}/{m}' for m, mtype in shapefactor_mods]
shapefactor_mods = [m for m, _ in shapefactor_mods]
Expand Down
4 changes: 2 additions & 2 deletions src/pyhf/modifiers/shapesys.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ def required_parset(cls, sample_data, modifier_data):

class shapesys_combined:
def __init__(self, shapesys_mods, pdfconfig, mega_mods, batch_size=None):
self.name = shapesys.name
self.op_code = shapesys.op_code
self.name = shapesys.name
self.op_code = shapesys.op_code
self.batch_size = batch_size

keys = [f'{mtype}/{m}' for m, mtype in shapesys_mods]
Expand Down
4 changes: 2 additions & 2 deletions src/pyhf/modifiers/staterror.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ def required_parset(cls, sample_data, modifier_data):

class staterror_combined:
def __init__(self, staterr_mods, pdfconfig, mega_mods, batch_size=None):
self.name = staterror.name
self.op_code = staterror.op_code
self.name = staterror.name
self.op_code = staterror.op_code
self.batch_size = batch_size

keys = [f'{mtype}/{m}' for m, mtype in staterr_mods]
Expand Down
Loading

0 comments on commit 9dd6470

Please sign in to comment.