Class MLDataUnitExport<T extends PamDataUnit<?,?>>

java.lang.Object
export.MLExport.MLDataUnitExport<T>
Direct Known Subclasses:
MLCPODExport, MLNoiseExport, MLRawExport, MLSuperDetExport, MLWhistleMoanExport

public abstract class MLDataUnitExport<T extends PamDataUnit<?,?>> extends Object
Export a detection to MATLAB
Author:
Jamie Macaulay
  • Constructor Summary Link icon

    Constructors
    Constructor
    Description
     
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    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.
    static us.hebi.matlab.mat.types.Matrix
    array2Matrix(long[] samplesChunk)
    Get a Matrix object from a long[] array.
    protected abstract us.hebi.matlab.mat.types.Struct
    Get the detection header for the specific detection type.
    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.
    abstract String
    Get the name of the structure
    abstract Class<?>
    Get the unit class
    static double[]
    Get the bearings from the data unit.

    Methods inherited from class java.lang.Object Link icon

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details Link icon

    • MLDataUnitExport Link icon

      public MLDataUnitExport()
  • Method Details Link icon

    • detectionToStruct Link icon

      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 Link icon

      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 Link icon

      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 PamDataUnit
      the - data unit.
    • getUnitClass Link icon

      public abstract Class<?> getUnitClass()
      Get the unit class
      Returns:
    • getName Link icon

      public abstract String getName()
      Get the name of the structure
      Returns:
    • realWordlVec2Angles Link icon

      public static double[] realWordlVec2Angles(PamDataUnit dataUnit)
      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 Link icon

      protected abstract us.hebi.matlab.mat.types.Struct detectionHeader(PamDataBlock pamDataBlock)
      Get the detection header for the specific detection type.
      Parameters:
      pamDataBlock -
      Returns:
      the detection header structure.