Hi all,
Hoping you can help me with an issue I'm encountering. I am using env() to find the amplitude of the signal, and to smooth out noise. This is a pulse signal (heart/pulse data from a ppg sensor).
Here's the code:
osc <- oscillo(data, sr, xaxt = "s", yaxt ="s")
par(new=TRUE)
envelope <- env(data, sr, envt = "abs", ssmooth = 200, colwave = "blue", yaxt = "s")
I turned on the yaxis labels so I could see that yes, indeed, even when I used envt = "abs" the envelope values are still much higher than the signal.
For context, the data ranges from values about -40 to 40. The envelope values are between 1000-2000.
These somehow plot aligned well when I follow the example code exactly, however I need to use more advanced plotting tools as well as do some analysis on the envelope data. So, I need these variables to be aligned correctly.
Essentially, what I am looking for is the env() function to return the top "edge" of the waveform. I hope I'm missing something basic, because this function is otherwise a lifesaver!!
Thanks for your help!
Catherine