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)

