Sautrela

edu.gtts.sautrela.sp
Class PowerSpectrum

java.lang.Object
  extended by edu.gtts.sautrela.engine.AbstractDataProcessor
      extended by edu.gtts.sautrela.sp.PowerSpectrum
All Implemented Interfaces:
DataProcessor, java.beans.BeanInfo, java.io.Serializable

public class PowerSpectrum
extends AbstractDataProcessor

Calculates the PowerSpectrum of each input DoubleData stream.

See Also:
Serialized Form

Field Summary
static int DEFAULT_SIZE
          default size of FFT == 512
 
Fields inherited from interface java.beans.BeanInfo
ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32
 
Constructor Summary
PowerSpectrum()
          Creates a new PowerSpectrum DataProcessor
 
Method Summary
 void editBeanInfo(java.beans.BeanInfo info)
           
 int getSize()
          Gets the size of the FFT
static void main(java.lang.String[] args)
           
 void process(Buffer in, Buffer out)
          Processes the input Data.
 void setSize(int size)
          Sets the size of the FFT.
 
Methods inherited from class edu.gtts.sautrela.engine.AbstractDataProcessor
getAdditionalBeanInfo, getBeanDescriptor, getDefaultEventIndex, getDefaultPropertyIndex, getEventSetDescriptors, getIcon, getMethodDescriptors, getName, getPropertyDescriptors, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_SIZE

public static final int DEFAULT_SIZE
default size of FFT == 512

See Also:
Constant Field Values
Constructor Detail

PowerSpectrum

public PowerSpectrum()
Creates a new PowerSpectrum DataProcessor

Method Detail

getSize

public int getSize()
Gets the size of the FFT

Returns:
The size of the FFT

setSize

public void setSize(int size)
             throws java.lang.UnsupportedOperationException
Sets the size of the FFT. It must be a power of 2. If input data size is smaller, then the data is filled with zeros.

Parameters:
size - The size of the FFT
Throws:
java.lang.UnsupportedOperationException

process

public void process(Buffer in,
                    Buffer out)
             throws DataProcessorException
Processes the input Data. The output data size is half the FFT size.

Parameters:
in - Input Buffer
out - Output Buffer
Throws:
DataProcessorException

editBeanInfo

public void editBeanInfo(java.beans.BeanInfo info)
Overrides:
editBeanInfo in class AbstractDataProcessor

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception

Sautrela