-
Notifications
You must be signed in to change notification settings - Fork 2
Possible rcolgem off-by-one error #35
Copy link
Copy link
Open
Labels
Description
This function at line 1239 gets the index of the sub-interval that h + hoffset lies in, when the interval [maxtime, mintime] is chopped up into FGY_RESOLUTION pieces.
fgyParms$get.index <- function(h) min(1 + fgyParms$FGY_RESOLUTION * (h + hoffset) / ( maxtime - mintime ), fgyParms$FGY_RESOLUTION )
But below (line 1311), we define the time axis as a sequence of length FGY_RESOLUTION to be (I think) the interval boundaries.
haxis <- seq(0, maxHeight, length.out=fgyParms$FGY_RESOLUTION)
This means that we have FGY_RESOLUTION interval boundaries, which means FGY_RESOLUTION - 1 intervals. This does not agree with the get.index function, which assumes there are FGY_RESOLUTION intervals.
The error introduced here is obviously negligible, so keeping the original behaviour for now.
Reactions are currently unavailable