I think I found a bug in the PieceWiseConstFunc.integral implementation.
This appears to happen when the interval is a "flat" region of the piece-wise constant function.
In the following screenshot, the plot is via get_plottable_data and profile is a PieceWiseConstFunc:
As you can see the integrals over specific intervals add up correctly when done over part of the profile which is "not flat", though as soon as you take an interval over a "flat" part (~2300-2500 ms in this example) the total is wrong.
Furthermore, from the graph you would expect the interval over that region to be ~24, but it gives ~77.
I think I found a bug in the
PieceWiseConstFunc.integral
implementation. This appears to happen when theinterval
is a "flat" region of the piece-wise constant function.In the following screenshot, the plot is via
get_plottable_data
andprofile
is aPieceWiseConstFunc
:As you can see the integrals over specific intervals add up correctly when done over part of the profile which is "not flat", though as soon as you take an interval over a "flat" part (~2300-2500 ms in this example) the total is wrong. Furthermore, from the graph you would expect the interval over that region to be ~24, but it gives ~77.