Skip to content

Commit

Permalink
minor fixes in doc string
Browse files Browse the repository at this point in the history
  • Loading branch information
pfackeldey committed Nov 24, 2023
1 parent 35c5a82 commit 9eabc95
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/dilax/modifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def _mod(


class autostaterrors(eqx.Module):
class Mode(str, eqx.Enumeration):
class Mode(eqx.Enumeration):
poisson = "Poisson per process and bin"
poisson_gauss = "Poisson (Gauss) per process and bin if sumw < (>) threshold"
barlow_beeston_lite = "Barlow-Beeston (lite) approach"
Expand Down Expand Up @@ -325,19 +325,25 @@ def prepare(
auto = dlx.autostaterrors(
sumw=sumw, sumw2=sumw2, threshold=10.0, mode=dlx.autostaterrors.Mode.poisson,
sumw=sumw,
sumw2=sumw2,
threshold=10.0,
mode=dlx.autostaterrors.Mode.poisson,
)
parameters, staterrors = auto.prepare()
# barlow-beeston-lite
auto2 = dlx.autostaterrors(
sumw=sumw, sumw2=sumw2, threshold=10.0, mode=dlx.autostaterrors.Mode.barlow_beeston_lite,
sumw=sumw,
sumw2=sumw2,
threshold=10.0,
mode=dlx.autostaterrors.Mode.barlow_beeston_lite,
)
parameters2, staterrors2 = auto2.prepare()
# materialize:
process = "signal"
pkey = auto.key_template.format(process="signal")
pkey = auto.key_template.format(process=process)
modify = staterrors[pkey](parameters[pkey])
modified_process = modify(sumw[process])
"""
Expand Down

0 comments on commit 9eabc95

Please sign in to comment.