Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dive statistics incorrect? #7

Open
JessHCarroll opened this issue Nov 1, 2022 · 1 comment
Open

Dive statistics incorrect? #7

JessHCarroll opened this issue Nov 1, 2022 · 1 comment
Labels

Comments

@JessHCarroll
Copy link

JessHCarroll commented Nov 1, 2022

Question on diveMove

Hi, the summary statistics for some dives appear to be strange-the beginning of the ascent time is listed as occurring before both the beginning and end of the descent time. It seems to always have this 5 minute offset. The times given don't seem to translate onto the plotTDR time and phases either. I can't work out what I've done to cause this or how to address this?

As an example this specific dive (number 445) says:
begdesc: 2016-07-23 08:05:00
enddesc : 2016-07-23 08:05:00
begasc: 2016-07-23 08:00:00

But when viewing the TTDR none of these numbers seem to match and the 'bottom phase' seems to be marked as DA/ A.

TTDR of dive 445:
image

I'm still working on optimizing the ZOC, but I don't think this would cause the issue? Sorry for the noob question and thanks so much in advance :)

sample data- example.csv
(more occur in the whole dataset)

ifile <- "example.csv"
tdrX <- readTDR(ifile, dateCol=6, timeCol=7, depthCol=11, concurrentCols=NULL,
                dtformat="%d-%b-%y %H:%M:%S", subsamp=
[example.csv](https://github.com/spluque/diveMove/files/9910111/example.csv)
300)

dcalib2 <-calibrateDepth(tdrX,
                        wet.thr = 3610,  # (seconds) At-sea phases shorter than this threshold will be considered as trivial wet.Delete periods of wet activity that are too short to be compared with other wet periods.
                        dive.thr = 7,    # (meters) threshold depth below which an underwater phase should be considered a dive.
                        zoc.method ="filter",  # see Luque and Fried (2011)
                        k = c(12, 240),  # (60 and 1200 minutes) Vector of moving window width integers to be applied sequentially.
                        probs = c(0.5, 0.05),   # Vector of quantiles to extract at each step indicated by k (so it must be as long as k)
                        depth.bounds = c(-5, 15),  # minimum and maximum depth to bound the search for the surface.
                        na.rm = TRUE)

stats<-diveStats(dcalib2)

filter(stats, begasc < begdesc)

plotTDR(dcalib2, diveNo=445

Edit
changing to smooth.spline appears to help with descent phase detection, however as this is for a loggerhead turtle I'm not sure if this is correct to do for all dives?

image

On a side note is there a way to interpolate the time the animal actually goes below a desired threshold and use this as the start of ascent time? You can see from the profile they start descending before the descent identification at ~66m, due to the low sampling frequency of 5m. Could I somehow estimate the time the turtle went below e.g. 7m using the getDiveDeriv() ?

@spluque
Copy link
Owner

spluque commented Nov 3, 2022

@jharv3y ZOC certainly influences the input to the dive model, and If this is the same dataset you posted on #2, the filter method may not be appropriate. You'll want to work with knot.factor, descent.crit.q and ascent.crit.q to retrieve meaningful dive phase results. Use plotTDR for plotting the dive model to help with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants