# Forum: help

Monitor Forum | Start New ThreadRE: Problems with PlotPowerBand [ reply ] By: Leandro RodrÃguez-LiÃ±ares on 2017-10-23 14:31 | [forum:45402] CalculatePowerBand.zip (4) downloads |

Dear Lisa, Constatino is right: there is a problem when length of signal is less than the size of the analysis window. RHRV pads the window with NA values, and this fills the window with NAs when trying to substract the window mean. This bug was corrected in R-Forge. If you don't want to wait for the new version, one solution is to use the "CalculatePowerBand.R" file attached to this message. You have to insert the line: source("CalculatePowerBand.R) just before using this function in your scripts. I also enclose the files "checkingStructure.R" and "Utils.R", needed if you are using the RHRV version from R-Cran. |

RE: Problems with PlotPowerBand [ reply ] By: Constantino Antonio on 2017-10-16 08:26 | [forum:45387] |

Dear Mrs. Schanz, Sorry for the late reply, somehow I missed the latest messages in the Forum. There is indeed a Bug when computing the short time Fourier transform of a very short window. While we correct this error, you may use the following code to produce correct results: # ... : the other arguments of the function h = CalculatePowerBand(h, size=length(h$HR) / h$Freq_HR, ...) However, note that if your signal is very short, it is better to use a stationary analysis (CalculatePSD) instead of a non-stationary one. Kind regards |

Problems with PlotPowerBand [ reply ] By: Lisa Schanz on 2017-08-27 09:35 | [forum:45292] |

Hi, I calculated my frequency analysis and that seems to work fine, but when I then want to plot it or retrieve the data it doesn't work. The following error occurs: PlotPowerBand(hrv.data, indexFreqAnalysis = 1) Plotting power per band Error in plot.window(...) : need finite 'ylim' values The output from the Analysis here: hrv.data=CalculatePowerBand(hrv.data, indexFreqAnalysis = 1, size=300, shift=30, type="fourier", ULFmin = 0, ULFmax = 0.01, VLFmin = 0.01, VLFmax = 0.02, LFmin = 0.02, LFmax = 0.2, HFmin = 0.2, HFmax = 1) Calculating power per band Using Fourier analysis Windowing signal... 1 windows Power per band calculated Does this problem occur, because there is only one window? I only have this problem with my shorter recordings...Is there anything I can do? Thank you |