Differences

This shows you the differences between two versions of the page.

Link to this comparison view

faq:how_can_i_interpret_the_different_types_of_padding_that_i_find_when_dealing_with_artifacts [2015/11/26 09:45]
robert [How can I interpret the different types of padding in FieldTrip?]
faq:how_can_i_interpret_the_different_types_of_padding_that_i_find_when_dealing_with_artifacts [2017/08/17 11:21]
Line 1: Line 1:
-{{tag>​faq preprocessing artifact filter}} 
-======How can I interpret the different types of padding in FieldTrip? ====== 
  
-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:  
-  * **[[reference:​ft_preprocessing|ft_preprocessing]]** uses data padding **to** a certain length, see the cfg.padding option. See also the frequently asked question about [[:​faq:​how_does_the_filter_padding_in_preprocessing_work|how the filter padding in ft_preprocessing works]]. 
-  * **[[reference:​ft_freqanalysis|ft_freqanalysis]]** uses zero padding **to** a certain length, see the cfg.pad option 
-  * the artifact detection routines use both zero and data padding **with** a certain amount. 
- 
- 
-The automatic artifacts detection functions (ft_artifact_xxx) make use of an articulated scheme of padding with different purposes: 
-  * trial padding (fig 1): data padding **with**, to include segments of data before and after the trial. 
-  * filter padding (fig 1): zero padding **with**, to avoid the classification of edge effects as artifacts after filtering. 
-  * artifact padding (fig 2): data padding **with**, to extend the length of a detected artifact. 
- 
- 
-{{:​tutorial:​artifactdetect:​padding_fig1.png|}} 
- 
-{{:​tutorial:​artifactdetect:​padding_fig2.png}} 
- 
-See also the [[http://​fieldtrip.fcdonders.nl/​tutorial/​automatic_artifact_rejection|automatic artifact rejection tutorial]] for more details on the different types of padding that can be used during data preprocessing (artifact padding, trial padding, filter padding). ​ 
- 
-And see this [[/​faq/​how_does_the_filter_padding_in_preprocessing_work|FAQ]] on filter padding in **[[/​deference/​ft_preprocessing]]** when reading data from disk.