public class FFTDataBlock extends AcousticDataBlock<FFTDataUnit>
ITERATOR_END, MATCH_AFTER, MATCH_BEFORE, MATCH_EXACT, MIX_DONOTHING, MIX_INTODATABASE, MIX_OUTOFDATABASE, NOTIFY_NEW_DATA, NOTIFY_UPDATE_DATA, OFFLINE_DATA_CANCEL, OFFLINE_DATA_INTERRUPT, OFFLINE_DATA_WAIT, orderLock, POSITION_AFTER, POSITION_BEFORE, REFERENCE_ABSOLUTE, REFERENCE_CURRENT, REQUEST_DATA_LOADED, REQUEST_DATA_PARTIAL_LOAD, REQUEST_EXCEPTION, REQUEST_INTERRUPTED, REQUEST_NO_DATA, REQUEST_SAME_REQUEST
Constructor and Description |
---|
FFTDataBlock(java.lang.String dataName,
PamProcess parentProcess,
int channelMap,
int fftHop,
int fftLength) |
Modifier and Type | Method and Description |
---|---|
void |
clearAll()
Clears all PamDataUnits from memory
|
void |
dumpBlockContents() |
Complex[] |
getComplexArray(int arrayLength) |
double |
getDataGain(int iChan)
Return the gain applied to any data created into this
datablock.
|
int |
getFftHop() |
int |
getFftLength() |
double |
getWindowGain() |
boolean |
isRecycle() |
void |
recycleComplexArray(Complex[] complexArray) |
void |
setFftHop(int fftHop) |
void |
setFftLength(int fftLength) |
void |
setRecycle(boolean recycle) |
void |
setWindowGain(double windowGain) |
getChannelListManager, getParentSourceData, notifyModelChanged
addDataAnnotationType, addLocalisationContents, addObserver, addObserver, addOfflineDataMap, addPamData, autoSetDataBlockMixMode, cancelDataOrder, clearChannelIterators, clearDeletedList, createProcessAnnotations, createProcessAnnotations, findAnnotation, findAnnotation, findByDatabaseIndex, findDataUnit, findDataUnit, findUnitsinInterval, getBinaryDataSource, getCanLog, getChannelIterator, getChannelIteratorCount, getChannelMap, getClosestUnitMillis, getClosestUnitMillis, getCurrentViewDataEnd, getCurrentViewDataStart, getDataAnnotationType, getDatagrammedMap, getDatagramProvider, getDataName, getDataSelectCreator, getDataSelector, getDataUnit, getFirstUnit, getFirstUnit, getFirstUnitAfter, getLastUnit, getLastUnit, getListIterator, getListIterator, getListIteratorFromEnd, getListIteratorFromStart, getLocalisationContents, getLogging, getLoggingName, getLongDataName, getMixedDirection, getNaturalLifetime, getNaturalLifetimeMillis, getNextDataStart, getNextUnit, getNextUnit, getNumDataAnnotationTypes, getNumOfflineDataMaps, getNumRequiredBeforeLoadTime, getOfflineData, getOfflineDataMap, getOfflineDataMap, getOrderStatus, getParentProcess, getPreceedingUnit, getPreceedingUnit, getPreceedingUnit, getPreceedingUnit, getPrevDataEnd, getPrimaryDataMap, getProcessAnnotations, getQuickId, getRawSourceDataBlock, getRawSourceDataBlock2, getRecycledUnit, getRecyclingStoreLength, getRemovedItems, getReverseChannelIterator, getSampleRate, getSaveRequirements, getShouldBinary, getShouldLog, getSourceDataBlock, getSourceProcess, getUnitClass, getUnitIndex, getUnitsCount, getUnitsCountFromTime, isCanClipGenerate, isClearAtStart, isLinkGpsData, isRecycling, loadViewerData, masterClockUpdate, noteNewSettings, orderOfflineData, orderOfflineData, remove, remove, removeOfflineDataMap, reset, saveViewerData, setBinaryDataSource, setCanClipGenerate, setChannelMap, setClearAtStart, setDatagramProvider, setDataName, setLinkGpsData, setLocalisationContents, SetLogging, setMixedDirection, setNaturalLifetime, setNaturalLifetimeMillis, setRecordingTrigger, setRecycling, setRecyclingStoreLength, setSampleRate, setShouldBinary, setShouldLog, shouldNotify, sortData, toString, updatePamData
canDraw, clearchanged, countObservers, createKeyItem, deleteObserver, deleteObservers, drawDataUnit, findThreadedObserver, getCPUPercent, getCPUPercent, getHoverText, getLongestObserver, getPamObservers, getRequiredHistory, hasOptionsDialog, notifyObservers, notifyObservers, setChanged, setOverlayDraw, showOptions, waitForThreadedObservers
public FFTDataBlock(java.lang.String dataName, PamProcess parentProcess, int channelMap, int fftHop, int fftLength)
public int getFftLength()
public void setFftLength(int fftLength)
public int getFftHop()
public void setFftHop(int fftHop)
public void dumpBlockContents()
dumpBlockContents
in class PamDataBlock<FFTDataUnit>
public void clearAll()
PamDataBlock
In viewer mode, data are also re-saved.
clearAll
in class PamDataBlock<FFTDataUnit>
public void recycleComplexArray(Complex[] complexArray)
public Complex[] getComplexArray(int arrayLength)
public double getDataGain(int iChan)
PamDataBlock
Example 1: The amplifier module will just return it's gain
Example 2: The FFT module will return the loss due to windowing the data.
To convert to dB use 20*log10(Math.abs(getDataGain()));
getDataGain
in class PamDataBlock<FFTDataUnit>
iChan
- channel numberpublic double getWindowGain()
public void setWindowGain(double windowGain)
windowGain
- the windowGain to setpublic void setRecycle(boolean recycle)
public boolean isRecycle()