Skip to contents

This function parses an EX60/70 Echoview calibration, finds a calibration parameter and changes its value.

Usage

modifyECS(
  ECSPathAndFile,
  ECStargetVar,
  NewValue,
  maxNlines = 200,
  nBlanks2Stop = 4,
  ECSPathAndFileOut
)

Arguments

ECSPathAndFile

Echoview calibration path and filename (character)

ECStargetVar

Calibration parameter to change (character)

NewValue

Calibration values (numeric, vector)

maxNlines

= 200. Maximum number of lines in ECS file to search (numeric).

nBlanks2Stop

=4. Stop searching ECS file when this number of consecutive blanks has been encountered (numeric).

ECSPathAndFileOut

Generated Echoview calibration path and filename (character).

Details

This function can be used to modify parameters in an Echoview calibration file. The current form of the function is quite limited and we strongly recommend that users carefully check any resultant modified ECS files. Found instances of the target calibration parameter be retained by setting the corresponding element in the NewValue vector to NA.

Note

This function is under development and has only been tested on ECS files generated in the 'SimradEK60Raw' format and that include FILESET and SOURCECAL settings only

Currently the length of the NewValue parameter must equal the number of instances of the ECStargetVar found in the ECS file.

Examples

if (FALSE) {
ECSFile<-'/20120326_KAOS_SimradEK5.ecs'
#change the absorption coefficient for the first frequency in 3-frequency EK60 data:
modifyECS(ECSPathAndFile=ECSFile,ECStargetVar='AbsorptionCoefficient',NewValue=c(1,NA,NA),
maxNlines=200,nBlanks2Stop=4,FileNameSuffix='alphaMod')
#change sound speed in FILESET and the three frequencies in SOURCECAL:
modifyECS(ECSPathAndFile=ECSFile,ECStargetVar='SoundSpeed',NewValue=rep(1500,4),
         maxNlines=200,nBlanks2Stop=4,FileNameSuffix='sosMod')
}