COM object EvCalibration
EvApplication > EvFileCollection > EvFile > EvVariablesCollection > EvVariableBase As EvVariableAcoustic > EvVariablesAcousticProperties > EvCalibration - OR - EvApplication > EvFileCollection > EvFile > EvVariablesCollection > EvVariableBase As EvVariableVirtual > EvVariablesAcousticProperties > EvCalibration
View the COM map and the COM summary. |
The EvCalibration object gives you access to information about settings on the Calibration page of the Variable Properties dialog box of the acoustic or virtual variable.
EvCalibration methods and properties:
Get
GetAllSet
GetAllUsed
GetDefault
GetLocalCalName
SetLocalCal
Transducer
|
Description |
|
string Get(string Name, integer Ping) SummaryGet the set value of the specified calibration setting for the specified ping. In this context, a Set means the set of calibration settings read from the data file or ECS file. Calibration settings may or may not change with each ping in the data file. When settings don't change, the calibration for ping 0 will be representative of the calibration for all pings. If they do change, view the Calibration page of the Variable Properties dialog box, where the Used by pings section displays a ping range and the associated calibration settings. This method accesses the calibration for one ping. Where calibration settings change, use script/programming techniques to examine all the pings in the variable. Parameters
ReturnThe value of the calibration setting. An empty string means the calibration setting is not set. ExampleAnnotated calibration example. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Specify these file names for your own environment Dim strEvName: strEvName = "c:\YourEVFile.ev" Dim strEcsName: strEcsName = "c:\COM.ecs" Dim FSO: Set FSO = CreateObject("Scripting.FileSystemObject") Dim Ecs: Set Ecs = FSO.OpenTextFile(strEcsName, 2, true) Ecs.WriteLine "Version 1.0" Ecs.WriteLine "SoundSpeed = 1490" Ecs.WriteLine Ecs.WriteLine "SourceCal T1" Ecs.WriteLine " AbsorptionCoefficient = 0.01" Ecs.WriteLine Ecs.WriteLine "LocalCal Local" Ecs.WriteLine " AbsorptionCoefficient = 0.02" Ecs.WriteLine " TvgRangeCorrection = None" Ecs.Close ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Display one setting Sub ShowSetting(EV, Var, strName) Dim strValue: strValue = Var.Properties.Calibration.Get(strName, 0) If strValue = "" Then EV.Log(Var.Name & " " & strName & " (default): " & Var.Properties.Calibration.GetDefault(strName)) Else EV.Log(Var.Name & " " & strName & ": " & strValue) End If End Sub ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Display all settings set for a variable Sub ShowSettingsSet(EV, Var) Dim AllSet: AllSet = Split(Var.Properties.Calibration.GetAllSet(0)) Dim strName For Each strName In AllSet ShowSetting EV, Var, strName Next End Sub ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Display all settings used by a variable Sub ShowSettingsUsed(EV, Var) Dim Used: Used = Split(Var.Properties.Calibration.GetAllUsed(0)) Dim strName For Each strName In Used ShowSetting EV, Var, strName Next End Sub ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Open EV and get the variable Dim EchoviewCom: Set EchoviewCom = CreateObject("EchoviewCom.EvApplication") Dim EvFile: Set EvFile = EchoviewCom.OpenFile(strEvName) Dim Var1: Set Var1 = EvFile.Variables.FindByName("Sv raw pings T1") ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' What are the settings? EchoviewCom.Log("ECS at start: '" & EvFile.Filesets(0).GetCalibrationFileName & "'") EchoviewCom.Log("Set: ") ShowSettingsSet EchoviewCom, Var1 EchoviewCom.Log("Used: ") ShowSettingsUsed EchoviewCom, Var1 ShowSetting EchoviewCom, Var1, "TVGRangeCorrection" ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' New ecs EvFile.Filesets(0).SetCalibrationFile(strEcsName) ShowSetting EchoviewCom, Var1, "SoundSpeed" ShowSetting EchoviewCom, Var1, "AbsorptionCoefficient" ShowSetting EchoviewCom, Var1, "TVGRangeCorrection" ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Set the local cal EchoviewCom.Log(Var1.Name & " local cal: '" & Var1.Properties.Calibration.GetLocalCalName & "'") Var1.Properties.Calibration.SetLocalCal("Local") EchoviewCom.Log(Var1.Name & " local cal: '" & Var1.Properties.Calibration.GetLocalCalName & "'") ShowSetting EchoviewCom, Var1, "SoundSpeed" ShowSetting EchoviewCom, Var1, "AbsorptionCoefficient" ShowSetting EchoviewCom, Var1, "TVGRangeCorrection" |
string GetAllSet(integer Ping) SummaryGet, for the specified ping, the names of all the calibration settings that were explicitly set by being read from either the data file or ECS file. Parameters
ReturnA string listing calibration setting names separated by spaces. Example |
|
string GetAllUsed(integer Ping) SummaryGet, for the specified ping, the names of all the calibration settings that have been used in a calculation. Used values may be defaults or have been explicitly set. Parameters
ReturnA string listing calibration setting names separated by spaces. Example |
|
string GetDefault(string Name) SummaryGet the default value used by the variable for the named setting. A default value is used when a calculation requires a calibration setting that has not been read from the data file or the ECS file. Parameters
ReturnThe default value as a string. Example |
|
string GetLocalCalName() SummaryGet the name of the LocalCal used by a variable. ParametersNone ReturnThe LocalCal name. Example |
|
boolean SetLocalCal( string Name) SummarySpecify and use the LocalCal for a variable. This method requires the LocalCal name to exist. Parameters
ReturnTrue, if successful. Example |
|
Transducer |
string Transducer SummarySpecifies the Transducer for the variable, as shown on the Calibration page of the Variable Properties dialog box. |