Thread: CUT and stack waveforms in SAC

Started: 2019-04-22 22:08:32
Last activity: 2019-04-24 15:20:16
Topics: SAC Help
Abhash Kumar
2019-04-22 22:08:32
Hi,
I have 25 waveforms that shows finite temporal moveout for a recorded
event. I want to stack these waveforms to enhance the signal. I followed
these steps:

1. picked P arrival on each of these waveforms
2. cut each waveform 2 second before and 5 seconds after their A marker
times

After cutting and saving the waveforms, I noticed that each SAC file has
different B and E times as their A marker times were different (that I used
for cutting). Though each SAC file has same length. I am wondering to use
SSS (signal stacking subprocess) to sumstack these waveforns, but it needs
fixed timewindow of certain length. I don't know how to adjust B and E
times of individual SAC files to be able to sumstack them. I would much
appreciate any suggestion in this regard.

Thanks
Abhash Kumar

  • Geo .
    2019-04-23 12:22:28
    Hi,
    If you have the same length, and don't care about the absolute time, then
    simply do,
    CHNHDR B 0
    W OVER

    to set B=0 and write over the files. E will be automatically set to a
    uniform value since your window length is the same for all seismograms.
    Make a back up before you do this.

    Januka

    Januka Attanayake
    Research Fellow | Earthquake Seismology
    Homepage: *https://sites.google.com/site/janukaattanayake
    https://sites.google.com/site/janukaattanayake*

    School of Earth Sciences | McCoy Bldg. 200
    University of Melbourne | Parkville 3010 VIC
    Australia




    On Tue, 23 Apr 2019 at 12:10, Abhash Kumar <abhash.kumar84<at>gmail.com> wrote:

    Hi,
    I have 25 waveforms that shows finite temporal moveout for a recorded
    event. I want to stack these waveforms to enhance the signal. I followed
    these steps:

    1. picked P arrival on each of these waveforms
    2. cut each waveform 2 second before and 5 seconds after their A marker
    times

    After cutting and saving the waveforms, I noticed that each SAC file has
    different B and E times as their A marker times were different (that I used
    for cutting). Though each SAC file has same length. I am wondering to use
    SSS (signal stacking subprocess) to sumstack these waveforns, but it needs
    fixed timewindow of certain length. I don't know how to adjust B and E
    times of individual SAC files to be able to sumstack them. I would much
    appreciate any suggestion in this regard.

    Thanks
    Abhash Kumar

    ----------------------
    SAC Help
    Topic home: http://ds.iris.edu/message-center/topic/sac-help/ |
    Unsubscribe: sac-help-unsubscribe<at>lists.ds.iris.edu

    Sent from the IRIS Message Center (http://ds.iris.edu/message-center/)
    Update subscription preferences at http://ds.iris.edu/account/profile/


    • Andy Nowacki
      2019-04-24 15:20:16
      Hi Abhash,

      The canonical way to do this in the signal stacking subprocess (SSS) is via the `addstack` and/or `changestack` commands, with the `delay` option. Set the delay to (T - pick_time) to align the picks at time T s.

      Since you have the pick you want to align on in header A, you can use the following macro to do this for the files currently in memory (once you are in SSS mode, invoked with the `sss` command):

      $keys hdr
      $default hdr a
      * Set the header on which to align by calling the macro with arguments 'hdr t0' for example

      do i = 1, (status nfiles)
      cs $i$ delay (0 - &$i$,$hdr$&)
      enddo

      [This macro may require SAC/BRIS (or 'MacSAC') as it uses interpolation of the file id and header name into the header access syntax (the &s).]

      You can use the `liststack` command to verify how much each file is delayed by. You can of course also write a macro to do this for a set of files on disk. There is also the `saclst` command line program which will list header values for a set of SAC files and the output from this can also be used to build a list of `addstack` commands.

      Don't forget to set the stacking window with the `tw` command, and remember that it's relative to the A marker now (so will typically include time 0 s).

      Cheers,

      Andy

      On 23 Apr 2019, at 03:23, Geo . <jattanayake<at>gmail.com> wrote:

      Hi,
      If you have the same length, and don't care about the absolute time, then simply do,
      CHNHDR B 0
      W OVER

      to set B=0 and write over the files. E will be automatically set to a uniform value since your window length is the same for all seismograms. Make a back up before you do this.

      Januka

      Januka Attanayake
      Research Fellow | Earthquake Seismology
      Homepage: https://sites.google.com/site/janukaattanayake

      School of Earth Sciences | McCoy Bldg. 200
      University of Melbourne | Parkville 3010 VIC
      Australia





      On Tue, 23 Apr 2019 at 12:10, Abhash Kumar <abhash.kumar84<at>gmail.com> wrote:
      Hi,
      I have 25 waveforms that shows finite temporal moveout for a recorded event. I want to stack these waveforms to enhance the signal. I followed these steps:

      1. picked P arrival on each of these waveforms
      2. cut each waveform 2 second before and 5 seconds after their A marker times

      After cutting and saving the waveforms, I noticed that each SAC file has different B and E times as their A marker times were different (that I used for cutting). Though each SAC file has same length. I am wondering to use SSS (signal stacking subprocess) to sumstack these waveforns, but it needs fixed timewindow of certain length. I don't know how to adjust B and E times of individual SAC files to be able to sumstack them. I would much appreciate any suggestion in this regard.

      Thanks
      Abhash Kumar

      ----------------------
      SAC Help
      Topic home: http://ds.iris.edu/message-center/topic/sac-help/ | Unsubscribe: sac-help-unsubscribe<at>lists.ds.iris.edu

      Sent from the IRIS Message Center (http://ds.iris.edu/message-center/)
      Update subscription preferences at http://ds.iris.edu/account/profile/

      ----------------------
      SAC Help
      Topic home: http://ds.iris.edu/message-center/topic/sac-help/ | Unsubscribe: sac-help-unsubscribe<at>lists.ds.iris.edu

      Sent from the IRIS Message Center (http://ds.iris.edu/message-center/)
      Update subscription preferences at http://ds.iris.edu/account/profile/


00:44:43 v.b4412d20