trackfreqs
creates spectrograms to visualize dominant and fundametal frequency measurements (contours)
of signals selected by manualoc
or autodetec
.trackfreqs(X, wl = 512, flim = c(0, 22), wn = "hanning", pal =
reverse.gray.colors.2, ovlp = 70, inner.mar = c(5, 4, 4, 2), outer.mar =
c(0, 0, 0, 0), picsize = 1, res = 100, cexlab = 1, title = TRUE, propwidth = FALSE,
xl = 1, osci = FALSE, gr = FALSE, sc = FALSE, bp = c(0, 22), cex = c(0.8, 1),
threshold = 15, contour = "both", col = c("chartreuse3", "dodgerblue"),
pch = c(17, 16), mar = 0.05, lpos = "topright", it = "jpeg", parallel = 1)
manualoc
or
spectro
. Default is c(0, 22).ftwindow
for more options.spectro
. Default is reverse.gray.colors.2.spectro
. Default is 70.par
.par
.spectro
.TRUE
.FALSE
.spectro
. Default is FALSE
.FALSE
.FALSE
.spectro
.warbleR
from github to run parallel.
Note that creating images is not compatspecan
. Arguments that are accepted by xy.coords and can be
used for lpos are: "bottomright", "bottom", "bottomleft", "left",
"topleft", "top", "topright", "right" and "center". Setting inner.mar to
c(4,4.5,2,1) and outer.mar to c(4,2,2,1) works well when picsize = 2 or 3.
Title font size, inner.mar and outer.mar (from mar and oma) don't work well
when osci or sc = TRUE, this may take some optimization by the user.specreator
for creating spectrograms from selections,
snrspecs
for creating spectrograms to
optimize noise margins used in sig2noise
Other spectrogram.creators: dfDTW
,
dfts
, ffDTW
,
ffts
, snrspecs
,
specreator
#Set temporal folder as working directory
setwd(tempdir())
#load data
data("Cryp.soui")
writeWave(Cryp.soui, "Cryp.soui.wav") #save sound files
#autodetec location of signals
ad <- autodetec(threshold = 6, bp = c(1, 3), mindur = 1.2,
maxdur = 3, img = FALSE, ssmooth = 600)
#track dominant frequency graphs
trackfreqs(X = ad[!is.na(ad$start),], flim = c(0, 5), ovlp = 90, it = "tiff",
bp = c(1, 3), contour = "df")
# Check this folder
getwd()
#track both frequencies
trackfreqs(X = ad[!is.na(ad$start),], flim = c(0, 5), ovlp = 90, it = "tiff",
bp = c(1, 3), contour = "both")
Run the code above in your browser using DataLab