addPgEvent: Add Pamguard Event to Database

View source: R/addPgEvent.R

addPgEventR Documentation

Add Pamguard Event to Database

Description

Add a new event to an existing Pamguard database in the "OfflineEvents" table. If the specified eventType does not exist in the database, it will be added to the "Lookup" table.

Usage

addPgEvent(
  db,
  UIDs = NULL,
  binary,
  eventType,
  comment = NA,
  tableName = NULL,
  start = NULL,
  end = NULL,
  type = c("click", "dg")
)

Arguments

db

database file to add an event to

UIDs

vector of the UIDs of the individual detections to add to the event

binary

binary file(s) containing the detections from UIDs

eventType

the name of the event type to add. If this is not already present in the database, it will be added to the "Lookup" table

comment

(optional) a comment for the event

tableName

(optional) specify the name of the Click Detector that generated the event table you want to add to. This only needs to be specified if you have more than one click detector, it defaults to the first "NAME_OfflineEvents" table in the database.

start

(optional) start time of event. Mandatory if no detections are added

end

(optional) end time of event. Mandatory if no detections are added

type

type of event data to add, either 'click' to add event data using the Click Detector module, or 'dg' to add event data using the Detection Grouper module

Value

Adds to the database db, invisibly returns TRUE if successful

Author(s)

Taiki Sakai taiki.sakai@noaa.gov

Examples

## Not run: 
myDb <- 'PamguardDatabase.sqlite3'
myBinaries <- c('./Binaries/Bin1.pgdf', './Binaries/Bin2.pgdf')
addUIDs <- c(10000001, 10000002, 20000007, 20000008)
addPgEvent(db = myDb, UIDs = addUIDs, binary = myBinaries, eventType = 'MyNewEvent')

## End(Not run)

TaikiSan21/PAMmisc documentation built on April 6, 2024, 5:33 p.m.