alignBurstSeq: Align synced data with known burst sequence

Description Usage Arguments Value Examples

View source: R/alignBurstSeq.R

Description

Identifies where in the sequence of known burst intervals the detected data is from. Add extra columns to data.table containing ping index of the burst sequence (seq_ping_idx) and expected time of ping (seq_epo). Only to be used for 'random' burst interval data when you know the burst sequence.

Usage

1
2
3
4
5
6
7
8
alignBurstSeq(
  synced_dat,
  burst_seq,
  seq_lng_min = 10,
  rbi_min,
  rbi_max,
  plot_diag = TRUE
)

Arguments

synced_dat

data.table obtained using applySync() on a detections_table

burst_seq

Vector containing known burst sequence

seq_lng_min

Minimum length of sequence of consecutive pings to use for the alignment. Finds first occurence of sequence of this length in the data and compare to the known burst sequence

rbi_min, rbi_max

Minimum and maximum burst interval of the transmitter. Used to identify sequence of consecutive pings in the data

plot_diag

Logical indicating if visual diagnosis plots should be created.

Value

data.table like the input synced_dat, but with extra columns seq_ping_idx and seq_epo

Examples

1
2
3
4
5
6
7
8
# Align data from a tag with known random burst interval to the burst interval sequence
# using the hald data included in `yapsdata` (see ?yapsdata::hald for info).
synced_dat_1315 <- dat_align$synced_dat_1315
seq_1315 <- dat_align$seq_1315
rbi_min <- 60
rbi_max <- 120
aligned_dat <- alignBurstSeq(synced_dat=synced_dat_1315, burst_seq=seq_1315, 
	rbi_min=rbi_min, rbi_max=rbi_max, plot_diag=TRUE)

yaps documentation built on April 14, 2021, 1:06 a.m.