Learn R Programming

oce (version 0.2-1)

beamAttenuateAdp: Attenuate ADP beam signal strength

Description

Attenuate ADP beam signal strength

Usage

beamAttenuateAdp(x, count2db=c(0.45, 0.45, 0.45, 0.45), debug=getOption("oceDebug"))

Arguments

x
an object of class "adp"
count2db
a set of coefficients, one per beam, to convert from beam echo intensity to decibels.
debug
a flag that turns on debugging. Set to 1 to get a moderate amount of debugging information, or to 2 to get more.

Value

  • An object of class "adp".

Details

Beam echo intensity is first converted from counts to decibels, by multiplying by count2db. Then the signals are range corrected by adding the term $20\log10(r)$, where $r$ is the distance from the sensor head to the water from which scattering is occuring. $r$ is given by x$data$ss$distance.

References

The coefficient to convert to decibels is a personal communication. The logarithmic term is explained in textbooks on acoustics, optics, etc.

See Also

See read.adp for other functions that relate to objects of class "adp".

Examples

Run this code
library(oce)
data(adp)
plot(adp, which=5) # beam 1 echo intensity
adp.att <- beamAttenuateAdp(adp)
plot(adp.att, which=5) # beam 1 echo intensity
## Profiles
par(mar=c(4, 4, 1, 1))
plot(apply(adp$data$ma$a,2,mean),adp$data$ss$distance,type='l',xlim=c(0,256))
lines(apply(adp.att$data$ma$a,2,mean),adp$data$ss$distance,type='l',col='red')
legend("topright",lwd=1,col=c("black","red"),legend=c("original","attenuated"))
## Image
plot(adp.att, which="amplitude",col=oceColorsJet(100))

Run the code above in your browser using DataLab