match.echogram: Match ping times from two echograms

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/match.echogram.R

Description

This function verifies ping times between corresponding echograms from two frequencies, eliminating non-matching and duplicated pings.

Usage

1
match.echogram(echogram1, echogram2)

Arguments

echogram1

an object of class “echogram” as returned by read.echogram.

echogram2

an object of class “echogram” from a different acoustic frequency than echogram1 above.

Details

Corresponding echograms refers to data acquired at the same time with different acoustic frequencies. Unmatching pings, i.e. those present in only one frequency, and duplicated pings, are identified by it's associated time and subsequently eliminated.

Value

A list with the two matched echograms.

Author(s)

Héctor Villalobos and Violeta E. González-Maynez

See Also

add.echogram

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# import 38 and 120 kHz data from an HAC file 
hacfile <- system.file("hac", "D20150510-T202221.hac", package = "echogram")
echo1.038 <- read.echogram(hacfile, channel = 1)
echo1.120 <- read.echogram(hacfile, channel = 2)

# Sv matrices have different number of pings
dim(echo1.038$Sv); dim(echo1.120$Sv)

# Apply match ping times
tmp <- match.echogram(echo1.038, echo1.120)

# split the list in the two echograms 
echo1.038 <- tmp$echogram1
echo1.120 <- tmp$echogram2

# number of pings and ping times are now the same for both frequencies
dim(echo1.038$Sv); dim(echo1.120$Sv)

echogram documentation built on Dec. 16, 2019, 9:30 a.m.