Skip to content

wvPowerSpectra

  wvPowerSpectra: spectral estimates via Welch periodogram

  wvPowerSpectra is a gateway function for the power spectral function that 
  may be called from the command line or from menu_ functions

  Exampe:
  result=wvPowerSpectra(fhandle, field1, value1, field2, value2....)

  returns a sigTOOLResultData object. If no output is requested the result
  will be plotted.

  Valid field/value pairs are:
      'channellist'           the numbers for the channels to analyze
                                    (scalar or vector list)
      'start'                 the start time for data processing
                                 (scalar, in seconds)
      'stop'                  the stop time for data processing
                                 (scalar, in seconds)'
      'windowtype'            the window to apply to the data
                                  (string: e.g. 'hamming')
      'windowlength'          the length of the window and also of the data
                                sections in seconds (scalar)
      'overlap'               the overlap to be used between data sections
                                as a percentage (scalar)
      'overlapmode'           determines whether overalpping will be
                                applied.OverlapMode may be set to 'on',
                                'off' or 'auto':
                            'auto': This is the default. Continuous waveform
                                    data will be processed in overlapping
                                    sections. Episodic and frame-based data will
                                    not be overlapped.
                            'off':  No overlapping will be performed 
                                    regardless of the setting for Overlap.
                            'on':   the overlap will be applied to all
                                    channels including episodic and 
                                    frame-based samples. It will rarely
                                    make sense to do this.
      'detrend'                Logical flag. If true, the linear trend will
                               each data section be removed from each data
                               section before taking its FFT
      'spectrummode'           The type of spectrum to return as a string:
                                    'normalized power spectral density'
                                    'power spectral density'
                                    'linear power spectral density'
                                    'power spectrum'
                                    'linear power spectrum'        
      'spectrogramflag'       Not really a flag but a string. If set to
                                'contour' or 'surface' the spectrum will be
                                returned for each data section and plotted
                                in 3D as a contour or surface. Otherwise,
                                data will be averaged to produce a 2D
                                result.
      'decimation'          decimation factor (zero by default). If non-zero,
                            the data to be analyzed will be anti-alias
                            filtered and downsampled by the factor in
                            decimate. This can be useful with oversampled 
                            data when drawing 3D plots as graphics rendering
                            may otherwise to too slow         

  Toolboxes Required: For decimation only, dfilt objects must be available
  e.g. via SP Toolbox

  -------------------------------------------------------------------------
  Author: Malcolm Lidierth 11/06
  Copyright © The Author & King's College London 2006
  -------------------------------------------------------------------------