SharpBCI
A multi-threaded brain control interface (BCI) library in C#
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Pages
SharpBCI.FFTPipeable Class Reference

A Pipeable which performs an FFT on each channel It outputs an FFTEvent every windowSize samples. More...

Inheritance diagram for SharpBCI.FFTPipeable:
SharpBCI.Pipeable SharpBCI.IPipeable

Public Member Functions

 FFTPipeable (int windowSize, int channels, double sampleRate)
 Create a new FFTPipeable which performs an FFT over windowSize. More...
 
 FFTPipeable (int windowSize, int channels, double sampleRate, double targetFFTRate)
 Create a new FFTPipeable which performs an FFT over windowSize. More...
 
- Public Member Functions inherited from SharpBCI.Pipeable
void SetInput (BlockingCollection< object > newInput)
 Set the input on this IPipeable to param input Should only be used internally by Connect. More...
 
void Connect (IPipeable other)
 Connect the input of other to our output Note: mirror == false using this override. More...
 
void Connect (IPipeable other, bool mirror)
 Connect the input of other to our output and allow for control of mirror data. More...
 
virtual void Start (TaskFactory taskFactory, CancellationTokenSource cts)
 Actually start doing work (i.e., promise to eventually start pushing data to connected pipeables) More...
 
virtual void Stop ()
 Require this IPipeable to stop, blocking until actually stopped. More...
 

Protected Member Functions

override bool Process (object item)
 
- Protected Member Functions inherited from SharpBCI.Pipeable
void Add (object item)
 

Additional Inherited Members

- Public Attributes inherited from SharpBCI.Pipeable
const int DEFAULT_BUFFER_SIZE = 1000
 

Detailed Description

A Pipeable which performs an FFT on each channel It outputs an FFTEvent every windowSize samples.

Input Types: EEGEvent of type RAW Output Types: EEGEvent of the following types:

  • FFT_RAW
  • FFT_SMOOTHED
  • ALPHA_ABSOLUTE
  • BETA_ABSOLUTE
  • GAMMA_ABSOLUTE
  • DELTA_ABSOLUTE
  • THETA_ABSOLUTE
  • ALPHA_RELATIVE
  • BETA_RELATIVE
  • GAMMA_RELATIVE
  • THETA_RELATIVE
See Also
FFTEvent

Constructor & Destructor Documentation

SharpBCI.FFTPipeable.FFTPipeable ( int  windowSize,
int  channels,
double  sampleRate 
)

Create a new FFTPipeable which performs an FFT over windowSize.

targetFFTRate defaults to 10 Hz with this constructor.

Parameters
windowSizeThe size of the FFT window, determines granularity (google FFT)
channelsHow many channels to operate on
sampleRateSampling rate of data
See Also
EEGEvent
SharpBCI.FFTPipeable.FFTPipeable ( int  windowSize,
int  channels,
double  sampleRate,
double  targetFFTRate 
)

Create a new FFTPipeable which performs an FFT over windowSize.

Expects an input pipeable of EEGEvent's

Parameters
windowSizeThe size of the FFT window, determines granularity (google FFT)
channelsHow many channels to operate on
sampleRateSampling rate of data
targetFFTRateOptional: Frequency (in Hz) to perform an FFT (exact frequency may vary)
See Also
EEGEvent

Member Function Documentation

override bool SharpBCI.FFTPipeable.Process ( object  item)
protectedvirtual

Implements SharpBCI.Pipeable.


The documentation for this class was generated from the following file: