processPgDetections: Load and Process Detections from Pamguard

Description Usage Arguments Value Author(s)

View source: R/processPgDetections.R

Description

Loads and processes acoustic detection data that has been run through Pamguard. Uses the binary files and database(s) contained in prs, and will either group your data into events by the grouping present in the 'OfflineEvents' or 'Detection Group Localiser' tables (mode = 'db') or by the grouping specified by start/end times in the supplied grouping (mode = 'time'). Will apply all processing functions in prs to the appropriate modules

Usage

1
2
3
4
5
6
7
8
processPgDetections(
  prs,
  mode = c("db", "time"),
  id = NULL,
  grouping = NULL,
  format = "%Y-%m-%d %H:%M:%OS",
  ...
)

Arguments

prs

a PAMrSettings object containing the databases, binaries, and functions to use for processing data. See PAMrSettings. Can also be an AcousticStudy object, in which case the prs slot will be used.

mode

selector for how to organize your data in to events. db will organize by events based on tables in the databases, and time will organize into events based on timestamps provided in grouping.

id

an event name or id for this study, will default to today's date if not supplied (recommended to supply your own informative id)

grouping

For mode = 'db', the table to group events by. Either event to use the OfflineEvents table, or detGroup to use the detection group localiser module groups.

For mode = 'time', this should be a data frame with three mandatory columns and 1 row for each separate event. The mandatory columns are start, end, and id. start and end should specify the start and end time of the event and must be in UTC. id should specify a unique id for each event. There are also optional columns species, db, and sr. species should provide a species ID if it is available. db and sr are the corresponding database and sample rate to associate with a particular event, these typically do not need to be specified as the function will attempt to automatically match them based on the times of the events and the databases. Note that db must be the full filepath to the database. If a clear match is not found then the user will be prompted to either select from a list or input the proper sample rate.

grouping can be supplied either as a data frame or as a filepath to a csv file.

format

the date format for the start and end columns in grouping if it is a csv. Times are assumed to be UTC. See ?strptime for details.

...

additional arguments to pass onto to different methods

Value

an AcousticStudy object with one AcousticEvent for each event in the events slot, and the PAMrSettings object used stored in the prs slot.

Author(s)

Taiki Sakai taiki.sakai@noaa.gov


TaikiSan21/PAMr documentation built on Nov. 15, 2020, 9:46 p.m.