echogram (version 0.1.1)

read.echogram: Read echogram data from an HAC file

Description

This function imports from different tuples in the HAC file, the necessary information to visualise and analyse an echogram in R.

Usage

read.echogram(hac, channel = NULL)

Arguments

hac

name of an HAC file.

channel

acoustic channel number.

Value

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.

Details

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).

References

ICES, 2005. Description of the ICES HAC Standard Data Exchange Format, Version 1.60. Technical Report 278, ICES Cooperative Research Report.

Examples

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab