amplifier
Class AmplifiedDataBlock

java.lang.Object
  extended by PamguardMVC.PamObservable
      extended by PamguardMVC.PamDataBlock<Tunit>
          extended by PamguardMVC.AcousticDataBlock<RawDataUnit>
              extended by PamguardMVC.PamRawDataBlock
                  extended by amplifier.AmplifiedDataBlock
All Implemented Interfaces:
PanelOverlayDraw

public class AmplifiedDataBlock
extends PamRawDataBlock


Field Summary
private  double[] gain
           
 
Fields inherited from class PamguardMVC.PamDataBlock
dataName, ITERATOR_END, MATCH_AFTER, MATCH_BEFORE, MATCH_EXACT, MIX_DONOTHING, MIX_INTODATABASE, MIX_OUTOFDATABASE, naturalLifetime, NOTIFY_NEW_DATA, NOTIFY_UPDATE_DATA, OFFLINE_DATA_CANCEL, OFFLINE_DATA_INTERRUPT, OFFLINE_DATA_WAIT, orderLock, pamDataUnits, parentProcess, 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, unitsAdded, unitsRemoved, unitsUpdated
 
Fields inherited from class PamguardMVC.PamObservable
masterClockSample, objectChanged, overlayDraw, pamObservers, pamProfiler
 
Constructor Summary
AmplifiedDataBlock(java.lang.String name, PamProcess parentProcess, int channelMap, float sampleRate)
           
AmplifiedDataBlock(java.lang.String name, PamProcess parentProcess, int channelMap, float sampleRate, boolean autoDisplay)
           
 
Method Summary
 double getDataGain(int chan)
          Return the gain applied to any data created into this datablock.
 void setDataGain(double[] gain)
           
 
Methods inherited from class PamguardMVC.PamRawDataBlock
getChannelListManager, getSamples, getSamples, removeOldUnitsT
 
Methods inherited from class PamguardMVC.AcousticDataBlock
findParentSource, getParentSourceData, notifyModelChanged, prepareAmplitudeCalculations, prepareChannelLists
 
Methods inherited from class PamguardMVC.PamDataBlock
addLocalisationContents, addObserver, addObserver, addOfflineDataMap, addPamData, autoSetDataBlockMixMode, clearAll, clearDeletedList, createAnnotations, createAnnotations, dumpBlockContents, findAnnotation, findAnnotation, findByDatabaseIndex, findDataUnit, findDataUnit, getAbsoluteDataUnit, getAnnotations, getBinaryDataSource, getCanLog, getChannelMap, getClosestUnitMillis, getCurrentViewDataEnd, getCurrentViewDataStart, getDataName, getDataUnit, getFirstUnit, getFirstUnitAfter, getLastUnit, getListIterator, getListIterator, getListIteratorFromEnd, getListIteratorFromStart, getLocalisationContents, getLogging, getLoggingName, getLongDataName, getMixedDirection, getNaturalLifetime, getNaturalLifetimeMillis, getNextDataStart, getNumOfflineDataMaps, getOfflineData, getOfflineData, getOfflineDataMap, getOfflineDataMap, getOrderStatus, getParentProcess, getPreceedingUnit, getPreceedingUnit, getPreceedingUnit, getPreceedingUnit, getPrevDataEnd, getPrimaryDataMap, getRawSourceDataBlock, getRecycledUnit, getRecyclingStoreLength, getRemovedItems, getSampleRate, getSaveRequirements, getShouldLog, getSourceDataBlock, getSourceProcess, getUnitClass, getUnitIndex, getUnitsCount, getUnitsCountFromTime, isLinkGpsData, isRecycling, loadViewerData, masterClockUpdate, noteNewSettings, orderOfflineData, orderOfflineData, remove, remove, removeOldUnitsS, saveViewerData, setBinaryDataSource, setChannelMap, setDataName, setLinkGpsData, setLocalisationContents, SetLogging, setMixedDirection, setNaturalLifetime, setNaturalLifetimeMillis, setRecycling, setRecyclingStoreLength, setSampleRate, setShouldLog, shouldNotify, toString, updatePamData
 
Methods inherited from class PamguardMVC.PamObservable
canDraw, clearchanged, countObservers, createKeyItem, deleteObserver, deleteObservers, drawDataUnit, findThreadedObserver, getCPUPercent, getCPUPercent, getHoverText, getLongestObserver, getPamObservers, getRequiredHistory, notifyObservers, notifyObservers, setChanged, setOverlayDraw, waitForThreadedObservers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

gain

private double[] gain
Constructor Detail

AmplifiedDataBlock

public AmplifiedDataBlock(java.lang.String name,
                          PamProcess parentProcess,
                          int channelMap,
                          float sampleRate)

AmplifiedDataBlock

public AmplifiedDataBlock(java.lang.String name,
                          PamProcess parentProcess,
                          int channelMap,
                          float sampleRate,
                          boolean autoDisplay)
Method Detail

setDataGain

public void setDataGain(double[] gain)

getDataGain

public double getDataGain(int chan)
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 class PamDataBlock<RawDataUnit>
Parameters:
chan - channel number
Returns:
gain as a factor (to allow for negative gains)