Package tethys.calibration
Class CalibrationHandler
java.lang.Object
tethys.CollectionHandler
tethys.calibration.CalibrationHandler
- All Implemented Interfaces:
TethysStateObserver
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
calDocumentExists
(String documentName) See if a document already exists.nilus.Calibration
createCalibrationDocument
(int channelIndex) Create a calibration document for a single hydrophone channel.nilus.Calibration
createCalibrationDocument
(AcquisitionControl soundAcquisition, int channelIndex) Create a calibration document for a single hydrophone channel.Get a start of name for a calibration document.int
static String
formatDate
(long timeInMillis) Format the data in the dd MMMM yyyy formatArrayList<DocumentNilusObject<nilus.Calibration>>
getHydrophoneId
(int channelIndex) Get an id based on the instrument identifiers and channel number.boolean
Return if we have at least one document for every channel.boolean
haveChannelCalibration
(int iChan) Find whether we have a document for this instrument and channel.makeChannelNamePart
(int channelIndex) Make the final part of the document name / id which is the channel number.void
updateState
(TethysState tethysState) Receive state updates when Tethys has done something (made a connection, moved some data, etc.)
Note that this is for RECEIVING state updates, not for sending them.Methods inherited from class tethys.CollectionHandler
collectionName, getCollection, getDetectorEffort, getMethodString, getSoftwareString, getSupportSoftware, getSupportSoftwareVersion, getTethysControl, getVersionString
-
Field Details
-
updateOptions
-
calibrationMethods
-
qaTypes
-
helpPoint
- See Also:
-
-
Constructor Details
-
CalibrationHandler
- Parameters:
tethysControl
-
-
-
Method Details
-
updateState
Description copied from interface:TethysStateObserver
Receive state updates when Tethys has done something (made a connection, moved some data, etc.)
Note that this is for RECEIVING state updates, not for sending them. To avoid infinite notifications loops, use tethysControl.sendStateUpdate(TethysState) to send out state notifications.- Specified by:
updateState
in interfaceTethysStateObserver
-
exportAllCalibrations
public int exportAllCalibrations() -
formatDate
Format the data in the dd MMMM yyyy format- Parameters:
timeInMillis
- time in milliseconds- Returns:
- formatted string.
-
createCalibrationDocumentRoot
Get a start of name for a calibration document. This will be used in the document name with a date and a channel, and the document Id just of the root and the channel.- Returns:
- root string for document names and document id's.
-
createCalibrationDocument
public nilus.Calibration createCalibrationDocument(int channelIndex) Create a calibration document for a single hydrophone channel.- Parameters:
channelIndex
- channel id. One document per channel for a multi hydrophone array.pDeployment
- deployment, for cross referencing.- Returns:
- Calibration document.
-
createCalibrationDocument
public nilus.Calibration createCalibrationDocument(AcquisitionControl soundAcquisition, int channelIndex) Create a calibration document for a single hydrophone channel.- Parameters:
soundAcquisition
- Daq information - needed to get the ADC calibration information.channelIndex
- channel id. One document per channel for a multi hydrophone array.pDeployment
- deployment, for cross referencing.- Returns:
- Calibration document.
-
calDocumentExists
See if a document already exists. This should only occur if you try to export the same document twice with the same calibration date.- Parameters:
documentName
-- Returns:
- true if a document already exists.
-
haveAllChannelCalibrations
public boolean haveAllChannelCalibrations()Return if we have at least one document for every channel.- Returns:
- true if all cal documents exist.
-
haveChannelCalibration
public boolean haveChannelCalibration(int iChan) Find whether we have a document for this instrument and channel.- Parameters:
iChan
-- Returns:
- true if we have an appropriate doc.
-
getHydrophoneId
Get an id based on the instrument identifiers and channel number. This is the internal id of the document, not the document name which includes an additional date part in the name.- Parameters:
channelIndex
-- Returns:
- id string - instrument type + instrument id + channel
-
makeChannelNamePart
Make the final part of the document name / id which is the channel number.- Parameters:
channelIndex
- channel index- Returns:
- string in the form ch%02d (e.g. ch03)
-
getCalibrationDataList
- Returns:
- the calibrationDataBlock
-
getHelpPoint
- Specified by:
getHelpPoint
in classCollectionHandler
-