Package export.MLExport
Class MLDataUnitExport<T extends PamDataUnit<?,?>>
java.lang.Object
export.MLExport.MLDataUnitExport<T>
- Direct Known Subclasses:
MLCPODExport,MLNoiseExport,MLRawExport,MLSuperDetExport,MLWhistleMoanExport
Export a detection to MATLAB
- Author:
- Jamie Macaulay
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract us.hebi.matlab.mat.types.StructaddDetectionSpecificFields(us.hebi.matlab.mat.types.Struct mlStruct, int index, T dataUnit) Add detection specific fields to a structure.static us.hebi.matlab.mat.types.Matrixarray2Matrix(long[] samplesChunk) Get a Matrix object from a long[] array.protected abstract us.hebi.matlab.mat.types.StructdetectionHeader(PamDataBlock pamDataBlock) Get the detection header for the specific detection type.us.hebi.matlab.mat.types.StructdetectionToStruct(us.hebi.matlab.mat.types.Struct mlStruct, T dataUnit, int index) Create a MATLAB structure which contains all information for a data unit.abstract StringgetName()Get the name of the structureabstract Class<?> Get the unit classstatic double[]realWordlVec2Angles(PamDataUnit dataUnit) Get the bearings from the data unit.
-
Constructor Details
-
MLDataUnitExport
public MLDataUnitExport()
-
-
Method Details
-
detectionToStruct
public us.hebi.matlab.mat.types.Struct detectionToStruct(us.hebi.matlab.mat.types.Struct mlStruct, T dataUnit, int index) Create a MATLAB structure which contains all information for a data unit.- Parameters:
dataUnit- - the data unit to convert to a MATLAB structure- Returns:
- detection data MATLAB structure ready to be exported to a .mat file or added to a ArrayList
.
-
array2Matrix
public static us.hebi.matlab.mat.types.Matrix array2Matrix(long[] samplesChunk) Get a Matrix object from a long[] array.- Parameters:
specData- - the long array to convert.- Returns:
- the matrix object.
-
addDetectionSpecificFields
public abstract us.hebi.matlab.mat.types.Struct addDetectionSpecificFields(us.hebi.matlab.mat.types.Struct mlStruct, int index, T dataUnit) Add detection specific fields to a structure.- Parameters:
structure- containing all generic info from PamDataUnitthe- data unit.
-
getUnitClass
Get the unit class- Returns:
-
getName
Get the name of the structure- Returns:
-
realWordlVec2Angles
Get the bearings from the data unit. Note these are the angles that are rotated to real workd vectors.- Parameters:
dataUnit- - data unit.- Returns:
- the angles in RADIANS.
-
detectionHeader
Get the detection header for the specific detection type.- Parameters:
pamDataBlock-- Returns:
- the detection header structure.
-