dbnorm                  package:emu                  R Documentation

_F_u_n_c_t_i_o_n _t_o _d_B-_n_o_r_m_a_l_i_s_e _s_p_e_c_t_r_a_l _o_b_j_e_c_t_s

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

     The function can be used to rescale a spectrum to a dB value at a
     particular frequency - for example, to rescale the spectrum so
     that 3000 Hz has 0 dB and all other values are shifted in relation
     to this.

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

     dbnorm(specdata, f = 0, db = 0)

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

specdata: An object of class 'spectral' 

       f: A single element vector specifying the frequency. Defaults to
          0 

      db: A single element vector specifying the dB value to which the
          spectrum is to be rescaled. Defaults to zero 

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

     An object of the same class with rescaled dB values. The default
     is to rescale the dB-values of the spectrum to 0 dB at 0 Hz.

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

     Jonathan Harrington

_S_e_e _A_l_s_o:

     'dbtopower' 'plot.spectral'

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

     # normalise to - 40 dB at 1500 Hz
     res = dbnorm(e.dft, 1500, 0)
     # compare the two
     ylim = range(c(res, e.dft))
     plot(e.dft, ylim=ylim, type="l")
     par(new=TRUE)
     plot(res, ylim=ylim, type="l", col=2)

