Skip to content

ESDRU: Wrong range checks for alpha, e_step

The range checks for for alpha, e_step in esdru() are wrong:

The code reads:

    if alpha <= 0.0 or alpha >= 1.0:
        raise Exception(
            "Alpha value is out of bounds. Please choose a value between 0.0 and 1.0."
        )

    if e_step <= 0.0 or e_step >= 1.0:
        raise Exception(
            "Step value is out of bounds. Please choose a value between 0.0 and 1.0."
        )

This is not inline with the text in P.SUPPL800:

The ESDRU tool is controlled by two parameters. The first parameter is the overall modification strength α∈[0,1], where α=1 gives no modulation and α=0 gives maximum modulation. The second parameter e_step∈[0,1] is the allowed modulation step during high energy segments.

Both, 0 and 1 should be part of the allowed range.