Forum: help

Monitor Forum | Start New Thread Start New Thread
RE: Problems with PlotPowerBand [ reply ]
By: Leandro Rodríguez-Liñares on 2017-10-23 14:31
[forum:45402] (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:
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
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

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(, indexFreqAnalysis = 1)
Plotting power per band
Error in plot.window(...) : need finite 'ylim' values

The output from the Analysis here:, 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

Thanks to:
Vienna University of Economics and Business University of Wisconsin - Madison Powered By FusionForge