extract_rls_nolog: extract RL data without ping long audit file

View source: R/extract_rls_nolog.R

extract_rls_nologR Documentation

extract RL data without ping long audit file

Description

This function processes the "raw" format of RL data, allowing users to obtain RLs of desired types and in selected frequency bands. If you need direct access to the (more complicated) raw data, see download_drive_rls. This "nolog" version of the function does not require a "ping log" file with acoustic audit information, instead relying on a signal_type column in the RL datafile itself.

Usage

extract_rls_nolog(
  rl_file,
  email,
  save_output = TRUE,
  path = getwd(),
  out_file,
  signal = "MFAS",
  overwrite = TRUE
)

Arguments

rl_file

name (with path, if needed), or a vector of names, of locally-stored .csv file with raw RL data. If not provided, the default is to use download_drive_rls to obtain all available RLs from the FB Google Drive.

email

Email address (required for FB Google Drive authentication; optional if rl_file is provided). You may also be asked to sign in or verify your Google identity as this function runs.

save_output

Logical; whether or not to save results in a .csv file. Default is TRUE.

path

Quoted string with the path to the directory where you want to save the output file. Defaults to the current working directory. Final "/" not needed. Use "/" rather than "\" to avoid possible headaches.

out_file

Name (quoted string) for output .csv file with results. Optional; default file name is constructed based on signal type and frequency band requested.

signal

Quoted string (or vector of them) indicating which signal types to return RLs for. Options are one or more of: 'MFAS', 'Echosounder', 'Explosive'. Default: 'MFAS'. Note: CAS is currently marked as MFAS type. You can isolate CAS pings and events by getting MFAS RLs and then keeping only pings with duration 20 seconds or longer.

overwrite

Whether or not to overwrite an existing output file. Logical. Default: TRUE.

Details

For MFAS: Events are marked type "MFA" or "mfas". This also includes CAS exposures (which, if we have separated them out before, it is by choosing MFA pings of duration more than 20 seconds). Measurements were made in ANSI-standard 1/3 octave bands centered from 1-40kHz. For MFA events, bands with center frequencies less than 9kHz are considered. For max RMS level, Units are: dB re 1 muPa. Measured in 200 msec windows; reported level is the highest in any one window. (Following conventions of SOCAL BRS, 3S projects.) For Echosounder events, selected bands are between 10-14kHz. For SPLs in individual 1/3 octave bands, the RL is "missing" (NA) if the SNR in that band was less than 6dB (and/or if the frequency band in question is no relevant for the selected signal type). For Explosions, all 1/3 octave bands below 5 kHz are included.

Value

Returns a data.frame with RLs (one row per ping). If save_output is true, also saves a csv file in directory path with filename out_file.csv with the results.


stacyderuiter/FBtagtools documentation built on June 1, 2025, 6:26 p.m.