Last chance! 50% off unlimited learning
Sale ends in
snrspecs
creates spectrograms to visualize margins over which background noise
will be measured by sig2noise
.snrspecs(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, trel =
FALSE, propwidth = FALSE, xl=1, osci = FALSE, gr = FALSE, sc = FALSE, mar =
0.2, snrmar = 0.1, it = "jpeg", parallel = FALSE)
manualoc
or any data frame with columns
for sound file name (sound.files), selection number (selec), and start and end time of signal
(start and end).spectro
. Default is c(0, 22).ftwindow
for more options.spectro
. Default is reverse.gray.colors.2. See Details.spectro
. Default is 70.par
.par
.spectro
.TRUE
.FALSE
.FALSE
.TRUE
. Default is 1.spectro
. Default is FALSE
.FALSE
.FALSE
.TRUE
2 cores are employed. If numeric, it specifies the number of cores to be used.
Not available for windows OS.sig2noise
down the line.
Setting margins for individual calls that have been previously clipped from
larger files may take some optimization, as for calls within a
larger file that are irregularly separated. 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
in par
) don't work well
when osci or sc = TRUE
, this may take some optimization by the user.trackfreqs
for creating spectrograms to visualize
frequency measurements by specan
, specreator
for
creating spectrograms after using manualoc
Other spectrogram.creators: dfts
;
specreator
; trackfreqs
# First create empty folder
dir.create(file.path(getwd(),"temp"))
setwd(file.path(getwd(),"temp"))
data(list = c("Phae.long1", "Phae.long2"))
data(manualoc.df)
writeWave(Phae.long1, "Phae.long1.wav") #save sound.files
writeWave(Phae.long2, "Phae.long2.wav")
# make Phae.long1 and Phae.long2 spectrograms
# snrmar needs to be smaller before moving on to sig2noise()
snrspecs(manualoc.df, flim = c(0, 14), inner.mar = c(4,4.5,2,1), outer.mar = c(4,2,2,1),
picsize = 2, res = 300, cexlab = 2, mar = 0.2, snrmar = 0.1, it = "jpeg")
# make only Phae.long1 spectrograms
# snrmar now doesn't overlap neighboring signals
snrspecs(manualoc.df[grepl(c("Phae.long1"), manualoc.df$sound.files), ], flim = c(3, 14),
inner.mar = c(4,4.5,2,1), outer.mar = c(4,2,2,1), picsize = 2, res = 300, cexlab = 2,
mar = 0.2, snrmar = 0.01)
#check this folder!!
getwd()
#remove example directory
unlink(getwd(),recursive = TRUE)
Run the code above in your browser using DataLab