Padding is an operation that extends a predetermined segment of data (usually referred to as a “trial”) either with zeros or with additional data points. Consequently, for padding you should distinguish zero padding from data padding.
Note that data padding can be applied only to continuous datasets.
Besides the type of padding, there is also a difference in the specification of the time. Sometimes padding is specified as the desired total length of the segment: this is referred to as padding to the desired length. The other approach requires the padding to be specified as the amount of additional data with which the initial segment should be extended, this is referred to as padding with a certain amount. Preprocessing and freqanalysis routines listed above make use of the padding to approach.
The typical routines in which padding is used are:
The automatic artifacts detection functions (ft_artifact_xxx) make use of an articulated scheme of padding with different purposes:
See the automatic artifact rejection for more details on the different types of padding that can be used during data preprocessing (artifact padding, trial padding, filter padding)