PIVMat Function Reference<< Prev | Next >> 
Fourier temporal filter of a vector/scalar field time series

VF = tempfilterf(V, IND) applies a Fourier temporal band-pass filter to 
the vector or scalar fields time-series V at the frequency specified by 
the integer index IND. The output field VF is a time series containing 
the spatial structure of the (eigen)mode corresponding to this frequency. 
The frequency index IND can be determined from the peaks in the 
temporal Fourier spectrum, by using the function tempspecf with option 
VF = tempfilterf(V, IND) also works when IND is an array of integers. 
For instance, IND = [IND1, IND2, IND3 ...] applies a band-pass filters 
for the frequency indices IND1, IND2, IND3 ... 
If IND is an interval in the form IFIRST:IEND, it applies a band-pass 
filtering for the range of frequency indices between IFIRST and IEND 
(i.e. it removes all the frequencies outside the interval IND). If 
IFIRST=1, this corresponds to a low-pass filter; if IEND==LENGTH(VF)/2, 
this corresponds to a high-pass filter. 
Algorithm:  tempfilterf Fourier-transforms the input fields V in the 
frequency doamin, applies a mask function (=1 for the frequencies 
specified by the indices IND, and =0 otherwise), and Fourier transform 
back in the time domain. 
Note that if IND is a single integer, the filter is a Dirac in 
frequency, so the resulting output time-series is strictly periodic. 
In this case, only the first period is of interest: it can be recovered 
using the option VF = tempfilterf(V, IND, 'phaseaverf').  On the other 
hand, if IND contains more than one frequency index, the result is not 
periodic in general. 
VF = tempfilterf(V, IND, 'remove') removes all the frequency indices 
specified by IND (again, IND may be a scalar or an array of integers). 
This option just takes the complementary of the intial mask function. 
This is useful to remove the oscillations due to an unwanted vibration 
in the acquisition system. 
By default, the filtering applies to both positive and negative 
frequencies, so that the resulting filtered time series is real-valued. 
It is possible to filter only the positive frequencies by using the 
following syntax:  VF = tempfilterf(V, IND, 'complex'). 
In this case, the output field VF is complex-valued, i.e. the arrays 
VF.vx, VF.vy etc contain both the amplitude and phase of the filtered 
fields. Note that such complex fields can be used for usual computations 
(averf, filterf etc), but cannot be directly displayed using showf. 
See operf to extract the real or imaginary part of VF in order to 
display it using showf. 
If no output argument specified, the filtered field is displayed. 
 Displays the spatial structure of an eigenmode 
  mv = loadvec('*.vc7'); 
  tempspecf(mv, 200, 'peaks'); 
    % from this plot, select the index of the peak of interest, e.g. 35 
  m = tempfilterf(mv, 35); 
  showf(m, 'rot'); 
See Also
tempspecf, phaseaverf, smoothf, operf, showf. 
Published output in the Help browser 
   showdemo tempfilterf 

 Previous: tempcorrfNext: tempspecf 

2005-2021 PIVMat Toolbox 4.20