Forum: help


RE: Filtering issues [ Reply ] By: Johannes Enevoldsen on 2019-10-23 08:14 | [forum:47059] |
I see that this issue has been fixed in version 4.2.5 (beta), where the four lines overwriting the filter parameters with default values have been removed filterNIHR.R: - lon = 50 - last = 13 - minbpm = 25 - maxbpm = 200 From the old binaries at CRAN, it seems like the issue has been there since RHRV_4.2.0 (2016-11-12). People using non-default parameters in FilterNIHR() should aware that this feature is broken in the current CRAN version. |
RE: Filtering issues [ Reply ] By: Johannes Enevoldsen on 2019-10-15 07:59 | [forum:47013] |
Any update on this. The wording in the tutorial strongly suggest that minbpm and maxbpm are hard thresholds, as it is used to filter out unphysiological HR. The source for FilterNIHR shows that variables are never passed to the .C function, but with the default values. (FilterNIHR in RHRV v4.2.4) function (HRVData, long = 50, last = 13, minbpm = 25, maxbpm = 200, mini = NULL, maxi = NULL, fixed = NULL, verbose = NULL) { CheckDeprecatedArg(mini) CheckDeprecatedArg(maxi) CheckDeprecatedArg(fixed) HRVData = HandleVerboseArgument(HRVData, verbose) CheckBeats(HRVData) CheckNIHR(HRVData) VerboseMessage(HRVData$Verbose, "Filtering non-interpolated Heart Rate") VerboseMessage(HRVData$Verbose, paste("Number of original beats:", length(HRVData$Beat$niHR))) n = length(HRVData$Beat$niHR) lon = 50 last = 13 ind = seq(from = 0, to = 0, length.out = n) minbpm = 25 maxbpm = 200 out <- .C("filterhr", hr = as.double(HRVData$Beat$niHR), as.integer(n), as.integer(lon), as.integer(last), as.integer(minbpm), as.integer(maxbpm), ind = as.integer(ind)) hr = HRVData$Beat$niHR[out$ind == 1] beat = HRVData$Beat$Time[out$ind == 1] rr = HRVData$Beat$RR[out$ind == 1] VerboseMessage(HRVData$Verbose, paste("Number of accepted beats:", length(hr))) HRVData$Beat = data.frame(Time = beat, niHR = hr, RR = rr) return(HRVData) } |
RE: Filtering issues [ Reply ] By: Constantino Antonio on 2017-01-07 13:19 | [forum:43782] |
Hi everyone, We are reviewing the code to check everything is fine, but the function is filtering data (at least with Thomas' data). Note the last 2 lines: > HR_F = FilterNIHR(HR,minbpm = 75,maxbpm = 250) Filtering non-interpolated Heart Rate Number of original beats: 37081 Number of accepted beats: 35581 Some beats may appear below minbpm or maxbmp since they are not hard thresholds (the algorithm uses adaptive thresholds). You may filter again if you want to remove all the peaks or you may use a graphical editor via the EditNIHR() function. Anyway, we will review the code and post a comment here if there is something wrong. Kind regards |
RE: Filtering issues [ Reply ] By: Robert Smith on 2017-01-06 19:18 | [forum:43779] |
I'm seeing the same thing. When I look at the source code for FilterHIHR it seems minbpm and maxbpm are hard coded to 25 and 200. The other parameters seem to be hard coded too. I'm on 4.2.2 Win 7. Thanks for any help, Bob |
Filtering issues [ Reply ] By: Thomas Ede on 2016-12-18 23:53 | [forum:43760]![]() |
Hello all, I'm having trouble filtering Polar data with custom settings: it outputs the same plot as the default settings without filtering out values under the minbmp setting. Any idea? Thanks |