Learn R Programming

diveMove (version 0.6-9)

zoc: Interactive zero-offset correction of TDR data

Description

Correct zero-offset in TDR records, with the aid of a graphical user interface (GUI), allowing for dynamic selection of offset and multiple time windows to perform the adjustment.

Usage

zoc(time, depth, offset)
plotDive(time, depth, concurVars=NULL, xlim=NULL, depth.lim=NULL,
         phaseCol=NULL, xlab="time (dd-mmm hh:mm)", ylab.depth="depth (m)",
         concurVarTitles=NULL, xlab.format="%d-%b %H:%M",
         sunrise.time="06:00:00", sunset.time="18:00:00",
         night.col="gray60", key=TRUE)

Arguments

time
POSIXct object with date and time.
depth
numeric vector with depth in m.
concurVars
matrix with additional variables in each column to plot concurrently with depth.
offset
known amount of meters to subtract for zero-offset correcting depth throughout the entire TDR record.
xlim
vector of length 2, with lower and upper limits of time to be plotted.
depth.lim
numeric vector of length 2, with the lower and upper limits of depth to be plotted.
phaseCol
factor dividing rows into sections.
xlab, ylab.depth
strings to label the corresponding y-axes.
xlab.format
format string for formatting the x axis; see strptime.
concurVarTitles
character vector of titles to label each new variable given in concurVars.
sunrise.time
character string with time of sunrise in 24 hr format. This is used for shading night time.
sunset.time
character string with time of sunset in 24 hr format. This is used for shading night time.
night.col
color for shading night time.
key
logical indicating whether to dray a key.

Value

  • zoc returns a numeric vector, as long as depth of zero-offset corrected depths.

    plotDive returns a list with as many components as sections of the record that were zero-offset corrected, each consisting of two further lists with the same components as those returned by locator.

Details

These functions are used primarily to correct, visually, drifts in the pressure transducer of TDR records. zoc calls plotDive, which plots depth and, optionally, speed vs. time with the possibility zooming in and out on time, changing maximum depths displayed, and panning through time. The option to zero-offset correct sections of the record gathers x and y coordinates for two points, obtained by clicking on the plot region. The first point clicked indicates the offset and beginning time of section to correct, and the second one indicates the ending time of the section to correct. Multiple sections of the record can be corrected in this manner, by panning through the time and repeating the procedure. In case there's overlap between zero offset corrected windows, the last one prevails.

Once the whole record has been zero-offset corrected, remaining points with depth values lower than zero, are turned into zeroes, as these are assumed to be values at the surface.

See Also

detDive