library(oce)
data(adp)
plot(adp, which = 5) # beam 1 echo intensity
adp.att <- beamUnspreadAdp(adp)
plot(adp.att, which = 5) # beam 1 echo intensity
# Profiles
par(mar = c(4, 4, 1, 1))
a <- adp[["a", "numeric"]] # second arg yields matrix return value
distance <- adp[["distance"]]
plot(apply(a, 2, mean), distance, type = "l", xlim = c(0, 256))
lines(apply(a, 2, median), distance, type = "l", col = "red")
legend("topright", lwd = 1, col = c("black", "red"), legend = c("original", "attenuated"))
# Image
plot(adp.att, which = "amplitude", col = oce.colorsViridis(100))
Run the code above in your browser using DataLab