Package PamDetection
Class RawDataUnit
- All Implemented Interfaces:
Comparable<PamDataUnit>
,AcousticDataUnit
- Direct Known Subclasses:
TriggerWaveDataUnit
public class RawDataUnit
extends PamDataUnit<PamDataUnit,SuperDetection>
implements AcousticDataUnit
Holds raw data from a sound file.
- Author:
- Doug Gillespie.
-
Constructor Summary
ConstructorDescriptionRawDataUnit
(long timeMilliseconds, int channelBitmap, long startSample, long duration) -
Method Summary
Modifier and TypeMethodDescriptionlong
Get the file samples.double[]
void
setFileSamples
(long fileSamples) Set the file samples.void
setRawData
(double[] rawData) void
setRawData
(double[] rawData, boolean setAmplitude) Methods inherited from class PamguardMVC.PamDataUnit
addDataAnnotation, addSuperDetection, amplifyMeasuredAmplitudeByDB, amplifyMeasuredAmplitudeByLinear, calcSnapshotGeometry, clearOandAngles, clearUpdateCount, compareTo, findDataAnnotation, findDataAnnotation, freeData, getAbsBlockIndex, getAmplitudeDB, getAnnotationsSummaryString, getBasicData, getCalculatedAmlitudeDB, getChannelBitmap, getColourIndex, getDataAnnotation, getDatabaseIndex, getDatabaseUpdateOf, getDataUnitFileInformation, getDataUnitPopupMenu, getDurationInMilliseconds, getEndTimeInMilliseconds, getFrequency, getFrequencyOverlap, getHydrophoneBitmap, getHydrophoneHeading, getLastChangeTime, getLastSample, getLastUpdateTime, getLocalisation, getMeasuredAmplitude, getMeasuredAmplitudeType, getNoiseBackground, getNumDataAnnotations, getOriginLatLong, getParentDataBlock, getSampleDuration, getSampleDurationAsInt, getSeconds, getSequenceBitmap, getSequenceBitmapObject, getSignalExcess, getSignalSPL, getSnapshotGeometry, getStartSample, getSummaryString, getSuperDetection, getSuperDetection, getSuperDetection, getSuperDetection, getSuperDetection, getSuperDetectionsCount, getSuperDetectionSyncronisation, getSuperId, getTimeDelaysSeconds, getTimeMilliseconds, getTimeNanoseconds, getTimeOverlap, getUID, getUpdateCount, isEmbryonic, isForceAmpRecalc, linAmplitudeToDB, removeDataAnnotation, removeDataAnnotation, removeSuperDetection, setAbsBlockIndex, setCalculatedAmlitudeDB, setChannelBitmap, setDatabaseIndex, setDatabaseUpdateOf, setDataUnitFileInformation, setDurationInMilliseconds, setEmbryonic, setForceAmpRecalc, setFrequency, setInfo, setLastUpdateTime, setLocalisation, setMeasuredAmpAndType, setMeasuredAmplitude, setMeasuredAmplitudeType, setNoiseBackground, setParentDataBlock, setSampleDuration, setSequenceBitmap, setSignalExcess, setSignalSPL, setSnapshotGeometry, setStartSample, setTimeDelaysSeconds, setTimeMilliseconds, setUID, setUniqueSuperDetection, sortOutputMaps, updateDataUnit
-
Constructor Details
-
RawDataUnit
public RawDataUnit(long timeMilliseconds, int channelBitmap, long startSample, long duration)
-
-
Method Details
-
getRawData
public double[] getRawData()- Returns:
- Returns the rawData.
-
setRawData
public void setRawData(double[] rawData) - Parameters:
rawData
- The rawData to set.
-
setRawData
public void setRawData(double[] rawData, boolean setAmplitude) - Parameters:
rawData
- The rawData to set.
-
setFileSamples
public void setFileSamples(long fileSamples) Set the file samples. The file samples are the total number of samples into an audio file the raw data unit starts at. It is not necessarily the same as start sample depending on how the file has been loaded.- Parameters:
fileSamples
- - the numeber of samples (not bytes) into the audio file.
-
getFileSamples
public long getFileSamples()Get the file samples. The file samples are the total number of samples into an audio file the raw data unit starts at. It is not necessarily the same as start sample depending on how the file has been loaded.
-