calculateICI {PAMpal}R Documentation

Calculate Inter-Click Interval

Description

Calculate inter-click interval for click data

Usage

calculateICI(
  x,
  time = c("UTC", "peakTime"),
  callType = c("click", "whistle", "cepstrum", "gpl"),
  verbose = TRUE,
  ...
)

## S4 method for signature 'AcousticStudy'
calculateICI(
  x,
  time = c("UTC", "peakTime"),
  callType = c("click", "whistle", "cepstrum", "gpl"),
  verbose = TRUE,
  ...
)

## S4 method for signature 'AcousticEvent'
calculateICI(
  x,
  time = c("UTC", "peakTime"),
  callType = c("click", "whistle", "cepstrum", "gpl"),
  verbose = TRUE,
  ...
)

getICI(x, type = c("value", "data"))

Arguments

x

a AcousticStudy object, a list of AcousticEvent objects, or a single AcousticEvent object

time

the time measurement to use. start will use the UTC value, peak will use the peakTime value if present (currently present in standardClickCalcs, this is the time of the peak of the waveform)

callType

the call type to calculate ICI for, usually this is click but also allows users to specify whistle or cepstrum to calculate this using other detector data

verbose

logical flag to print messages

...

not currently used

type

the type of data to return, one of 'value' or 'data'. 'value' returns the single ICI value for each detector, 'data' returns all the individual ICI values used to calculate the number returned by 'value'

Details

Calculates the ICI for each individual detector and across all detectors. ICI calculation is done by ordering all individual detections by time, then taking the difference between consecutive detections and approximating the mode value.

Value

the same object as x, with ICI data added to the "ancillary" slot of each AcousticEvent. Two items will be added. $ici contains all of the individual inter-click intervals used to calculate the ICI, as well as an "All" ICI using all the combined data. $measures will also have a ICI measurement added for each detector, this will be the single modal value. Data in the $measures spot can be exported easily to modeling algorithms. getICI will just return either the values stored in $measures for type = 'value' or a dataframe of the individual ICI values used to calculate these (with columns indicating separate Channels, eventIds, and detectorNames) for type = 'data'

Author(s)

Taiki Sakai taiki.sakai@noaa.gov

Examples


# setting up example data
data(exStudy)
exStudy <- calculateICI(exStudy)
# each event has its ICI data stored separately, these are 0
# because there is only a single click in this event
ancillary(exStudy[[1]])$ici
# also saves it in measures that will get exported for modeling
ancillary(exStudy[[1]])$measures


[Package PAMpal version 1.0.0 Index]