rotate                 package:Rsac                 R Documentation

_R_O_T_A_T_E _H_O_R_I_Z_O_N_T_A_L _C_O_M_P_O_N_E_N_T_S

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

     This function will rotate horizontal components. This is useful
     for getting the horizontal components into the tangential and
     radial components by rotating to the back azimuth from the station
     to the event. The data is truncated so that only times when values
     are defined in both components are returned.

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

     rotate(s, gcp = FALSE, phi = NULL)

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

       s: an object of class '"rsac"'. Further, it must have length 2,
          both must have the  same sampling rate (dt), and be
          orthogonal horizontal components (cmpinc = 90) at the same
          station (sta).

     gcp: logical for if components should be rotated to the "great
          circle path". If 'TRUE', then stla, stlo, evla, and evlo must
          be defined so that the back azimuth can be calculated.

     phi: if gcp is 'FALSE' then the components will be rotated
          clockwise by this angle (in radians). This is equivalent to
          the SAC command 'rotate through v'.

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

     same as input.

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

     Eric M. Thompson <eric.thompson@tufts.edu>

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

     data(srosa)

     srosa[[1]]$cmpinc
     srosa[[2]]$cmpinc
     srosa[[3]]$cmpinc

     HC <- c(srosa[2], srosa[3])
     HC[[1]]$evla <- 38.393
     HC[[1]]$evlo <- -122.633
     HC[[1]]$stla
     HC[[1]]$stlo

     TR <- rotate(HC, gcp = TRUE)

     plot(TR)

