04-01-2025, 07:12 PM
(This post was last modified: 04-01-2025, 07:13 PM by Jens Noriʇzsɔɥ.)
The value field is updated at the rate of the analysis block, so nothing really to see here at about 100 Hz. In order to get a better understanding of what's going on, it makes sense to plot the containers against time. You will observe then that the “current” value is averaged with “width” previous values (a total of 11 data points in your case).
There is a rather common … unintendedness in your .phyphox file: you would like to keep the x data, accordingly
Without “keep” the x container is cleared when exiting this block. Do not use “append” for xAvg. I still need to find a clever way to optimise taking the moving average, so for the time being better take all recorded data in each run.
There is a rather common … unintendedness in your .phyphox file: you would like to keep the x data, accordingly
Code:
<movingaverage>
<input as="data" keep="true">x</input>
<input as="width" type="value">10</input>
<output as="data">xAvg</output>
</movingaverage>
Without “keep” the x container is cleared when exiting this block. Do not use “append” for xAvg. I still need to find a clever way to optimise taking the moving average, so for the time being better take all recorded data in each run.