Package fftManager
Class FFTDataBlock
java.lang.Object
- Direct Known Subclasses:
BeamFormerDataBlock
,CepstrumDataBlock
,LtsaDataBlock
-
Field Summary
Fields inherited from class PamguardMVC.PamDataBlock
ITERATOR_END, MATCH_AFTER, MATCH_BEFORE, MATCH_EXACT, MIX_DONOTHING, MIX_INTODATABASE, MIX_OUTOFDATABASE, NOTIFY_NEW_DATA, NOTIFY_UPDATE_DATA, 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 Summary
ConstructorDescriptionFFTDataBlock
(String dataName, PamProcess parentProcess, int channelMap, int fftHop, int fftLength) -
Method Summary
Modifier and TypeMethodDescriptionvoid
clearAll()
Clears all PamDataUnits from memoryvoid
int
Complex[]
getComplexArray
(int arrayLength) getDataBlockXML
(Document doc) Get a brief summary of datablock to include in XML descriptions.double
getDataGain
(int iChan) Return the gain applied to any data created into this datablock.int
getDataWidth
(int sequenceNumber) Get the length of contained data.int
int
int
Get the advance between slices in samples.Get a slightly longer data name that also contains the module namedouble
Get the maximum value which can occur in the data.double
Get the minimum value which can occur in the data.Get the scale units to display on axis, etc.boolean
void
recycleComplexArray
(Complex[] complexArray) void
setFftHop
(int fftHop) void
setFftLength
(int fftLength) void
setRecycle
(boolean recycle) void
setWindowGain
(double windowGain) Methods inherited from class PamguardMVC.AcousticDataBlock
getChannelListManager, getParentSourceData, notifyModelChanged
Methods inherited from class PamguardMVC.PamDataBlock
addDataAnnotationType, addLocalisationContents, addObserver, addObserver, addOfflineDataMap, addOldPamData, addPamData, addPamData, autoEffortProvider, autoSetDataBlockMixMode, cancelDataOrder, cancelDataOrder, checkOfflineDataUIDs, clearChannelIterators, clearDeletedList, clearOnViewerLoad, copyDataList, createProcessAnnotations, createProcessAnnotations, dispose, dumpBufferStatus, findAnnotation, findAnnotation, findByDatabaseIndex, findDataUnit, findDataUnit, findFirstUnitAfter, findLastUnitBefore, findUnitByUIDandUTC, findUnitsinInterval, getAnnotationHandler, getARealChannel, getBackgroundManager, getBespokeDataMapGraphic, getBinaryDataSource, getCanLog, getChannelIterator, getChannelIteratorCount, getChannelsForSequenceMap, getClosestUnitMillis, getClosestUnitMillis, getClosestUnitMillisUsingSeq, getCrossReferenceInformation, getCumulativeGain, getCurrentViewDataEnd, getCurrentViewDataStart, getDataAutomationInfo, getDatablockSpeciesManager, getDataCopy, getDataCopy, getDataCopy, getDataCopy, getDataCopyFromEnd, getDataCopyFromStart, getDatagrammedMap, getDatagramProvider, getDataName, getDataSelectCreator, getDataSelector, getDataSelector, getDataSelector, getDataUnit, getDataUnitMenuItems, getDataUnitPopupMenu, getDurationRange, getEffortProvider, getFirstRawSourceDataBlock, getFirstUnit, getFirstUnit, getFirstUnitAfter, getFirstViewerUID, getFrequencyRange, getHydrophoneMap, getJSONDataSource, getLastUnit, getLastUnit, getLastUnitMillis, getLastViewerUID, getListIterator, getListIterator, getListIteratorFromEnd, getListIteratorFromStart, getLocalisationAlgorithm, getLocalisationContents, getLogging, getLoggingName, getMixedDirection, getMyDataUnits, getNanoTimeCalculator, getNaturalLifetime, getNaturalLifetimeMillis, getNextDataStart, getNextUnit, getNextUnit, getNumOfflineDataMaps, getNumRequiredBeforeLoadTime, getOfflineData, getOfflineDataMap, getOfflineDataMap, getPamSymbolManager, getParentProcess, getPreceedingUnit, getPreceedingUnit, getPreceedingUnit, getPreceedingUnit, getPreceedingUnitFromSeq, getPreceedingUnitFromSeq, getPrevDataEnd, getPrimaryDataMap, getProcessAnnotations, getQuickId, getQuickId2, getRawSourceDataBlock, getRawSourceDataBlock2, getRecordingTrigger, getRecycledUnit, getRecyclingStoreLength, getRemovedItems, getReverseChannelIterator, getSampleRate, getSaveRequirements, getSequenceCount, getSequenceIterator, getSequenceMap, getSequenceMapObject, getShouldBinary, getShouldLog, getShouldLog, getSourceDataBlock, getSourceProcess, getSuperDetectionClass, getSynchLock, getTethysDataProvider, getTOADCalculator, getUidHandler, getUIDRepairLogging, getUniqueParentList, getUnitClass, getUnitIndex, getUnitsCount, getUnitsCountFromTime, hasDataRange, isCanClipGenerate, isClearAtStart, isLinkGpsData, isOffline, isRecycling, loadViewerData, loadViewerData, masterClockUpdate, needViewerDataLoad, noteNewSettings, orderOfflineData, orderOfflineData, orderOfflineData, pamStart, pamStop, remove, remove, remove, removeOfflineDataMap, reset, saveViewerData, setAnnotationHandler, setBackgroundManager, setBinaryDataSource, setCanClipGenerate, setChannelMap, setClearAtStart, setDatagramProvider, setDataName, setDataSelectCreator, setJSONDataSource, setLinkGpsData, setLocalisationContents, SetLogging, setMixedDirection, setNanoTimeCalculator, setNaturalLifetime, setNaturalLifetimeMillis, setPamSymbolManager, setParentProcess, setRecordingTrigger, setRecycling, setRecyclingStoreLength, setSampleRate, setSequenceMap, setShouldBinary, setShouldLog, setSynchLock, setUidHandler, shouldNotify, sortData, sortOutputMaps, stopTimer, toString, updatePamData
Methods inherited from class PamguardMVC.PamObservable
addInstantObserver, canDraw, canDraw, clearchanged, countObservers, createKeyItem, deleteObserver, deleteObservers, drawDataUnit, findThreadedObserver, getCPUPercent, getCPUPercent, getHoverText, getLongestObserver, getMaxThreadJitter, getOverlayDraw, getPamObserver, getRequiredHistory, isInstantObserver, notifyInstantObservers, notifyNornalObservers, notifyObservers, notifyObservers, setChanged, setOverlayDraw, updateObservers, waitForThreadedObservers
-
Constructor Details
-
FFTDataBlock
public FFTDataBlock(String dataName, PamProcess parentProcess, int channelMap, int fftHop, int fftLength)
-
-
Method Details
-
getLongDataName
Description copied from class:PamDataBlock
Get a slightly longer data name that also contains the module name- Overrides:
getLongDataName
in classPamDataBlock<FFTDataUnit>
- Returns:
- longer data name including module name.
-
getOldLongDataName
-
getFftLength
public int getFftLength() -
setFftLength
public void setFftLength(int fftLength) -
getFftHop
public int getFftHop() -
setFftHop
public void setFftHop(int fftHop) -
dumpBlockContents
public void dumpBlockContents()- Overrides:
dumpBlockContents
in classPamDataBlock<FFTDataUnit>
-
clearAll
public void clearAll()Description copied from class:PamDataBlock
Clears all PamDataUnits from memoryIn viewer mode, data are also re-saved.
- Overrides:
clearAll
in classPamDataBlock<FFTDataUnit>
-
recycleComplexArray
-
getComplexArray
-
getDataGain
public double getDataGain(int iChan) Description copied from class:PamDataBlock
Return the gain applied to any data created into this datablock.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()));
- Overrides:
getDataGain
in classPamDataBlock<FFTDataUnit>
- Parameters:
iChan
- channel number- Returns:
- gain as a factor (to allow for negative gains)
-
setWindowGain
public void setWindowGain(double windowGain) - Parameters:
windowGain
- the windowGain to set
-
setRecycle
public void setRecycle(boolean recycle) -
isRecycle
public boolean isRecycle() -
getHopSamples
public int getHopSamples()Description copied from class:DataBlock2D
Get the advance between slices in samples. For FFT data this is the same thing as the FFT Hop- Specified by:
getHopSamples
in classDataBlock2D<FFTDataUnit>
- Returns:
- advance in samples between slices.
-
getDataWidth
public int getDataWidth(int sequenceNumber) Description copied from class:DataBlock2D
Get the length of contained data. For FFT data this will be FFTLength()/2.- Specified by:
getDataWidth
in classDataBlock2D<FFTDataUnit>
- Returns:
- length of data in each slice.
-
getMinDataValue
public double getMinDataValue()Description copied from class:DataBlock2D
Get the minimum value which can occur in the data. e.g. 0 for FFT data.- Specified by:
getMinDataValue
in classDataBlock2D<FFTDataUnit>
- Returns:
- the data's minimum value
-
getMaxDataValue
public double getMaxDataValue()Description copied from class:DataBlock2D
Get the maximum value which can occur in the data. e.g. sampleRate/2 for FFT data.- Specified by:
getMaxDataValue
in classDataBlock2D<FFTDataUnit>
- Returns:
- the data's maximum value
-
getChannelMap
public int getChannelMap()- Overrides:
getChannelMap
in classPamDataBlock<FFTDataUnit>
- Returns:
- Software channel map for the data block.
-
getScaleInfo
Description copied from class:DataBlock2D
Get the scale units to display on axis, etc.- Specified by:
getScaleInfo
in classDataBlock2D<FFTDataUnit>
- Returns:
- data type information.
-
getDataBlockXML
Description copied from class:PamDataBlock
Get a brief summary of datablock to include in XML descriptions. Basic output is very simple. Expect other datablock to extend this by adding additional attributes.- Overrides:
getDataBlockXML
in classDataBlock2D<FFTDataUnit>
- Returns:
- XML element with description of data.
-