Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2011 Jan 28;6(1):e15850.
doi: 10.1371/journal.pone.0015850.

Recursive filtering for zero offset correction of diving depth time series with GNU R package diveMove

Affiliations

Recursive filtering for zero offset correction of diving depth time series with GNU R package diveMove

Sebastián P Luque et al. PLoS One. .

Abstract

Zero offset correction of diving depth measured by time-depth recorders is required to remove artifacts arising from temporal changes in accuracy of pressure transducers. Currently used methods for this procedure are in the proprietary software domain, where researchers cannot study it in sufficient detail, so they have little or no control over how their data were changed. GNU R package diveMove implements a procedure in the Free Software domain that consists of recursively smoothing and filtering the input time series using moving quantiles. This paper describes, demonstrates, and evaluates the proposed method by using a "perfect" data set, which is subsequently corrupted to provide input for the proposed procedure. The method is evaluated by comparing the corrected time series to the original, uncorrupted, data set from an Antarctic fur seal (Arctocephalus gazella Peters, 1875). The Root Mean Square Error of the corrected data set, relative to the "perfect" data set, was nearly identical to the magnitude of noise introduced into the latter. The method, thus, provides a flexible, reliable, and efficient mechanism to perform zero offset correction for analyses of diving behaviour. We illustrate applications of the method to data sets from four species with large differences in diving behaviour, measured using different sampling protocols and instrument characteristics.

PubMed Disclaimer

Conflict of interest statement

Competing Interests: The authors have declared that no competing interests exist.

Figures

Figure 1
Figure 1. Subset of “perfect” data set to be corrupted and used as reference to measure performance of the “filter” method for zero offset correction (A), and corrupted data set to be used as input (B).
Figure 2
Figure 2. Result of filtering method for zero offset correction of diving depth time series.
Corrupted input time series (A), first filter (median) using a moving window of size 12 (1 min) and second filter (0.35 quantile) using moving window of size 720 (1 h) (B), and corrected depth (corrupted series minus last filter) (C). The y-axis limits are restricted to be approximately equal to the range of surface depth in the time series for clarity.
Figure 3
Figure 3. Probability density (A) and “Q-Q” deviations (m) of corrected depth time series from the original, clean, data set (black solid line), and that of normal Gaussian noise (red solid line) introduced into the original time series ( , m) (B).
Figure 4
Figure 4. Zero offset correction of TDR data from a leatherback turtle.
Input time series (A), first filter (median) using a moving window of size 3 (3 s) and second filter (0.05 quantile) using moving window of size 120 (2 min) (B), and corrected depth (input series minus last filter) (C). The y-axis limits are restricted to be approximately equal to the range of surface depth in the time series for clarity.
Figure 5
Figure 5. Zero offset correction of TDR data from a Cassin's auklet.
Input time series (A), first filter (median) using a moving window of size 3 (9 s) and second filter (0.05 quantile) using moving window of size 180 (9 min) (B), and corrected depth (input series minus last filter) (C). The y-axis limits are restricted to be approximately equal to the range of surface depth in the time series for clarity.
Figure 6
Figure 6. Zero offset correction of TDR data from a king penguin.
Input time series (A), first filter (median) using a moving window of size 11 (11 s) and second filter (0.3 quantile) using moving window of size 120 (120 s) (B), and corrected depth (input series minus last filter) (C). The y-axis limits are restricted to be approximately equal to the range of surface depth in the time series for clarity.
Figure 7
Figure 7. Comparison of ZOC adjusted and unadjusted TDR data from a short-finned pilot whale.
Input time series (A), corresponding to period presented in , and corrected depth (B). The y-axis limits are restricted to the top 35 m of this period for clarity. Date and time on x-axis were set arbitrarily because input consists of seconds.

Similar articles

Cited by

References

    1. Laidre KL, Heide-Jørgensen MP, Dietz R. Diving behaviour of narwhals (Monodon monocerus) at two coastal localities in the Canadian Arctic. Can J Zool. 2002;80:624–635.
    1. Spence-Bailey LM, Verrier D, Arnould JPY. The physiological and behavioural development of diving in Australian fur seal (Arctocephalus pusillus doriferus) pups. J Comp Physiol B Biochem Syst Environ Physiol. 2007;177:483–494. - PubMed
    1. Eguchi T, Harvey JT. Diving behavior of the Pacific harbor seal (Phoca vitulina richardsii) in Monterrey Bay, California. Mar Mamm Sci. 2005;21:283–295.
    1. Hull CL. Comparative diving behaviour and segregation of the marine habitat by breeding Royal penguins, Eudyptes schlegeli, and eastern Rockhopper penguins, Eudyptes chrysocome filholi, at Macquarie Island. Can J Zool. 1999;78:333–345.
    1. R development Core Team. Vienna, Austria: R Foundation for Statistical Computing; 2010. R: A language and environment for statistical computing. Available: http://www.R-project.org.

Publication types