Description Usage Arguments Details Value Note Author(s) References Examples
View source: R/read.echogram.R
This function imports from different tuples in the HAC file, the necessary information to visualise and analyse an echogram in R.
1 | read.echogram(hac, channel = NULL)
|
hac |
name of an HAC file. |
channel |
acoustic channel number. |
This function calls internally other echogram
's functions (postion.hac
, navigation.hac
and bottom.hac
) to import data from an HAC file. The acoustic channel is an integer, normally between 1 and n
, where n
is the number of frequencies used during data acquisition. When channel = 1
, data from the lowest acoustic frequency is imported, while channel = n
refers to the highest frequency present in the HAC file. By default, the function finds out the smallest channel number, because in some HAC files channel = 0
. A text string with the frequency value (in kilohertz) is stored as an attribute of the Sv matrix (see examples below).
An object of class
“echogram” (a list) with components:
depth |
a vector of mean sample depth (in m) of length p. |
Sv |
a p by k matrix of sampled values, currently the mean volume backscattering strength (Sv, in dB). |
pings |
a k by four data frame with ping time, detected bottom depth, vessel speed and cummulated traveled distance. |
Currently, read.echogram
has been successfully tested importing HAC data from the following ping tuples: 10000 (U-32); 10030 (U-16) and 10040 (C-16).
Héctor Villalobos
ICES, 2005. Description of the ICES HAC Standard Data Exchange Format, Version 1.60. Technical Report 278, ICES Cooperative Research Report.
1 2 3 4 5 6 | hacfile <- system.file("hac", "D20150510-T202221.hac", package = "echogram")
echo1 <- read.echogram(hacfile, channel = 1)
class(echo1)
str(echo1)
attr(echo1$Sv, "frequency")
echogram(echo1)
|
[1] "echogram"
List of 3
$ depth: num [1:820] 0.0487 0.1461 0.2435 0.341 0.4384 ...
$ Sv : num [1:820, 1:316] NA NA NA NA NA ...
..- attr(*, "frequency")= chr "38 kHz"
$ pings:'data.frame': 316 obs. of 4 variables:
..$ pingTime : POSIXct[1:316], format: "2015-05-10 20:22:21" "2015-05-10 20:22:22" ...
..$ detBottom: num [1:316] -2.15e+06 -2.15e+06 -6.44e+01 -6.45e+01 -6.47e+01 ...
..$ speed : num [1:316] 0 0 0 0 6.45 ...
..$ cumdist : num [1:316] 0 0 0 0 0.000896 ...
- attr(*, "class")= chr "echogram"
[1] "38 kHz"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.