trim.echogram: Trim an echogram vertically or horizontally

View source: R/trim.echogram.R

trim.echogramR Documentation

Trim an echogram vertically or horizontally

Description

This function allows to trim an echogram by depth or ping number by actually trimming the underlying data matrices and vectors.

Usage

trim.echogram(echogram, depth.max = NULL, ping.ini = 1, ping.end = NULL)

Arguments

echogram

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

depth.max

maximum depth to keep in the echogram.

ping.ini

start ping to keep.

ping.end

end ping to keep.

Details

This funcion has been conceived to discard undesired data below a given depth (e.g. the sea bottom), therefore, the initial depth is always the surface, so the vertical trimming is limited to select the maximum depth.

Value

An object of class “echogram”.

Author(s)

Héctor Villalobos

Examples

# import 38 kHz data from an HAC file 
hacfile <- system.file("extdata", "D20150510-T202500.hac", package = "echogram")
echo2.038 <- read.echogram(hacfile, channel = 1)

# echogram by default
echogram(echo2.038)

# trim the echogram
echo.tmp <- trim.echogram(echo2.038, depth.max = 70, ping.end = 250)
echogram(echo.tmp)

hvillalo/echogram documentation built on Oct. 2, 2023, 7:28 a.m.