ESP OpenBCI - An EEG Signal Processing Library for OpenBCI Hardware

com.github.mrstampy.esp.dsp.lab
Class DefaultLab

java.lang.Object
  extended by com.github.mrstampy.esp.dsp.lab.AbstractLab
      extended by com.github.mrstampy.esp.dsp.lab.DefaultLab
All Implemented Interfaces:
Lab, LabValues, java.io.Serializable

public class DefaultLab
extends AbstractLab
implements Lab

The Class DefaultLab.

See Also:
Serialized Form

Constructor Summary
DefaultLab()
          Instantiates a new default lab.
DefaultLab(int numBands)
          Instantiates a new default lab.
 
Method Summary
 void calculateBaseline()
          Calculate baseline.
 double getBaseline()
          Gets the baseline.
 double getHighNormalizeFftFrequency()
          Gets the high normalize fft frequency.
 double getHighPassFilterFactor()
          Gets the high pass filter factor.
 double getHighPassFrequency()
          Gets the high pass frequency.
 double getLowNormalizeFftFrequency()
          Gets the low normalize fft frequency.
 double getLowPassFilterFactor()
          Gets the low pass filter factor.
 double getLowPassFrequency()
          Gets the low pass frequency.
 PassFilter getPassFilter()
          Gets the pass filter.
protected  EspSignalUtilities getUtilities()
          Gets the utilities.
 EspWindowFunction getWindowFunction()
          Gets the window function.
 boolean isAbsoluteValues()
          Checks if is absolute values.
 boolean isNormalizeFft()
          Checks if is normalize fft.
 boolean isNormalizeSignal()
          Checks if is normalize signal.
 void process(double[][] signal)
          Process.
 void resetBaseline()
          Reset baseline.
 void setAbsoluteValues(boolean absoluteValues)
          Sets the absolute values.
 void setBaseline(double baseline)
          Sets the baseline.
 void setConnection(RawEspConnection connection)
          Sets the connection.
 void setHighNormalizeFftFrequency(double freq)
          Sets the high normalize fft frequency.
 void setHighPassFilterFactor(double factor)
          Sets the high pass filter factor.
 void setHighPassFrequency(double band)
          Sets the high pass frequency.
 void setLowNormalizeFftFrequency(double freq)
          Sets the low normalize fft frequency.
 void setLowPassFilterFactor(double factor)
          Sets the low pass filter factor.
 void setLowPassFrequency(double band)
          Sets the low pass frequency.
 void setNormalizeFft(boolean normalize)
          Sets the normalize fft.
 void setNormalizeSignal(boolean normalize)
          Sets the normalize signal.
 void setNumBands(int numBands)
          Sets the num bands.
 void setPassFilter(PassFilter filter)
          Sets the pass filter.
protected  void setUtilities(EspSignalUtilities utilities)
          Sets the utilities.
 void setWindowFunction(EspWindowFunction windowFunction)
          Sets the window function.
 void stopCalculateBaseline()
          Stop calculate baseline.
 
Methods inherited from class com.github.mrstampy.esp.dsp.lab.AbstractLab
addSignalProcessedListener, clearSignalProcessedListeners, getChannel, getConnection, getFftType, getLabValues, getNumBands, getNumChannels, notifyProcessedListeners, removeSignalProcessedListener, setChannel, setFftType, setLabValues, triggerProcessing, triggerProcessing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.github.mrstampy.esp.dsp.lab.Lab
addSignalProcessedListener, clearSignalProcessedListeners, getConnection, getLabValues, removeSignalProcessedListener, setLabValues, triggerProcessing, triggerProcessing
 
Methods inherited from interface com.github.mrstampy.esp.dsp.lab.LabValues
getChannel, getFftType, getNumBands, getNumChannels, setChannel, setFftType
 

Constructor Detail

DefaultLab

public DefaultLab()
Instantiates a new default lab.


DefaultLab

public DefaultLab(int numBands)
Instantiates a new default lab.

Parameters:
numBands - the num bands
Method Detail

process

public void process(double[][] signal)
Description copied from interface: Lab
Process.

Specified by:
process in interface Lab
Parameters:
signal - the signal

setNumBands

public void setNumBands(int numBands)
Description copied from interface: LabValues
Sets the num bands.

Specified by:
setNumBands in interface LabValues
Overrides:
setNumBands in class AbstractLab
Parameters:
numBands - the new num bands

setConnection

public void setConnection(RawEspConnection connection)
Description copied from interface: Lab
Sets the connection.

Specified by:
setConnection in interface Lab
Overrides:
setConnection in class AbstractLab
Parameters:
connection - the new connection

stopCalculateBaseline

public void stopCalculateBaseline()
Description copied from interface: Lab
Stop calculate baseline.

Specified by:
stopCalculateBaseline in interface Lab

calculateBaseline

public void calculateBaseline()
Description copied from interface: Lab
Calculate baseline.

Specified by:
calculateBaseline in interface Lab

resetBaseline

public void resetBaseline()
Description copied from interface: Lab
Reset baseline.

Specified by:
resetBaseline in interface Lab

setHighPassFrequency

public void setHighPassFrequency(double band)
Description copied from interface: LabValues
Sets the high pass frequency.

Specified by:
setHighPassFrequency in interface LabValues
Parameters:
band - the new high pass frequency

setLowPassFrequency

public void setLowPassFrequency(double band)
Description copied from interface: LabValues
Sets the low pass frequency.

Specified by:
setLowPassFrequency in interface LabValues
Parameters:
band - the new low pass frequency

isAbsoluteValues

public boolean isAbsoluteValues()
Description copied from interface: LabValues
Checks if is absolute values.

Specified by:
isAbsoluteValues in interface LabValues
Returns:
true, if is absolute values

setAbsoluteValues

public void setAbsoluteValues(boolean absoluteValues)
Description copied from interface: LabValues
Sets the absolute values.

Specified by:
setAbsoluteValues in interface LabValues
Parameters:
absoluteValues - the new absolute values

getHighPassFrequency

public double getHighPassFrequency()
Description copied from interface: LabValues
Gets the high pass frequency.

Specified by:
getHighPassFrequency in interface LabValues
Returns:
the high pass frequency

getLowPassFrequency

public double getLowPassFrequency()
Description copied from interface: LabValues
Gets the low pass frequency.

Specified by:
getLowPassFrequency in interface LabValues
Returns:
the low pass frequency

getPassFilter

public PassFilter getPassFilter()
Description copied from interface: LabValues
Gets the pass filter.

Specified by:
getPassFilter in interface LabValues
Returns:
the pass filter

setPassFilter

public void setPassFilter(PassFilter filter)
Description copied from interface: LabValues
Sets the pass filter.

Specified by:
setPassFilter in interface LabValues
Parameters:
filter - the new pass filter

isNormalizeSignal

public boolean isNormalizeSignal()
Description copied from interface: LabValues
Checks if is normalize signal.

Specified by:
isNormalizeSignal in interface LabValues
Returns:
true, if is normalize signal

setNormalizeSignal

public void setNormalizeSignal(boolean normalize)
Description copied from interface: LabValues
Sets the normalize signal.

Specified by:
setNormalizeSignal in interface LabValues
Parameters:
normalize - the new normalize signal

isNormalizeFft

public boolean isNormalizeFft()
Description copied from interface: LabValues
Checks if is normalize fft.

Specified by:
isNormalizeFft in interface LabValues
Returns:
true, if is normalize fft

setNormalizeFft

public void setNormalizeFft(boolean normalize)
Description copied from interface: LabValues
Sets the normalize fft.

Specified by:
setNormalizeFft in interface LabValues
Parameters:
normalize - the new normalize fft

setHighNormalizeFftFrequency

public void setHighNormalizeFftFrequency(double freq)
Description copied from interface: LabValues
Sets the high normalize fft frequency.

Specified by:
setHighNormalizeFftFrequency in interface LabValues
Parameters:
freq - the new high normalize fft frequency

getHighNormalizeFftFrequency

public double getHighNormalizeFftFrequency()
Description copied from interface: LabValues
Gets the high normalize fft frequency.

Specified by:
getHighNormalizeFftFrequency in interface LabValues
Returns:
the high normalize fft frequency

setLowNormalizeFftFrequency

public void setLowNormalizeFftFrequency(double freq)
Description copied from interface: LabValues
Sets the low normalize fft frequency.

Specified by:
setLowNormalizeFftFrequency in interface LabValues
Parameters:
freq - the new low normalize fft frequency

getLowNormalizeFftFrequency

public double getLowNormalizeFftFrequency()
Description copied from interface: LabValues
Gets the low normalize fft frequency.

Specified by:
getLowNormalizeFftFrequency in interface LabValues
Returns:
the low normalize fft frequency

getBaseline

public double getBaseline()
Description copied from interface: LabValues
Gets the baseline.

Specified by:
getBaseline in interface LabValues
Returns:
the baseline

setBaseline

public void setBaseline(double baseline)
Description copied from interface: LabValues
Sets the baseline.

Specified by:
setBaseline in interface LabValues
Parameters:
baseline - the new baseline

setLowPassFilterFactor

public void setLowPassFilterFactor(double factor)
Description copied from interface: LabValues
Sets the low pass filter factor.

Specified by:
setLowPassFilterFactor in interface LabValues
Parameters:
factor - the new low pass filter factor

getLowPassFilterFactor

public double getLowPassFilterFactor()
Description copied from interface: LabValues
Gets the low pass filter factor.

Specified by:
getLowPassFilterFactor in interface LabValues
Returns:
the low pass filter factor

setHighPassFilterFactor

public void setHighPassFilterFactor(double factor)
Description copied from interface: LabValues
Sets the high pass filter factor.

Specified by:
setHighPassFilterFactor in interface LabValues
Parameters:
factor - the new high pass filter factor

getHighPassFilterFactor

public double getHighPassFilterFactor()
Description copied from interface: LabValues
Gets the high pass filter factor.

Specified by:
getHighPassFilterFactor in interface LabValues
Returns:
the high pass filter factor

setUtilities

protected void setUtilities(EspSignalUtilities utilities)
Sets the utilities.

Parameters:
utilities - the new utilities

getUtilities

protected EspSignalUtilities getUtilities()
Gets the utilities.

Returns:
the utilities

getWindowFunction

public EspWindowFunction getWindowFunction()
Description copied from interface: LabValues
Gets the window function.

Specified by:
getWindowFunction in interface LabValues
Returns:
the window function

setWindowFunction

public void setWindowFunction(EspWindowFunction windowFunction)
Description copied from interface: LabValues
Sets the window function.

Specified by:
setWindowFunction in interface LabValues
Parameters:
windowFunction - the new window function

brought to you by Mr. Stampy