Skip to content

Processing Blocks

Windows and sampling

How Studio cuts each recording into short, overlapping windows before the processing block runs.

Try it in Studio
On this page

The idea in one minute

A model can't look at a whole 10-second recording at once, and on a device it has to decide quickly. So Studio cuts every recording into short windows, for example 1 second long. The model makes one prediction per window.

Windows overlap, so a movement that starts halfway through one window is still fully inside the next.

The settings

These are in the input block on the Create impulse page.

SettingDefaultMeaning
Input axesThe axes in your data (e.g. accX, accY, accZ)Which sensor columns the impulse uses
Window (ms)1000Length of one window
Increase (ms)500How far the window moves to start the next one
Frequency (Hz)62.5The sampling rate the Raw Data block resamples each window to
Train on data subset100 %Use only part of the training data, to try ideas quickly (1–100 %)
Zero PaddingZero-pad short recordingsWhat to do with recordings shorter than one window: Zero-pad short recordings (fill the rest with zeros) or Skip short recordings

Studio shows an Estimated Window Count so you can see how many windows your data gives.

A simple example

A 3-second recording, a 1000 ms window and a 500 ms increase give 5 windows:

WindowCovers
10.0 – 1.0 s
20.5 – 1.5 s
31.0 – 2.0 s
41.5 – 2.5 s
52.0 – 3.0 s

All 5 windows get the recording's label.

Windows are cut at each recording's own frequency. The Frequency (Hz) setting only changes the Raw Data block, which resamples every window to that rate so all windows have the same size.

Choosing good values

  • Make the window long enough to hold one whole movement. A wave that takes 1.5 seconds needs a window of at least 1500 ms.
  • A smaller increase gives more windows (more training examples), but neighbouring windows look very alike.
  • Keep Window (ms) the same once you have trained, or retrain afterwards.

Where you use this in PetalEdge