public class HydrophoneImport extends DataImport<java.util.ArrayList<java.lang.Double>>
.csv import formats
List Format: One hydrophone data unit per row (rows have ten columns). Format is: [0]=timeExcelSerial [1]=x [2]=y [3]=z [4]=xErr [5]=yErr [6]=zErr [7]=streamerId [8]=hydrophoneId [9]=sensitivity [10]=gain . Note that sensitivity and gain info doesn't need to be included.
2D List Format (Legacy) Multiple hydrophones per row. Each row of the input array must have the following format. timeExcelSerial, x0, y0,z0, x0Error, y0Error, z0Error,x1, y1,z1, x1Error, y1Error, z1Error,,..... and so on depending on the number of hydrophones.
.mat format Not yet implemented.
Modifier and Type | Field and Description |
---|---|
static int |
DATA_OK
Everything seems fine
|
static int |
defaultGain
Gain value to use if imported data has no gain info
|
static int |
defaultSens
Sensitivity value to use if imported data has no sensitivty info
|
static int |
defaultStreamerID
Streamer id to use if imported data has no streamer id info
|
static int |
ERROR_LOADING_CSV
Something has gone wrong getting the csv file
|
static int |
ERROR_LOADING_MATLAB_STRUCT
Something has gone wrong loading the matlab structure
|
static int |
ERROR_NUMBER_OF_HYDROPHONES_ARRAY
The number of hydrophones is not the same as the number of hydrophones in the curretn array manager.
|
static int |
ERROR_NUMBER_OF_HYDROPHONES_INCONSISTANT
The number of hydrophones is different for different times.
|
static int |
ERROR_YEARS
The data is far in the past or in the future
|
static int |
MATLAB_STRUCT_FORMAT
NOT IMPLEMENTED YET*************
Loads from a matlab structure with following format
structure(i).time =time
structure(i).hydrophones= Npositionsx3 array
structure(i).hydrophoneErrors= Npositionsx3 array
|
Constructor and Description |
---|
HydrophoneImport(HydrophoneDataBlock hydrophoneDataBlock) |
Modifier and Type | Method and Description |
---|---|
java.util.ArrayList<java.util.ArrayList<java.lang.Double>> |
convertToHydrophoneList(java.util.ArrayList<java.util.ArrayList<java.lang.Double>> importData)
Converts a 2D List of hydrophones into a 1D list of hydrophones.
|
PamDataUnit |
createDataUnit(java.util.ArrayList<java.lang.Double> dataLine)
For hydrophone data imported [0]=timeMilliss [1]=x [2]=y [3]=z [4]=xErr [5]=yErr [6]=zErr [7]=streamerId [8]=hydrophoneId [9]=sensitivity [10]=gain
|
PamDataBlock |
getDataBlock()
Get the data block to to save data to.
|
java.lang.String |
getDataUnitName()
The name of the data unit to appear on the dialog boxes.
|
java.lang.String[] |
getExtensionsStrings()
Return the file extensions that can be loaded.
|
boolean |
isDataFormatOK(java.util.ArrayList<java.lang.Double> dataLine)
Check that a row of imported data is in the correct format.
|
java.util.ArrayList |
loadDataIntermediate(java.lang.String filePath) |
performPreChecks
public static int defaultStreamerID
public static int defaultGain
public static int defaultSens
public static final int MATLAB_STRUCT_FORMAT
public static final int DATA_OK
public static final int ERROR_YEARS
public static final int ERROR_LOADING_CSV
public static final int ERROR_LOADING_MATLAB_STRUCT
public static final int ERROR_NUMBER_OF_HYDROPHONES_ARRAY
public static final int ERROR_NUMBER_OF_HYDROPHONES_INCONSISTANT
public HydrophoneImport(HydrophoneDataBlock hydrophoneDataBlock)
public java.util.ArrayList loadDataIntermediate(java.lang.String filePath)
loadDataIntermediate
in class DataImport<java.util.ArrayList<java.lang.Double>>
public java.util.ArrayList<java.util.ArrayList<java.lang.Double>> convertToHydrophoneList(java.util.ArrayList<java.util.ArrayList<java.lang.Double>> importData)
importData.
- Each row of the input array must have the following format. time, x0, y0,z0, x0Error, y0Error, z0Error,x1, y1,z1, x1Error, y1Error, z1Error,,..... and so on depending on the number of hydrophones.public java.lang.String[] getExtensionsStrings()
DataImport
getExtensionsStrings
in class DataImport<java.util.ArrayList<java.lang.Double>>
public boolean isDataFormatOK(java.util.ArrayList<java.lang.Double> dataLine)
DataImport
isDataFormatOK
in class DataImport<java.util.ArrayList<java.lang.Double>>
public PamDataUnit createDataUnit(java.util.ArrayList<java.lang.Double> dataLine)
createDataUnit
in class DataImport<java.util.ArrayList<java.lang.Double>>
public PamDataBlock getDataBlock()
DataImport
getDataBlock
in class DataImport<java.util.ArrayList<java.lang.Double>>
public java.lang.String getDataUnitName()
DataImport
getDataUnitName
in class DataImport<java.util.ArrayList<java.lang.Double>>