autoc                package:seewave                R Documentation

_S_h_o_r_t-_t_e_r_m _a_u_t_o_c_o_r_r_e_l_a_t_i_o_n _o_f _a _t_i_m_e _w_a_v_e

_D_e_s_c_r_i_p_t_i_o_n:

     This function returns the fundamental frequency of a harmonic time
     wave. This is achieved by computing a correlation of the signal
     with itself after a time delay.

_U_s_a_g_e:

     autoc(wave, f, wl, fmin, threshold = FALSE, plot = TRUE,
     xlab = "Time (s)", ylab = "Frequency (kHz)", ylim = c(0, f/2000), ...)

_A_r_g_u_m_e_n_t_s:

    wave: data describing a time wave.

       f: sampling frequency of 'wave'.

      wl: length of the window for the analysis (even number of
          points).

    fmin: the minimum frequency to detect (in Hz).

threshold: amplitude threshold for signal detection (in %).

    plot: logical, if 'TRUE' plots the fundamental frequency  against
          time (by default 'TRUE').

    xlab: title of the x-axis.

    ylab: title of the y-axis.

    ylim: the range of y values.

     ...: other 'plot' graphical parameters.

_D_e_t_a_i_l_s:

     Autocorrelation process can be time consuming.

_V_a_l_u_e:

     If 'plot' is 'FALSE', 'autoc' returns a vector of numeric data 
     describing the fundamental frequency in kHz. NA corresponds  to
     pause sections in the signal (see 'threshold').

_A_u_t_h_o_r(_s):

     Jrme Sueur jerome.sueur@ibaic.u-psud.fr and  Thierry Aubin
     thierry.aubin@ibaic.u-psud.fr

_R_e_f_e_r_e_n_c_e_s:

     Hopp, S. L., Owren, M. J. and Evans, C. S. (Eds) 1998. _Animal
     acoustic  communication_. Springer, Berlin, Heidelberg.

_E_x_a_m_p_l_e_s:

     data(sheep)
     # fundamental frequency of a sheep
     autoc(sheep,f=8000,wl=512,t=5,fmin=700)
     # overlay on spectrogram
     spectro(sheep,f=8000,wl=512,ovlp=75,zp=16,scale=FALSE)
     par(new=TRUE)
     autoc(sheep,f=8000,wl=512,t=5,fmin=700,type="p",col="black",pch=20,
         xaxs="i",yaxs="i",ann=FALSE,yaxt="n")
     legend(0.5,3.6,"Fundamental frequency",pch=20,col="black",bty=0,cex=0.7)

