View source: R/analyze_utilities.R
getFeatureFlux | R Documentation |
Internal soundgen function
getFeatureFlux(an, thres = 0.1, smoothing_ww = 1, plot = FALSE)
an |
dataframe of results from analyze() |
thres |
threshold used for epoch detection (0 - 1) |
smoothing_ww |
if > 1, |
plot |
if TRUE, plots the normalized feature matrix and epochs |
Calculates the change in acoustic features returned by analyze() from one
STFT frame to the next. Since the features are on different scales, they are
normalized depending on their units (but not scaled). Flux is calculated as
mean absolute change across all normalized features. Whenever flux exceeds
thres
, a new epoch begins.
Returns a data frame with flux per frame and epoch numbers.
an = analyze(soundgen(), 16000)
fl = soundgen:::getFeatureFlux(an$detailed, plot = TRUE)
## Not run:
# or simply:
an = analyze(soundgen(sylLen = 500), 16000, plot = TRUE, ylim = c(0, 8),
extraContour = 'flux', flux = list(smoothWin = 100, thres = .15))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.