AudioProcessing: AudioProcessing

Description Usage Arguments Details

View source: R/AudioProcessing.R

Description

Signal processing the zdevice audio signal

Usage

1
2
3
4
5
AudioProcessing(d, rate = 256, thresh_right = c(stoptime = 2000,
  last_window = NULL), preprocess = "none", filtering = "lgf",
  output = "rmax", preParams = list(window = 1),
  filtParams = list(threshold = 3.5, roll_window = 30, robust = FALSE),
  outputParams = list(window = 1))

Arguments

d

A two-column data.frame with the first column being time and the second being signal

rate

Sampling rate for the signal

thresh_right

Threshold to filter out signal from the end to remove artifacts like removing device and the like, that can bias results. There are two options: 1. stoptime: Time (in seconds) from the end when we stop 2. last_window: which is the last observation (index) to keep (is this good?)

preprocess

Options are 'ma' (Moving average) and 'none'

filtering

Options are 'lgf' (local Gaussian Filtering), 'gf' (Gaussian Filtering), 'mgf' (Mixed Gaussian Filtering, not implemented), and 'none'

output

Options are 'rmean' (running mean), 'rmedian' (running median), 'apnea', and 'none'

preParams

Parameters for the chosen preprocess method, as a list

filtParams

Parameters for the chosen filtering method, as a list

outputParams

Parameters for the chosen output method, as a list

Details

This function allows the modular implementation of different pre-processing, filtering and summarization steps in processing zdevice audio signal. There are several choices for each of these steps already implemented.

Pre-processing

  1. "none" : No pre-processing

  2. "ma" : Run a moving average on the raw signal

    • "window" : The width of the moving average window in seconds

Filtering

  1. "none": No filtering

  2. "gf" : Gaussian filtering

    • "threshold": The threshold value beyond which we consider the filtered values to be signal

    • "robust": Use median and mad to scale the data instead of mean and sd

  3. "lgf": Local Gaussian Filtering (Default)

    • "threshold": The threshold value beyond which we consider the filtered values to be signal

    • "window" : The window for computing the local mean and sd for scaling the data, in seconds

    • "robust": not implemented

Summarizing

  1. "none" : no summarizing

  2. "rmax" : Moving maximum (Default)

    • "window": Window of the moving average in seconds

  3. "rmean" : Moving average

    • "window": Window of moving average in seconds

  4. "apnea" : The apnea detection methodology (not implemented)


Zansors/zdeviceR documentation built on Dec. 25, 2019, 12:23 a.m.