Home
        AIMBAT User Manual Version 0.1.1
         Contents
1.      s 3  sort by COH     s t  sort by time pick difference     8 az  sort by azimuth    21    e  s baz  sort by back azimuth    e  s dist  sort by epicentral distance    Other SAC headers also work with the   s  option  Default sorting order is increase  Append      to make it decrease order  such as     s t      Sorting by time pick difference  57      oT   in    both increase and decrease orders are useful in detecting cycle skipping   Usage  ttpick py  options    sacfile s  or a picklefile      Options    h    help show this help message and exit   f FILL    fill FILL Fill shade seismogram with positive  1  or negative  C 1  signal  Default is none  0     r RELTIME    relative time RELTIME  Relative time to a time pick header  t0 t9   Default  is  1  None  use absolute time      u    upylim Update ylim every time of zooming in    k    pick Plot time picks    w    twin Plot time window      x XLIMIT    xlimit XLIMIT  Left and right x axis limit to plot     y YNORM    ynorm YNORM  Normalize ydata of seismograms  Effective only for  positive number  Default is 2 000000     Y    ynormtwin Normalize seismogram within time window     5 SRATE    srate SRATE  Sampling rate to load SAC data  Default is None  use  the original rate of first file      b    boundlines Plot bounding lines to separate seismograms    n    netsta Label seismogram by net sta code instead of SAC file  name      m MAXNUM    maxnum MAXNUM  Maximum number of selected and deleted seismograms to  plot  Defaults
2.     3 2 2 Python Pickle for SAC Files    The pysmo sacio module converts SAC files to sacfile objects  Any modification of the ob   jects are instantly written to files  In data processing  the user may want to abandon changes  made earlier  which brings the need of a buffer for the sacfile objects  The SacDataHdrs  class in the pysmo aimbat sacpickle module is written on top of pysmo sacio to serves  this purpose by reading a SAC file and returning a sacdh object that is very similar of the  sacfile object  Essentially  the sacdh object is a copy of the the sacfile object in the  memory  except that SAC headers  t0 t9    user0 user9    kuserO   kuser2  are saved in three  Python lists  A gsac object of the SacGroup class consists of a group of sacdh objects from  event based SAC data files  earthquake hypocenter information and station locations  An    additional step is required to save changes in the gsac object to files     In order to avoid frequent SAC file I O  the pickle cPickle module is used for serializing    and de serializing the gsac object structure     Thus the data processing efficiency is improved    10    because reading and writing of SAC files are done only once each before and after data  processing  Script sac2pkl py does the conversions between SAC files and Python pickles   Its usage message can be printed out by running  sac2pkl py  h  at command line and  the result is displayed in Figure 3  For example  in the data example directory  lt example    
3.    VU      i L    1 1   a                  7   Vv    i     d       r   t j  r t    os i   gt    go O C O n      n o rc z m ATE TTA  1   f      2         J I I    I    TT  j             foor em E E   oot sem    Figure 16   A  Run MCCC by clicking the MCCC Button  Relative time pick is changed  from T2 to T3   B  Sort seismograms by time pick difference in decrease order by running   ttpick py 20110915 19310408 bhz pkl  x  10 10  r3  sdist      25    4 Appendix    A List of Files and Directories in the Packages    pysmo sSac     Setup py  src pysmo sac    sacio py  sacfunc py  sacmeth py    pysmo aimbat     Setup py  src pysmo aimbat    algiccs py  algmccc py  pickphase py  plotphase py  plotutils py  qualctrl py  qualsort py  sacpickle py  ttconfig py  ttdefaults conf    26    XCOIr py  xcorrf 90  xcorrf90 so    scripts     egaligni py  egalign2 py  egplot py    egsac py  iccs py    mccc py  sac2pkl py    sacpl py    sacp2 py  sacpaz py    sacpbaz py  sacplot py  sacppk py  sacprs py  ttpick py    example Event_2011 09 15 19 31 04 08     References    Goldstein  P   D  Dodge  M  Firpo  and L  Minner  2003   SAC2000  Signal processing and    analysis tools for seismologists and engineers  International Geophysics  81  1613 1614     Hunter  J   2007   Matplotlib  A 2D Graphics Environment  Computing in Science  amp  Engi   neering  3 9   90 95     Lou  X   S  van der Lee  and S  Lloyd  2012   A Python Matplotlib Tool for Measuring    Teleseismic Body Wave Arrival Times  Seismolo
4.    gsac saclist   prs   sacprs saclist  opts  axpQ       pl   opts ynorm   1 7    pl   sacpl saclist  opts  axp1      p2   opts reltime   0   p2   sacp2 saclist  opts  axp2      set x limits   axp   set xlim 625  762    axpl set xlim 625  762    axp2 set xlim  45  65      numbering   axs   Laxp   axpl  axp2    labs    ABC    for ax  lab in zip axs  labs    tt         lab        trans   transforms blended transform factory ax transAxes  ax transAxes   ax text    5  1  tt  transform trans  va  center   ha  right   size 16     fig savefig  egplot png   format  png   dpi 300   show     Figure 6  The  lt pkg install dir gt  pysmo aimbat 0 1 1 scripts egplot py script  which produces Figure 7     14          TA 121A  87 TA CO6D  TA BO5D  86  85 ARIE    Ap TAFOD     84 i      SIG VT GEARS ER TA 49545  E AAA   an TA IOAA  A 83 282 8 77 Gru quum TA  KO4IR  w NU IV ZL  B5              TAA   81  80  640 660 680 700 720 740 760  Time  s    B   1 TA 109C  2 TA 121A  3 TA 214A  4 TA A04D  5 TA BO5D  6 TA CO6D  7 TA D03D  L 8 TA D04D  9 9 TA EO4D      10 TA FO04D  511 TA FO5D     12 TA GO5D   0j  o 13  is 14 TA I02D  15 TA IO3D  16 TA IOAA  17 TA I05D  18 TA JO1D  19 TA JO4D  20 TA JO5D  21 TA KO2D  22 TA KO4D  640 660 680 700 720 740 760  1e   5 Time  s    C  1 5       Time   TO  s     Figure 7  Example of plotting multiple SAC files in  A  record section   B  SAC pl style   and  C  SAC p2 style  This figure is the random color version of Figure 1 in Lou et al    2012      15    Input data
5.   25 and 5     s SORTBY    sortby SORTBY  Sort seismograms by 1  file indices   or 0 1 2 3   quality factor all ccc snr coh   or a given header  Caz baz dist     Append   for decrease order   otherwise increase  Default is 1     Figure 5  Help message of the sacppk py script     3 3 1 SAC Plotting    Options     i   z   d   a  and  b    of sacplot py set the seismogram plotting baseline as file  index  zero  epicentral distance in degrees  azimuth  and back azimuth  respectively  The  user can run sacplot py directly with the options  or run individual scripts sacp1 py   Sacp2 py  sacprs py  sacpaz py  and sacpbaz py which preset the baseline options and  plot seismograms in SAC pl style  p2 style  record section  and relative to azimuth and    back azimuth  The following commands are equivalent     sacplot py  i  lt   sacpl py    13    sacplot py  z  lt  gt  sacp2 py  sacplot py  d  lt  gt  sacprs py  sacplot py  a  lt  gt  sacpaz py  sacplot py  b  lt  gt  sacpbaz py    from pylab import     import matplotlib transforms as transforms   from pysmo aimbat sacpickle import LoadData   from pysmo aimbat plotphase import getData0pts  PPConfig  sacpl  sacp2  sacprs      figure axes   fig   figure figsize  9 12    rectp      09   050   8   15   rectp1     09   245   8   33   rectp      09   620   8   36     axp2   fig add axes rectp2   axpl   fig add axes rectp1   axp     fig add axes rectpQ0       read data and plot   gsac  opts   getData0pts       prs   opts ynorm    95   saclist
6.   37 and 3     p PHASE    phase PHASE  Seismic phase name  P S      s SORTBY    sortby SORTBY  Sort seismograms by 1  file indices   or 0 1 2 3   quality factor all ccc snr coh   or t  time pick  diff   or a given header  az baz dist     Append   for  decrease order  otherwise increase  Default is 1     t TWCORR    twcorr TWCORR  Time window for cross correlation  Default is   15 0     15 0  s   g    savefig Save figure instead of showing     Figure 11  Help message of the ttpick py script     22    To start the GUI  run  ttpick py 20110915 19310408 bhz pkl  t  10 10  s1    in the data example directory  lt example event dir gt  and the screen shot is displayed in  Figure 12  The   t  10 10  option specifies an initial time window of   10 10  seconds around  the initial time pick to run ICCS  More screen shots along the data processing workflow are    shown in Figures 13 16  See the captions for commands and descriptions     L  0  O    5       Figure 12  Screen shot of data processing initiated by running command  ttpick py  20110915 19310408 bhz pkl  t  10 10  s1  x  30 30   Initial time window W         10 10  s  The     x  30 30    option sets the time axis range to be   30  30  s  Seismo   grams are sorted by CCC     23          d    I       o     rrreoes  F 05430    bE RE Ei  ale i  Sl    d3dddd                             t    j     Ji       th                  OOF FCM       Figure 13   A  Delete station UW WOOD and rerun ICCS step  a  by clicking the ICCS A  Button   B
7.   Pick phase emergence on the array stack for measuring absolute arrival times   Choose a smaller time window W        2 7 2 9  s for refined alignment  Click the Sync  Button to get 277 and time window for each seismogram             A         T    PELL BT    gt   f    i    ooo    o            AAN  os   BENE e ERE H Dn aa ae   E E    F       STEELERS eee  EEEILLL  TELE  ES LL EROS E         il  ih                    TM       Mi                Figure 14   A  Run ICCS step  c  by clicking the ICCS B Button  Relative  time pick is changed from T1 to T2   B  Quit GUI and restart with  ttpick py  20110915 19310408 bhz pkl  x  20 20  r2  s0  which sorts seismograms by weighted   average of three quality factors     24       j  fi          un    na  i    TTT    M  Mi       i             e RN d      4 ELI a Ore aa i nam    Figure 15   A  Sort seismograms by time pick difference in increase order  by running  ttpick py 20110915 19310408 bhz pkl  x  10 10  r2  st    B  Sort  seismograms by time pick difference in decrease order by running  ttpick py  20110915 19310408 bhz pkl  x  10 10  r2  st               i                D                        MN Bn                   F FIF     EF bja I  FF H  EE   tie t  4  dz dz H H Hll gi     Bi l      FT   r  D           u       A   J    ATA IY        7 j   A       ITEM         i    M                              1                       B     EB BL ILrI      Ves    EF H f  SER HE Sle ele   oe le   LOE Lh le  j     ll                          i
8.  aimbat algiccs  and pysmo aimbat algmccc  and can be executed in scripts iccs py and mccc py  respec     tively  Usages are displayed in Figures 9 and 10     3 4 2 Interactive Quality Control and Graphical User Interface    In practical data processing  there is a constant need of seismogram quality control  which  is mixed with the procedure described above  ICCS steps  a    b   and  c  are likely to be  applied multiple times after removing low quality seismograms  To facilitate quality con   trol  ICCS calculates three quality factors for each seismogram  cross correlation coefficient   CCC   signal to noise ratio  SNR   and time domain coherence  COH   The     a    and       A    modes of iccs py can remove seismograms with low qualities and rerun ICCS until all    seismograms meet the minimum requirements specified by the     q    option     A GUI is also designed to run both ICCS and MCCC and perform interactive quality con   trol  It is implemented in module pysmo aimbat qualctrl and script ttpick py based on  pysmo aimbat pickphase and four Buttons for the four step procedure  The quality control  operation is the same as sacppk py  The user can interactively switch the selection status  of a seismogram by mouse clicking on the waveform  In order to efficiently delete low quality    seismograms  different attributes listed below are used as sorting criteria     e  s 0  sort by user defined weighted average of CCC  SNR and COH     s 1  sort by CCC     s 2  sort by SNR
9.  aimbat pickphase     17    A major improvement over SAC is picking a time window in addition to time picks  Pressing  the    w    key to save the current time axis range to two user defined SAC header variables  A    transparent green span is plotted within the time window  Figure 8      Another major improvement involves quality control with convenient operations to  de select  seismograms  In the GUI in Figure 8  there are two divisions of selected and deleted seismo     grams  Selected seismograms with a positive trace number are displayed with blue wiggles        while deleted seismograms with negative trace numbers are plotted in gray     The user can  simply click on a certain seismogram to switch the selection status  either to exclude it or  bring it back for inclusion  The trace selection status is stored in a user defined SAC header    variable     In SAC  command  ppk p 10    plots 10 seismograms on each page  Pressing the    b    and   n  keys to navigate through pages  The number of seismograms plotted on each page is  controlled by command line option   m maxsel maxdel    for sacppk py  The Prev and Next  Buttons are for page navigation and the Save Button saves the change in time picks and  time window to files  The default values for maxsel and maxdel are 25 and 5  which means  a maximum of 30 seismograms on each page  In Figure 8  there are 26 seismograms on  the first page because only 1 seismogram is deleted  On next page  there are 30 selected    seismogr
10.  by lapack  Type of lsqr solution  weighted by residual  solved by lapack  Configuration file for MCCC parameters  deprecated    File for event hypocenter and origin time  deprecated        Taper type  Taper width    Table 1  Example of AIMBAT configuration file ttdefaults conf     3 2 SAC Data Access  3 2 1 Python Object for SAC Files    The pysmo sac package is developed to read and write individual SAC files     The Python    class sacfile of module sacio opens a SAC file and returns an object including data and all    SAC header variables as its attributes  Modifications of object attributes are saved to file     It is written purely in Python so that it also runs with Jython  http   www  jython  org      The  lt pkg install dir gt  pysmo aimbat 0 1 1 scripts egsac py script  Figure 1  gives  a simple example to read  resample and plot a seismogram using pysmo  Scipy and Mat   plotlib  You can type the codes in a Python iPython shell  or run as a script in the directory   lt pkg install dir gt  pysmo aimbat 0 1 1 example Event_2011 09 15 19 31 04 080  re     ferred to as  lt example event dir gt  hereafter      from pysmo sac sacio import sacfile   from numpy import Linspace  array   from scipy import signal   import matplotlib pyplot as plt   import matplotlib transforms as transforms      read sac file    ifilename    TA 109C __ BHZ sac    sacobj   sacfile ifilename   rw     b   sacobj b   npts   sacobj npts   delta   sacobj delta   X   linspace b  b npts delta  npts   
11.  event dir gt   run  sac2pkl py  s  Z  o 20110915 19310408 bhz pkl  d 0 025    to read 163 vertical component seismograms at a sample interval of 0 025 s and convert to  a gsac object which is saved in the pickle file 20110915 19310408 bhz pkl     To save disk space  compressed pickle files in gz and bz2 formats can be generated by     sac2pkl py  s  Z  o 20110915 19310408 bhz pkl  d 0 025  z gz  sac2pkl py  s  Z  o 20110915 19310408 bhz pkl  d 0 025  z bz2    at the cost of more CPU time     After processing  run  sac2pkl py 20110915 19310408 bhz pkl  p    to convert the pickle file to SAC files     Usage  sac2pkl py  options   lt sacfile s  gt     Options    h    help show this help message and exit   Ss    s2p Convert SAC files to pickle file  Default is True    p    p2s Convert pickle file  save headers  to SAC files      d DELTA    delta DELTA   Time sampling interval  Default is  1 000000   o OFILENAME    ofilename OFILENAME   Output filename which works only with  s option    z ZIPMODE    zipmode ZIPMODE   Zip mode  bz2 or gz  Default is None     Figure 3  Help message of the sac2pk1 py script     See the doc string of pysmo aimbat sacpickle  type  from pysmo aimbat import sacpickle   print sacpickle   doc   in a Python shell  and http   docs python org library     pickle html for more information about the Python data structure  pickling and unpickling     11    3 3 SAC Plotting and Phase Picking    SAC plotting and phase picking functionalities are replicated and enh
12.  files need to be supplied to the scripts in the form of either a list of SAC files  or a pickle file which includes multiple SAC files  For example  a    bhz pkl    file is generated    from 22 vertical component seismograms    TA  1 K  Z    by running   sac2pkl py TA   1 K  BHZ  o bhz pkl  d0 025    in the data example directory  lt example event dir gt   Then the two commands are equiva     lent   sacpi py TA  1 K  Z  lt   sacpl py bhz pkl    For large number of seismograms  the pickle file is suggested because of faster loading     Besides using the standard sacplot py script  the user can modify its getAxes function in  your own script to customize figure size and axes attributes  Script egplot py  Figure 6  is  such an example in which SAC pl  p2 styles and record section plotting are drawn in three    axes in the same figure canvas  Run  egplot py TA  1 K  Z  f1  C    at command line to produce Figure 7  The     C    option uses random color for each seismo   gram  The     f1    option fills the positive signals of waveform with less transparency  In the  script   opts ynorm  sets the waveform normalization and  opts reltime 0  sets the time    axis relative to time pick t0     An improvement over SAC is that the program outputs the filename when the seismogram is  clicked on by the mouse  This is enabled by the event handling API and is mostly introduced  for use in SAC p2 style plotting when seismograms are plotted on top of each other  It is    especially useful whe
13.  or a picklefile gt     Options     h    help show this help message and exit    S SRATE    srate SRATE  Sampling rate to load SAC data  Default is None  use  the original rate of first files     1 IPICK    ipick IPICK  SAC header variable to read input time pick     w WPICK    wpick WPICK  SAC header variable to write output time pick     t TWCORR    twcorr TWCORR  Time window for cross correlation  Default is   15 0   15 0  s     f FSTACK    fstack FSTACK  SAC file name to save final array stack      p    plotiter Plot array stack of each iteration     d    auto on Run ICCS and select delete seismograms automatically     A    auto on all Run ICCS with  a option but initially use all  seismograms      q MINQUAL    minqual MINQUAL  Minimum quality factor  ccc snr coh  for auto  selection  Defaults are 0 50 0 50 0 00     n MINNSEL    minnsel MINNSEL  Minimum number of selected seismograms for auto  selection  Default is 5     Figure 9  Help message of the iccs py script     19    MCCC in a four step procedure using four anchoring time picks of   17   97   and 37       a  Coarse alignment by ICCS   b  Pick phase arrival at the array stack   c  Refined alignment by ICCS     d  Final alignment by MCCC    The input and output time picks for the steps  a    c  and  d  and their corresponding SAC  headers are listed in    Table 2  The one time manual phase picking at the array stack in  step  b  allows the measurement of absolute arrival times  The detailed methodology and    proced
14.  y   array sacobj data      resample    deltanew   2 0   nptsnew   int round npts delta deltanew     x2   linspace b  b npts delta  nptsnew    y2   signal resample y  nptsnew      plot    fig   plt figure figsize  12 4     ax   fig add subplot 111    trans   transforms blended transform factory ax transAxes  ax transAxes   plt plot x  y   b    Labelz Delta    0  3f  s  format delta    plt plot x2  y2  r     label  Delta       3f  s  format deltanew    plt xlabel  Time  s      plt legend loc 2    plt ticklabel format style  sci   scilimts  8 0   axis  vy    ax text 0 98  0 9  ifilename  transform trans  va  center   has right    plt subplots adjust left 9 05 right 0 98 bottom 0 13 top 0 9   plt xlim 6900 900    plt ylim  1 2e 5 1 8e 5        fig savefig  egsac png   format  png   dpi 300   plt show C     Figure 1     The  lt pkg install dir gt  pysmo aimbat 0 1 1 scripts egsac py script  which produces Figure 2     In this example  a SAC file named TA 109C __ BHZ sac is read in as a sacfile object     The  time array is calculated from SAC headers  The data array is resampled from interval 0 025    to 2 0 seconds using Scipy   s signal processing module  Result is displayed in Figure 2     Add the following codes to write the resampled seismogram to file TA 109C __ BHZ sac     sacobj delta   deltanew    sacobj npts   nptsnew    y2    sacobj data    TA 109C   BHZ sac       600 650 700 750 800 850 900  Time  s     Figure 2  Example of reading  resampling and plotting a SAC file 
15. AIMBAT  User Manual  Version 0 1 1    Xiaoting Lou       Department of Earth and Planetary Sciences  Northwestern University   Evanston  Illinois  USA       Email  clou u northwestern  edu    October 1  2012    Contents    1 Introduction 2  2 Installation 3  2 1 Install Dependencies                       2 rrr 3  DA WEG Bee tee ee ae ee ee eee eee eee ee eee ek eee 3   B1 I ex 9o9  9 099 2  mom neha Gee EON SON OSOBUR e PB e S 4   2 2 Install pysmo sac and pysmo   imbat                 llle 4  LRORMEMLS bcn   oe ae bee eR eRe ee eee Se 5   22 2 Tastal primo ampat   2 424 444 6 64248 o6 Boe tae wee a a 5   3 Tutorial 7  ol Parameter Conieuralioni  gt  s s s om ox o9 owe wee we See eee Drug kia T  por I Da A og eee HR eae ee SEHR EES 8  3 2 1 Python Object for SAC Files 2 264082 22 8682   he R ee 53 25 8   3 2 2 Python Pickle for SAC Files            2 22 lel 10   3 6 SAC Plotting and Phase Picking      5 222292 9 4  3s 12  GE BAC PINE sesede raas era temea Eee et 13   332 PAC Phase Pekini sa sos spaa pedr x RU FEX REOS UE RE S 16   3 4 Measuring Teleseismic Body Wave Arrival Times                 19  3 4 1 Automated Phase Alignment                        19   3 4 2 Interactive Quality Control and Graphical User Interface         21   4 Appendix 26  A List of Files and Directories in the Packages 26    1 Introduction    AIMBAT  Automated and Interactive Measurement of Body wave Arrival Times  is an open   source software package for efficiently measuring teleseismic body wave a
16. ams  To plot 50 seismograms on each page  run  sacppk py 20110915 19310408 bhz pkl  w  m 45 5    and there would be 4 total pages and 13 seismograms on the last page     lo plot seismograms relative to time pick t0 and fill the positive and negative wiggles of    waveform  run  sacppk py 20110915 19310408 bhz pkl  w  rO  f1  lo sort seismograms by epicentral distance in increase and decrease orders  run    sacppk py 20110915 19310408 bhz pkl  w  sdist  sacppk py 20110915 19310408 bhz pkl  w  sdist     sorting by azimuth and back azimuth is similar     sacppk py 20110915 19310408 bhz pkl  w  saz  sacppk py 20110915 19310408 bhz pkl  w  sbaz    18    3 4 Measuring Teleseismic Body Wave Arrival Times    The core idea in using AIMBAT to measure teleseismic body wave arrival times has two  parts  automated phase alignment and interactive quality control  The first part reduces    user processing time and the second part retains valuable user inputs     3 4 1 Automated Phase Alignment    The ICCS algorithm calculates an array stack from predicted time picks  cross correlates    each seismogram with the array stack to find the time lags at maximum cross correlation        then use the new time picks to update the array stack in an iterative process  The MCCC  algorithm cross correlates each possible pair of seismograms and uses a least squares method    to calculate an optimized set of relative arrival times  Our method is to combine ICCS and    Usage  iccs py  options    sacfile s 
17. anced based on the  GUI neutral widgets  such as Button and SpanSelector  and the event  keyboard and  mouse events such as key press event and mouse motion event  handling API of Mat   plotlib  Hunter  2007   They are implemented in two modules pysmo aimbat plotphase  and pysmo aimbat pickphase  which are used by corresponding scripts sacplot py and    sacppk py executable at command line  Their help messages are displayed in Figures 4 and          Usage  sacplot py  options    sacfile s  or a picklefile     Options      h       help show this help message and exit     f FILL    fill FILL Fill shade seismogram with positive  1  or negative    1  signal  Default is none  0       r RELTIME    relative time RELTIME     U      k      W 5    Relative time to a time pick header  t0 t9   Default    is  1  None  use absolute time       upylim Update ylim every time of zooming in     pick Plot time picks     twin Plot time window      x XLIMIT    xlimit XLIMIT   Left and right x axis limit to plot     y YNORM    ynorm YNORM  Normalize ydata of seismograms  Effective only for  positive number  Default is 2 000000      ynormtwin Normalize seismogram within time window     S SRATE    srate SRATE   Sampling rate to load SAC data  Default is None  use     Y      a    b    d      D     ai     m i     5   a    the original    azim Set baseline      bazim Set baseline of seismograms as backazimuth      dist Set baseline of seismograms as epicentral distance in  degree      distkm Set baselin
18. e of seismograms as epicentral distance in  km      index Set baseline of seismograms as file indices  SAC P1  style       zero Set baseline of seismograms as zeros  SAC P2 style       stack_mean Plot mean stack of seismograms      stack_std Plot std of mean stack of seismograms with color fill      color Use random colors     rate of first file     azimuth     of seismograms as    Figure 4  Help message of the sacplot py script     12    Usage  sacppk py  options    sacfile s  or a picklefile      Options    h    help show this help message and exit   f FILL    fill FILL Fill shade seismogram with positive  1  or negative    1  signal  Default is none  9     r RELTIME    relative time RELTIME  Relative time to a time pick header  t0 t9   Default  is  1  None  use absolute time      u    upylim Update ylim every time of zooming in    k    pick Plot time picks    w    twin Plot time window      x XLIMIT    xlimit XLIMIT  Left and right x axis limit to plot     y YNORM    ynorm YNORM  Normalize ydata of seismograms  Effective only for  positive number  Default is 2 000000     Y    ynormtwin Normalize seismogram within time window     S SRATE    srate SRATE  Sampling rate to load SAC data  Default is None  use  the original rate of first file      b    boundlines Plot bounding lines to separate seismograms    n    netsta Label seismogram by net sta code instead of SAC file  name      m MAXNUM    maxnum MAXNUM  Maximum number of selected and deleted seismograms to  plot  Defaults
19. gical Research Letters  in revision     VanDecar  J  C   and R  S  Crosson  1990   Determination of teleseismic relative phase arrival  times using multi channel cross correlation and least squares  Bulletin of the Seismological  Society of America  80 1   150 169     2f    
20. ll Dependencies    The AIMBAT package depends on the standard libraries of Python 2 7  http   docs   python  org library    including os  sys  ConfigParser argparse   optparse  contextlib   pickle cPickle  gzip  and bz2  AIMBAT also utilizes Numpy  http   numpy scipy org   and Scipy  http   scipy org  for numerical array computation  and Matplotlib  Hunter   2007  for 2 D plotting and GUI applications  These packages need to be installed before  using AIMBAT     2 1 1 Mac    For Mac users  we recommend Macports  http   http   www macports org   to install       the dependent packages of AIMBAT  After installing Macports  run the following commands    with superuser privilege     port install python27   port install py2  numpy   port install py2  scipy   port install py2  matplotlib  port install py2  ipython  port install python_select    Python 2 7 is thus installed to the  lt prefix gt  directory  which is  opt local Library   Frameworks Python framework Versions 2 7 for this case  Corresponding packages Numpy   Scipy and Matplotlib are installed to the global site packages directory  lt prefix gt  lib   python2 7 site packages     Installation of the last two packages are optional  ipython is an enhanced interactive Python    shell  python_select is used to select default Python version by the following command     port select   set python python27    2 1 2 Linux    For Linux users  package management tools work similarly  such as yum on Red Hat Fedora    system     yum in
21. n a large number of seismograms create difficulties in labeling     Another improvement is easier window zooming enabled by the SpanSelector widget and  the event handling API  Select a time span by mouse clicking and dragging to zoom in a    waveform section  Press the    z    key to zoom out to the previous time range     3 3 2 SAC Phase Picking    SAC plotting  pysmo aimbat plotphase  does not involve change in data files but phase  picking  pysmo aimbat pickphase  does  A GUI is built for user to interactively pick phase    arrival times  Figure 8 is an example screen shot running    16    sacppk py 20110915 19310408 bhz pkl  w    in the data example directory  lt example event dir gt         Figure 8  Screen shot of running  sacppk py 20110915 19310408 bhz pkl  w   First 25  out 162 selected seismograms and 1 deleted seismogram are plotted on the first page  Click  the Prev and Next Buttons to navigate through the total 6 pages     Following SAC convention  the user can set a time pick by pressing the  t  key and number  keys    0 9     The x location of the mouse position is saved to corresponding SAC head   ers  t0 t9      Time window zooming in pysmo aimbat pickphase is implemented in the  same way as in pysmo aimbat plotphase to replace SAC   s combination of the  x  key and  mouse click  Zooming out key is set to    z    because the  o  key is used for another pur   pose by Matplotlib  The filename printing out by mouse clicking feature is also available in    pysmo
22. otlib works with six GUI  Graphical User Interface  toolkits  WX  Tk  Qt 4   GTK   Fltk and macosx  http   matplotlib org contents html   The GUI of AIMBAT utilizes  GUI neutral widgets and GUI neutral event handling API  Application Programming In   terface  to support interactive plotting  http    matplotlib org api widgets_api html   http   matplotlib org users event handling html   Examples given in this manual  are using the default toolkit Tk and backend TkAgg  See http   matplotlib org faq   usage faq htmls amp what is a backend and http    matplotlib org users customizing   html customizing matplotlib for explanation of the backend and how to customize it  In    short  put the following line in your matplotlibrc file   backend   TkAgg  Agg rendering to a Tk canvas    Other parameters for the package can be set up by a configuration file ttdefaults conf   which is interpreted by the module ConfigParser  This configuration file is searched in the    following order    1  file ttdefaults conf in the current working directory   2  file  aimbat ttdefaults conf in your HOME directory     3  a file specified by environment variable TTCONFIG     4  file ttdefaults conf in the directory where AIMBAT is installed    An example of the ttdefaults conf file and its explanations are given in Table 1     Python scripts in the  lt pkg install dir gt  pysmo aimbat 0 1 1 scripts can be executed  from the command line  The command line arguments are parsed by the optparse module  to imp
23. rove the scripts    flexibility  If conflicts existed  the command line options override the  default parameters given in the configuration file ttdefaults conf  Run the scripts with    the   h  option for the usage messages     File ttdefaults conf     sacplot    colorwave   blue  colorwavedel   gray  colortwfill   green  colortwsele   red  alphatwfill   0 2  alphatwsele   0 6    npick   6   pickcolors   kmrcgyb  pickstyles        figsize   8 10    rectseis   0 1 0 06 0 76 0 9  minspan   5  srate      l     sachdrs    twhdrs   user8 user9   ichdrs   tO t1 t2   mchdrs     t2 t3   hdrsel     kuserO   qfactors     ccc snr coh  qheaders   user   userl user2    qweights   0 3333 0 3333 0 3333     ices    srate    1   xcorr_modu   xcorrf90  xcorr_func   xcorr fast  shift   10   maxiter   10   convepsi   0 001  convtype   coef  stackwgt   coef   fstack   fstack sac     mccc    srate      1   ofilename     mc   xcorr  modu   xcorrf90  xcorr_func   xcorr faster  shift     10   extraweight     1000   Isqr   nowe     lsqr   Inco     lsqr   Inre   rcfile    mcccrc   evlist     event list     signal   tapertype     hanning  taperwidth   0 1    Description    Color of waveform   Color of waveform which is deselected   Color of time window fill   Color of time window selection   Transparency of time window fill   Transparency of time window selection   Number of time picks  plot picks  t0 t5    Colors of time picks   Line styles of time picks  use second one if ran out of color   Figure si
24. rrival times for large  seismic arrays  Lou et al   2012   It is based on a widely used method called MCCC  Multi   Channel Cross Correlation  developed by VanDecar and Crosson  1990   The package is  automated in the sense of initially aligning seismograms for MCCC which is achieved by  an ICCS  Iterative Cross Correlation and Stack  algorithm  Meanwhile  a GUI  graphical  user interface  is built to perform seismogram quality control interactively  Therefore  user  processing time is reduced while valuable input from a user s expertise is retained  As  a byproduct  SAC  Goldstein et al   2003  plotting and phase picking functionalities are    replicated and enhanced        Modules and scripts included in the AIMBAT package were developed using Python pro   gramming language  http   www python org  and its open source modules on the Mac  OS X platform since 2009  The original MCCC code  VanDecar and Crosson  1990  was  transcribed into Python  The GUI of AIMBAT was inspired and initiated at the 2009  EarthScope USArray Data Processing and Analysis Short Course  http    www iris edu   hq es course    AIMBAT runs on Mac OS X  Linux Unix and Windows thanks to the  platform independent feature of Python  It s been tested on Mac OS 10 6 8 and 10 7 and  Fedora 16     The AIMBAT software package is distributed under the GNU General Public License Version  3  GPLv3  as published by the Free Software Foundation  http    www gnu org licenses   gpl html      2 Installation    2 1 Insta
25. site packages     python setup py install   user    2 2 2 Install pysmo aimbat    Three sub directories are included in the  lt pkg install dir gt  pysmo aimbat 0 1 1 direc   tory  example  scripts and src  which contain example SAC data files  Python scripts to    run at command line  and Python modules to install  respectively     The core cross correlation functions in pysmo aimbat are written in both Python Numpy   xcorr py  and Fortran  xcorr f90   Therefore  we need to use Numpy   s Distutils  module for enhanced support of Fortran extension  The usage is similar to the standard    Distutils     In the directory  lt pkg install dir gt  pysmo aimbat 0 1 1  type    python setup py build   fcompiler gfortran  python setup py install    to install the src directory to  lt prefix gt  lib python2 7 site packages pysmo aimbat     Other Fortran compilers can be specified instead of gfortran     Add  lt pkg install dir gt  pysmo aimbat 0 1 1 scripts to environment variable PATH in  a shell s start up file for command line execution of the scripts  Typically for Bash and C    shell users  type    export PATH  PATH  lt pkg install dir gt  pysmo aimbat 0 1 1 scripts  setenv PATH  PATH  lt pkg install dir gt  pysmo aimbat 0 1 1 scripts    in  bashrc and  cshrc files  respectively     To test the installation of the pysmo sac and pysmo aimbat packages  type    from pysmo import sac    from pysmo import aimbat    in a Python shell     3 Tutorial    3 1 Parameter Configuration    Matpl
26. stall python x86_64  yum install numpy x86 64  yum install scipy x86_64  yum install python matplotlib x86_64    and aptitude on Debian system     aptitude install python   aptitude install python numpy  aptitude install python scipy  aptitude install python matplotlib    The   prefix   directory is  usr     2 2 Install pysmo sac and pysmo aimbat    AIMBAT is released as a sub package of pysmo in the name of pysmo aimbat along with  another sub package pysmo sac  The latest releases of pysmo sac and pysmo aimbat are    available for download at both  http   www earth northwestern edu  xlou aimbat html  and github     https   github com pysmo sac  https   github com pysmo aimbat    Decompress the gzipped source tar balls in the directory where you want to install the    packages   lt pkg install dir gt       tar zxvf pysmo sac 0O 5 tar gz    tar zxvf pysmo aimbat 0 1 1 tar gz    2 2 1 Install pysmo sac    Python module Distutils is used to write a setup py script to easily build  distribute  and  install pysmo sac  In the directory  lt pkg install dir gt  pysmo sac 0 5  type    python setup py build  python setup py install    to install it and its package information file pysmo sac 0 5 py2 7 egg info to the global  site packages directory  lt prefix gt  lib python2 7 site packages  which is the same as  Numpy  Scipy  and Matplotlib     If you don t have write permission to the global site packages directory  use the    user     option to install to   userbase   lib python2 7 
27. ure can be found in Lou et al   2012      Usage  mccc py  options    sacfile s  or a picklefile gt     Options    h    help show this help message and exit   S SRATE    srate SRATE  Sampling rate to load SAC data  Default is None  use  the original rate of first file    W WINDOW    window WINDOW  Use a correlation window length in seconds    I INSET    inset INSET  Use a time length of inset seconds from initial pick  time to start of correlation window    T TAPER    taper TAPER  Apply a Hanning taper with width of taper seconds   Half of taper extends beyond both sides of window    s SHIFT    shift SHIFT  Shift in number of samples in cross correlation    i IPICK    ipick IPICK  SAC header variable to read initial time pick    w WPICK    wpick WPICK  SAC header variable to write MCCC time pick    p PHASE    phase PHASE  Seismic phase name  P S     1 LSQR    Lsqr LSQR LSQR method to solve eqs  nowe  Lnco  Lnre    o OFILENAME    ofilename OFILENAME  Output file name  Default is  evdate mc phase   a    allseis Use all seismograms  Default to use selected ones     Figure 10  Help message of the mccc py script     20    Input Output  Step Algorithm    Time Window    Time Pick Time Header    Time Pick    Time Header     a  ICCS Wa ol  TO WE T1   c  ICCS Wy 217 T2 215 T2   d  MCCC W  oT  T2 3T  T3    Table 2  Time picks and their SAC headers used in the procedure for measuring teleseismic  body wave arrival times     The ICCS and MCCC algorithms are implemented in two modules pysmo
28. ze for plotphase py   Axes rectangle size within the figure   Minimum sample points for SpanSelector to select time window  Sample rate for loading SAC data  Read from first file if srate    0    SAC headers for time window beginning and ending   SAC headers for ICCS time picks   SAC headers for MCCC input and output time picks   SAC header for seismogram selection status   Quality factors  cross correlation coefficient  signal to noise ratio  time domain coherence  SAC Headers for quality factors   Weights for quality factors    Sample rate for loading SAC data  Read from first file if srate    0   Module for calculating cross correlation  xcorr for Numpy or xcorrf90 for Fortran  Function for calculating cross correlation   Sample shift for running coarse cross correlation   Maximum number of iteration   Convergence criterion  epsilon   Type of convergence criterion  coef for correlation coefficient  or resi for residual  Weight each trace when calculating array stack   SAC file name for the array stack    Sample rate for loading SAC data  Read from first file if srate  lt  0  Output file name of MCCC  Use   evdate mc phase  if mc   Module for calculating cross correlation  xcorr for Numpy or xcorrf90 for Fortran  Function for calculating cross correlation   Sample shift for running coarse cross correlation   Weight for the zero mean equation in MCCC weighted Isqr solution   Type of Isqr solution  no weight   Type of lsqr solution  weighted by correlation coefficient  solved
    
Download Pdf Manuals
 
 
    
Related Search
    
Related Contents
COLORstrip Footswitch User Manual  クラスIII免疫・内分泌検査用シリーズ サイログロブリン自己  Confidential - Jarltech.com  User Manual  Warehouse of Tiffany TF7048TL Instructions / Assembly  Active Speaker System - Manuals, Specs & Warranty  - Olimpus    Multifunktionsdrucker  UnRegistered    Copyright © All rights reserved. 
   Failed to retrieve file