http://geophysics.eas.gatech.edu/classes/SAC/ Rotate a pair of data. We can easily rotate a pair of data components through an angle in SAC using the "rotate" command. Each pair must have the same station name, event name, and sampling rate. The most common practice is seismology is to rotate two horizontal component seismograms to be along and perpendicular to the "great circle path" (i.e., radial and transverse component). This means that CMPAZ must be defined (0 degrees for the North component and 90 degress for the East component) and that CMPINC must be 90 degrees. See below for an example of rotating two horizontal seismograms recorded at the broadband station BK.PKD near the Parkfield section of the San Andreas fault and generated by the 2002/11/03 Mw7.9 Denali Fault earthquake in Alaska. Waveforms recorded at this and other nearby stations are used to study non-volcanic tremor in central California triggered by teleseismic events (Peng et al., GRL, 2008; Peng et al., JGR, 2009).
Note: the rotate command requires that the two horizontal component data to be the same length. Use the cut command to cut them into the same length if needed. Also please make sure that the sac headers CMPINC and CMPAZ have the correct values.
% sac
SAC> r BK.PKD.HHN.SAC # read the north component seismogram
SAC> ch CMPAZ 0 CMPINC 90 # change the incident and azimuth of the instrument to be north and horizontal
SAC> wh # save the header (the above three lines are not needed if the headers are already in)
SAC> r BK.PKD.HHE.SAC # read the east component seismogram
SAC> ch CMPAZ 90 CMPINC 90 # change the incident and azimuth of the instrument to be east and horizontal
SAC> wh # save the header (the above three lines are not needed if the headers are already in)
SAC> r BK.PKD.HHN.SAC BK.PKD.HHE.SAC # read two horizontal component seismograms
SAC> rotate to GCP # rotate to the "great circle path"
SAC> w BK.PKD.HHR.SAC BK.PKD.HHT.SAC # save the rotated data (first radial, second transverse)
SAC> r BK.PKD.HHZ.SAC BK.PKD.HHR.SAC BK.PKD.HHT.SAC # read three-component seismograms (vertical, radial and transverse)
SAC> qdp off # turn off "quick and dirty plot"
SAC> xlim 300 1500 # zoom in
SAC> p1 # plot them out, try to identify Love and Rayleigh waves