Learn R Programming

PAMscapes (version 0.10.0)

createOctaveLevel: Create Octave Level Measurements

Description

Creates octave or third octave level measurements from finer resolution soundscape metrics, like Power Spectral Density (PSD) or Hybrid Millidecade (HMD) measures

Usage

createOctaveLevel(
  x,
  type = c("ol", "tol"),
  freqRange = NULL,
  normalized = FALSE
)

Value

a dataframe with summarised octave level band measurements

Arguments

x

dataframe of soundscape metrics

type

either 'ol' to create octave level or 'tol' to create third octave level measures

freqRange

a vector of the minimum and maximum center frequencies (Hz) desired for the output. If NULL, full available range of frequencies will be used.

normalized

logical flag to return values normalized by the bandwidth of each octave level band

Author

Taiki Sakai taiki.sakai@noaa.gov

Details

Note that these measures are not as precise as they could be, mostly meant to be used for visualizations. Bands of the original data that do not fit entirely within a single octave band are not proportionately split between the two proper output bands. Instead an output band will contain all inputs where the center frequency falls between the limits of the output band. For higher frequencies this should result in negligible differences, but lower frequencies will be more imprecise.

Examples

Run this code
psd <- loadSoundscapeData(system.file('extdata/PSDSmall.csv', package='PAMscapes'))
str(psd)
tol <- createOctaveLevel(psd, type='tol')
str(tol)
ol <- createOctaveLevel(tol, type='ol')
str(ol)

Run the code above in your browser using DataLab