Skip to content

Commit

Permalink
Correct naming
Browse files Browse the repository at this point in the history
sample -> modifier
sample_property -> sample
  • Loading branch information
matthewfeickert committed Oct 18, 2021
1 parent 6937b4e commit 3eacd1e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 26 deletions.
20 changes: 10 additions & 10 deletions src/pyhf/modifiers/histosys.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,19 @@ def append(self, key, channel, sample, thismod, defined_samp):
)

def finalize(self):
for sample in self.builder_data.values():
for sample_property in sample.values():
sample_property["data"]["mask"] = default_backend.concatenate(
sample_property["data"]["mask"]
for modifier in self.builder_data.values():
for sample in modifier.values():
sample["data"]["mask"] = default_backend.concatenate(
sample["data"]["mask"]
)
sample_property["data"]["lo_data"] = default_backend.concatenate(
sample_property["data"]["lo_data"]
sample["data"]["lo_data"] = default_backend.concatenate(
sample["data"]["lo_data"]
)
sample_property["data"]["hi_data"] = default_backend.concatenate(
sample_property["data"]["hi_data"]
sample["data"]["hi_data"] = default_backend.concatenate(
sample["data"]["hi_data"]
)
sample_property["data"]["nom_data"] = default_backend.concatenate(
sample_property["data"]["nom_data"]
sample["data"]["nom_data"] = default_backend.concatenate(
sample["data"]["nom_data"]
)
return self.builder_data

Expand Down
16 changes: 8 additions & 8 deletions src/pyhf/modifiers/shapesys.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,16 @@ def append(self, key, channel, sample, thismod, defined_samp):
)

def finalize(self):
for sample in self.builder_data.values():
for sample_property in sample.values():
sample_property["data"]["mask"] = default_backend.concatenate(
sample_property["data"]["mask"]
for modifier in self.builder_data.values():
for sample in modifier.values():
sample["data"]["mask"] = default_backend.concatenate(
sample["data"]["mask"]
)
sample_property["data"]["uncrt"] = default_backend.concatenate(
sample_property["data"]["uncrt"]
sample["data"]["uncrt"] = default_backend.concatenate(
sample["data"]["uncrt"]
)
sample_property["data"]["nom_data"] = default_backend.concatenate(
sample_property["data"]["nom_data"]
sample["data"]["nom_data"] = default_backend.concatenate(
sample["data"]["nom_data"]
)
return self.builder_data

Expand Down
16 changes: 8 additions & 8 deletions src/pyhf/modifiers/staterror.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,16 @@ def append(self, key, channel, sample, thismod, defined_samp):
)

def finalize(self):
for sample in self.builder_data.values():
for sample_property in sample.values():
sample_property["data"]["mask"] = default_backend.concatenate(
sample_property["data"]["mask"]
for modifier in self.builder_data.values():
for sample in modifier.values():
sample["data"]["mask"] = default_backend.concatenate(
sample["data"]["mask"]
)
sample_property["data"]["uncrt"] = default_backend.concatenate(
sample_property["data"]["uncrt"]
sample["data"]["uncrt"] = default_backend.concatenate(
sample["data"]["uncrt"]
)
sample_property["data"]["nom_data"] = default_backend.concatenate(
sample_property["data"]["nom_data"]
sample["data"]["nom_data"] = default_backend.concatenate(
sample["data"]["nom_data"]
)
return self.builder_data

Expand Down

0 comments on commit 3eacd1e

Please sign in to comment.