public class DifarDataUnit extends ClipDataUnit
fileName, triggerMilliseconds, triggerName
AMPLITUDE_SCALE_DBREMPA, AMPLITUDE_SCALE_LINREFSD
Constructor and Description |
---|
DifarDataUnit(long clipStartMillis,
long triggerMilliseconds,
long startSample,
int durationSamples,
int channelMap,
java.lang.String fileName,
java.lang.String triggerName,
double[][] rawData,
long signalStartMillis,
PamDetection parentDetection,
double[] frequencyRange,
float sourceSampleRate,
float displaySampleRate)
Constructor to use if storing data into the binary system.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Double |
calculateDifarGain()
Now also work out the DIFAR gain for that angle.
|
java.lang.Double |
calculateDifarGain(java.lang.Double selectedAngle,
java.lang.Double selectedFrequency)
Calculate teh DIFAR gain for a given angle and frequency
|
boolean |
canAutoProcess()
Autoprocess everything except "Default" clips
|
boolean |
canAutoSave()
//this is a bit pointless now as action performed doesn't attempt save if timer is stopped
whether the difar unit has been interacted with causing autosave to be inapropriate
|
void |
cancelAutoSave()
//this is a bit pointless now as action performed doesn't attempt save if timer is stopped
|
void |
cleanUpData()
Gets called just before unit is added to processed data.
|
static double[] |
decimateData(double[] ds,
float origSmp,
float displaySampRate) |
static boolean[] |
decimateLockArray(boolean[] lockInput,
float origSmp,
float displaySampRate) |
java.awt.image.BufferedImage |
getClipImage(int spectrogramImageChoice,
int iChannel,
int fftLen,
int fftHop,
double scaleMin,
double scaleMax,
java.awt.Color[] colours)
Get a clip image for a particular wave type - decimated original, Om, EW, NS
|
long |
getClipStartMillis() |
double[][] |
getDemuxedDecimatedData() |
DIFARCrossingInfo |
getDifarCrossing() |
java.lang.Double |
getDifarGain() |
float |
getDisplaySampleRate() |
double |
getDurationInSeconds()
Used by some displays
|
boolean[][] |
getLockDecimatedData() |
LookupItem |
getLutSpeciesItem() |
java.lang.Double |
getMaximumAngle() |
double[] |
getMaximumAngleSummary() |
java.lang.Double |
getMaximumFrequency() |
double[] |
getMultiplexedData() |
GpsData |
getOriginLatLong(boolean recalculate)
Get the latlong of the mean hydrophone position at the time of
this detection.
|
PamDetection |
getParentDetection() |
double |
getPreMarkSeconds() |
java.lang.Double |
getRange() |
java.lang.Double |
getSelectedAngle()
Get the angle selectedfrom the DIFARGram.
|
java.lang.Double |
getSelectedFrequency() |
long |
getSignalStart()
Signal start time in milliseconds relative to start of sound.
|
java.lang.String |
getSpeciesCode()
Get a species code - mostly used by the database.
|
java.lang.String |
getSpeciesName() |
java.lang.String |
getSummaryString()
Return an html formatted summary string
describing the detection which can be
used in tooltips anywhere in PAMGuard.
|
double[][] |
getSurfaceData() |
double[] |
getSurfaceSummary() |
DIFARCrossingInfo |
getTempCrossing() |
java.lang.String |
getTempGroup() |
java.lang.String |
getTrackedGroup() |
java.lang.Double |
getTrueAngle()
Get the true bearing relative to the DIFAR buoy.
|
boolean |
isVessel() |
void |
saveCrossing(boolean save)
Move the crossing info from it's temp position to
a saved position.
|
void |
saveGroup() |
void |
setDemuxedDecimatedData(double[][] demuxedDecimatedData) |
void |
setDifarCrossing(DIFARCrossingInfo difarCrossing) |
void |
setDifarGain(double difarGain) |
void |
setDisplaySampleRate(float displaySampleRate) |
void |
setLockDecimatedData(boolean[][] lockArrays)
Set the lock array iformation in the data unit.
|
void |
setLutSpeciesItem(LookupItem lutSpeciesItem) |
void |
setMaximumAngle(java.lang.Double maximumAngle) |
void |
setMaximumAngleSummary(double[] surfaceSummary) |
void |
setMaximumFrequency(java.lang.Double maximumFrequency) |
void |
setParentDetection(PamDetection parentDetection) |
void |
setPreMarkSeconds(double preMarkSeconds) |
void |
setSelectedAngle(java.lang.Double selectedAngle)
Set the selected angle from the DIFARGram.
|
void |
setSelectedFrequency(java.lang.Double selectedFrequency) |
void |
setSpeciesCode(LookupList speciesList,
java.lang.String speciesCode)
Called in viewer when data are read back from binary store to
sort out the species luukup item.
|
void |
setSpectrogramSensor(int spectrogramSensor)
Choice of data for spectrogram displays.
|
void |
setSurfaceData(double[][] surfaceData) |
void |
setSurfaceSummary(double[] surfaceSummary) |
void |
setTempCrossing(DIFARCrossingInfo tempCrossing) |
void |
setTempGroup(java.lang.String tempGroup) |
void |
setTrackedGroup(java.lang.String newGroup) |
void |
setVessel(boolean isVessel) |
java.lang.String |
toString() |
clearClipSpecData, generateComplexSpectrogram, getClipImage, getRawData, getSourceSampleRate, getSpectrogramData, getTriggerMilliseconds, setRawData
addSubDetection, addSuperDetection, findSubDetection, getDetectionType, getEventEndTime, getPeakTime, getSubDetection, getSubDetectionsCount, getSubDetectionSyncronisation, getSuperDetection, getSuperDetection, getSuperDetectionsCount, getSuperDetectionSyncronisation, removeSubDetection, removeSuperDetection, replaceSubDetection, setDetectionType, setEventEndTime, setPeakTime, setUniqueSuperDetection
amplifyMeasuredAmplitudeByDB, amplifyMeasuredAmplitudeByLinear, compareTo, getAmplitudeDB, getCalculatedAmlitudeDB, getDuration, getFrequency, getFrequencyOverlap, getLastSample, getMeasuredAmplitude, getMeasuredAmplitudeType, getSeconds, getStartSample, getTimeOverlap, setCalculatedAmlitudeDB, setDuration, setFrequency, setInfo, setMeasuredAmplitude, setMeasuredAmplitude, setMeasuredAmplitudeType, setStartSample
addDataAnnotation, clearOandAngles, clearUpdateCount, findDataAnnotation, getAbsBlockIndex, getChannelBitmap, getDataAnnotation, getDatabaseIndex, getDatabaseUpdateOf, getDataUnitFileInformation, getDetectionMatch, getDetectionMatch, getHydrophoneHeading, getLastUpdateTime, getLocalisation, getNumDataAnnotations, getPairAngle, getParentDataBlock, getTimeMilliseconds, getUpdateCount, removeDataAnnotation, removeDataAnnotation, setAbsBlockIndex, setChannelBitmap, setDatabaseIndex, setDatabaseUpdateOf, setDataUnitFileInformation, setLastUpdateTime, setLocalisation, setOriginLatLong, setParentDataBlock, setTimeMilliseconds, updateDataUnit
public DifarDataUnit(long clipStartMillis, long triggerMilliseconds, long startSample, int durationSamples, int channelMap, java.lang.String fileName, java.lang.String triggerName, double[][] rawData, long signalStartMillis, PamDetection parentDetection, double[] frequencyRange, float sourceSampleRate, float displaySampleRate)
timeMilliseconds
- triggerMilliseconds
- startSample
- durationSamples
- channelMap
- fileName
- triggerName
- rawData
- upperFreq
- public static double[] decimateData(double[] ds, float origSmp, float displaySampRate)
public PamDetection getParentDetection()
public void setParentDetection(PamDetection parentDetection)
public double[] getMultiplexedData()
public long getSignalStart()
public double[][] getSurfaceData()
public void setSurfaceData(double[][] surfaceData)
public boolean isVessel()
public void setVessel(boolean isVessel)
isVessel
- the isVessel to setpublic LookupItem getLutSpeciesItem()
public void setLutSpeciesItem(LookupItem lutSpeciesItem)
lutSpeciesItem
- the lutSpeciesItem to setpublic float getDisplaySampleRate()
getDisplaySampleRate
in class ClipDataUnit
public void setDisplaySampleRate(float displaySampleRate)
displaySampleRate
- the displaySampleRate to setpublic java.lang.Double getSelectedAngle()
public java.lang.Double getRange()
public java.lang.Double getTrueAngle()
public java.lang.String getTrackedGroup()
public void setTrackedGroup(java.lang.String newGroup)
public void setSelectedAngle(java.lang.Double selectedAngle)
selectedAngle
- the selectedAngle to setpublic java.lang.Double calculateDifarGain()
public java.lang.Double calculateDifarGain(java.lang.Double selectedAngle, java.lang.Double selectedFrequency)
selectedAngle
- angle 0 - 360selectedFrequency
- Frequency Hzpublic java.lang.Double getSelectedFrequency()
public void setSelectedFrequency(java.lang.Double selectedFrequency)
selectedFrequency
- the selectedFrequency to setpublic double[] getSurfaceSummary()
public void setSurfaceSummary(double[] surfaceSummary)
surfaceSummary
- the surfaceSummary to setpublic double[] getMaximumAngleSummary()
public void setMaximumAngleSummary(double[] surfaceSummary)
surfaceSummary
- the surfaceSummary to setpublic java.lang.Double getMaximumAngle()
public void setMaximumAngle(java.lang.Double maximumAngle)
maximumAngle
- the maximumAngle to setpublic java.lang.Double getMaximumFrequency()
public void setMaximumFrequency(java.lang.Double maximumFrequency)
maximumFrequency
- the maximumFrequency to setpublic void setSpectrogramSensor(int spectrogramSensor)
spectrogramSensor
- the spectrogramSensor to setpublic double[][] getDemuxedDecimatedData()
public void setDemuxedDecimatedData(double[][] demuxedDecimatedData)
demuxedDecimatedData
- the demuxedDecimatedData to setpublic java.awt.image.BufferedImage getClipImage(int spectrogramImageChoice, int iChannel, int fftLen, int fftHop, double scaleMin, double scaleMax, java.awt.Color[] colours)
spectrogramImageChoice
- iChannel
- fftLen
- fftHop
- scaleMin
- scaleMax
- colours
- public java.lang.String getSpeciesName()
public java.lang.String getSpeciesCode()
public void setSpeciesCode(LookupList speciesList, java.lang.String speciesCode)
speciesList
- list of programmed species codesspeciesCode
- data units code or "Vessel"public static boolean[] decimateLockArray(boolean[] lockInput, float origSmp, float displaySampRate)
lock_15
- sampleRate
- displaySampleRate2
- public java.lang.Double getDifarGain()
public void setDifarGain(double difarGain)
difarGain
- the difarGain to setpublic void setLockDecimatedData(boolean[][] lockArrays)
lockArrays
- TODO: Move all lock related code into the Greeneridge demuxpublic boolean[][] getLockDecimatedData()
public void cleanUpData()
public double getDurationInSeconds()
public java.lang.String getSummaryString()
PamDataUnit
getSummaryString
in class AcousticDataUnit
public double getPreMarkSeconds()
public void setPreMarkSeconds(double preMarkSeconds)
the
- Number of seconds added to the sound prior to the specrogram mark or detectionpublic long getClipStartMillis()
public boolean canAutoProcess()
public void cancelAutoSave()
sets
- canAutoSave falsepublic boolean canAutoSave()
public java.lang.String toString()
toString
in class java.lang.Object
public void saveCrossing(boolean save)
save
- - save it, or discard it (also from other units associated with
this crossingpublic DIFARCrossingInfo getDifarCrossing()
public void setDifarCrossing(DIFARCrossingInfo difarCrossing)
difarCrossing
- the difarCrossing to setpublic DIFARCrossingInfo getTempCrossing()
public void setTempCrossing(DIFARCrossingInfo tempCrossing)
tempCrossing
- the tempCrossing to setpublic java.lang.String getTempGroup()
public void setTempGroup(java.lang.String tempGroup)
tempCrossing
- the tempCrossing to setpublic GpsData getOriginLatLong(boolean recalculate)
PamDataUnit
getOriginLatLong
in class PamDataUnit
public void saveGroup()