Thread: Re: sac-help Digest, Vol 94, Issue 4

Started: 2013-09-29 05:11:45
Last activity: 2013-09-29 05:11:45
Topics: SAC Help
George Sand França
2013-09-29 05:11:45
HELP DISPLAY PHASE PICKS (Avinash Nayak)

Dear Avinash

I didn't know if you get answer, but following below the answer for
your question.

Just to do this

SAC > ch kt0 P
SAC > wh

Best Regard
--
George Sand França
Observatório Sismológico
Universidade de Brasília
www.obsis.unb.br
www.tremordeterra.blogspot.com
61 31071297
Now at the University of Arizona




Citando sac-help-request<at>iris.washington.edu:
Send sac-help mailing list submissions to
&nbsp; &nbsp; &nbsp; &nbsp; sac-help<at>iris.washington.edu

To subscribe or unsubscribe via the World Wide Web, visit
&nbsp; &nbsp; &nbsp; &nbsp;
http://www.iris.washington.edu/mailman/listinfo/sac-help
or, via email, send a message with subject or body 'help' to
&nbsp; &nbsp; &nbsp; &nbsp; sac-help-request<at>iris.washington.edu

You can reach the person managing the list at
&nbsp; &nbsp; &nbsp; &nbsp; sac-help-owner<at>iris.washington.edu

When replying, please edit your Subject line so it is more specific
than "Re: Contents of sac-help digest..."


Today's Topics:

&nbsp; 1.&nbsp; Sac101.6 unable to accept arguments (Martha Savage)
&nbsp; 2.&nbsp; Change EVLA and EVLO taking values from another file
&nbsp; &nbsp; &nbsp;(Tannistha Maiti)
&nbsp; 3. Re:&nbsp; Change EVLA and EVLO taking values from another file
&nbsp; &nbsp; &nbsp;(Dongdong Tian)
&nbsp; 4.&nbsp; NEED SOME HELP ON SAC FORMAT (Sunil Kapur)
&nbsp; 5.&nbsp; HELP DISPLAY PHASE PICKS (Avinash Nayak)


----------------------------------------------------------------------

Message: 1
Date: Sat, 10 Aug 2013 22:11:35 +0000
From: Martha Savage <Martha.Savage<at>vuw.ac.nz>
Subject: [SAC-HELP] Sac101.6 unable to accept arguments
To: "sac-help<at>iris.washington.edu" <sac-help<at>iris.washington.edu>
Message-ID:
&nbsp; &nbsp; &nbsp; &nbsp;
<A36ED0001E2C6F46A016A5E1BFED6AD132D06D1F<at>STAWINCOX10MBX1.staff.vuw.ac.nz>

Content-Type: text/plain; charset="iso-8859-1"

Hi,

I have a similar problem with passing arguments in version 101.6
and not with any of the earlier versions.&nbsp; I have had to revert
to the old version to get my codes to work.&nbsp; The problem seems
to be that a variable that was defined by the "keys" command isn't
passed properly into a "do" loop.&nbsp; (the variable in question is
called "file".&nbsp; I tried calling it "filein" in case there was a
pre-set definition of "file" but that didn't change anything.)
I also tried leaving out the quotes in the commands, as was
recommended for a different problem, but it gave worse errors,
crashing the system.

I have modified my code to show the essence of the problem: Here
are examples of how it works in 101.6 and 101.4 and how it works
now, using the "echo on" command, and the relevant code:
$keys file
echo on
setbb compsbb "e n z"
message "file " $file$
*# construct list of files for each component
setbb files ""
setbb compx ""
do ext list %compsbb
message "ext " $ext$
message "file " $file$
setbb files "%files% $file$.$ext$"
*&nbsp; setbb files %files% $file$.$ext$
setbb compx "%compx%$ext$"
enddo
message "files: %files%"

Response of code in 101.6:
SAC> macro ../../mfast/macros/checkpick_test file
./2002.054.09.47.lhor2&nbsp; setbb compsbb "e n z"
message "file " $file$
==>&nbsp; message "file " ./2002.054.09.47.lhor2
file
./2002.054.09.47.lhor2
*# construct list of files for each component
setbb files ""
setbb compx ""
do ext list %compsbb
==>&nbsp; do ext list e n z
message "ext " $ext$
==>&nbsp; message "ext " e n z
ext
e n z
message "file " $file$
==>&nbsp; message "file " COMPX
file
COMPX
&nbsp; setbb files "%files% $file$.$ext$"
==>&nbsp; setbb files "&nbsp; $file$.$ext$.e n z"
*&nbsp; setbb files %files% $file$.$ext$
&nbsp; setbb compx "%compx%$ext$"
==>&nbsp; setbb compx "e n z"
enddo
message "files: %files%"
==>&nbsp; message "files:&nbsp; &nbsp;$file$.$ext$.e n z"
files:&nbsp; &nbsp;$file$.$ext$.e n z


Here is the output from using sac-101.4

SAC> macro ../../mfast/macros/checkpick_test&nbsp; file
./2002.054.09.47.lhor2
macro ../../mfast/macros/checkpick_test&nbsp; file ./2002.054.09.47.lhor2
echo on
setbb compsbb "e n z"
message "file " $file$
==> message "file " ./2002.054.09.47.lhor2
file
./2002.054.09.47.lhor2
*# construct list of files for each component
setbb files ""
setbb compx ""
do ext list %compsbb
==> do ext list e n z
message "ext " $ext$
==> message "ext " e
ext
e
message "file " $file$
==> message "file " ./2002.054.09.47.lhor2
file
./2002.054.09.47.lhor2
&nbsp; setbb files "%files% $file$.$ext$"
==>&nbsp; &nbsp;setbb files " ./2002.054.09.47.lhor2.e"
&nbsp; setbb compx "%compx%$ext$"
==>&nbsp; &nbsp;setbb compx "e"
enddo
message "ext " $ext$
==> message "ext " n
ext
n
message "file " $file$
==> message "file " ./2002.054.09.47.lhor2
file
./2002.054.09.47.lhor2
&nbsp; setbb files "%files% $file$.$ext$"
==>&nbsp; &nbsp;setbb files " ./2002.054.09.47.lhor2.e
./2002.054.09.47.lhor2.n"
&nbsp; setbb compx "%compx%$ext$"
==>&nbsp; &nbsp;setbb compx "en"
enddo
message "ext " $ext$
==> message "ext " z
ext
z
message "file " $file$
==> message "file " ./2002.054.09.47.lhor2
file
./2002.054.09.47.lhor2
&nbsp; setbb files "%files% $file$.$ext$"
==>&nbsp; &nbsp;setbb files " ./2002.054.09.47.lhor2.e
./2002.054.09.47.lhor2.n ./2002.054.09.47.lhor2.z"
&nbsp; setbb compx "%compx%$ext$"
==>&nbsp; &nbsp;setbb compx "enz"
enddo
message "files: %files%"
==> message "files:&nbsp; ./2002.054.09.47.lhor2.e
./2002.054.09.47.lhor2.n ./2002.054.09.47.lhor2.z"
files:&nbsp; ./2002.054.09.47.lhor2.e ./2002.054.09.47.lhor2.n
./2002.054.09.47.lhor2.z

You see that it properly named my files with the extensions so
that I can read them in later.

Thanks for any help you can give me.

Kind Regards,

Martha Savage
Professor of Geophysics
SGEES
Victoria University of Wellington
Te Whare Wananga o te Upoko o te Ika a Maui
Cotton 522
Box 600, Wellington, 6140
New Zealand

Email: Martha.Savage<at>vuw.ac.nz
DDI: +64 (0)4 463-5961
mobile:&nbsp; 021-262-7516

-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://www.iris.washington.edu/pipermail/sac-help/attachments/20130810/8035f67a/attachment-0001.htm

------------------------------

Message: 2
Date: Fri, 16 Aug 2013 16:59:35 -0600
From: Tannistha Maiti <titli<at>vt.edu>
Subject: [SAC-HELP] Change EVLA and EVLO taking values from another
&nbsp; &nbsp; &nbsp; &nbsp; file
To: sac-help<at>iris.washington.edu
Message-ID:
&nbsp; &nbsp; &nbsp; &nbsp;
<CAHt=FFFyupzU7Oc09drR=zOGB+NyKWeS+dZgR5tRszqLB7MaXA<at>mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hello,

I would like to modify the EVLA and EVLO values in the header using bash
script. The lat and long values are stored in coord.txt file. I used the
following script but not sure why it is not reading from the file. The
coord file contains two values column 1 lat and column 2 long.

#bin/bash!
saclst evlo evla f|awk '{a+=$1} {b+=$2} {printf "r
NET.STA1216..BXE.sac\nch&nbsp; %f %f \nwh\nq\n",a,b} END{print
"quit"}' | sac
coord.txt

However this command works.
printf "r NET.STA1216..BXE.sac\nch evlo 100 evla 100 \nwh\nq\n" | sac

Thanks,
Tannistha
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://www.iris.washington.edu/pipermail/sac-help/attachments/20130816/bc5485dd/attachment-0001.htm

------------------------------

Message: 3
Date: Sat, 17 Aug 2013 13:26:44 +0800
From: Dongdong Tian <seisman.ustc<at>gmail.com>
Subject: Re: [SAC-HELP] Change EVLA and EVLO taking values from
&nbsp; &nbsp; &nbsp; &nbsp; another file
To: Tannistha Maiti <titli<at>vt.edu>
Cc: SAC HELP <sac-help<at>iris.washington.edu>
Message-ID:
&nbsp; &nbsp; &nbsp; &nbsp;
<CABhTVEPbqMHDmt7v1MYgmg95DJ8afYVW9boNHDYeAPdeLtKouA<at>mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Try this,

#!/bin/bash
saclst evlo evla f test.sac
awk '{printf "r test.sac\nch evlo %f evla %f\nwh\nq\n",$1,$2}' coord | sac
saclst evlo evla f test.sac



2013/8/17 Tannistha Maiti <titli<at>vt.edu>
Hello,

I would like to modify the EVLA and EVLO values in the header using bash
script. The lat and long values are stored in coord.txt file. I used the
following script but not sure why it is not reading from the file. The
coord file contains two values column 1 lat and column 2 long.

#bin/bash!
saclst evlo evla f|awk '{a+=$1} {b+=$2} {printf "r
NET.STA1216..BXE.sac\nch&nbsp; %f %f \nwh\nq\n",a,b} END{print
"quit"}' | sac
coord.txt

However this command works.
printf "r NET.STA1216..BXE.sac\nch evlo 100 evla 100 \nwh\nq\n" | sac

Thanks,
Tannistha

_______________________________________________
sac-help mailing list
sac-help<at>iris.washington.edu
http://www.iris.washington.edu/mailman/listinfo/sac-help
&nbsp;
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://www.iris.washington.edu/pipermail/sac-help/attachments/20130817/38cdbea2/attachment-0001.htm

------------------------------

Message: 4
Date: Sat, 17 Aug 2013 09:36:31 -0500
From: Sunil Kapur <sunilkapur<at>gmail.com>
Subject: [SAC-HELP] NEED SOME HELP ON SAC FORMAT
To: sac-help <sac-help<at>iris.washington.edu>
Message-ID:
&nbsp; &nbsp; &nbsp; &nbsp;
<CACWW_986T5yCHpM8Ls5EBLSc_OdXLtgRn1tOVsDxT=+r_APbaQ<at>mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hello

I am a doctoral student at University of Houston. I am working on automatic
arrival picking. I have data in .dat format. I want to perform polarization
on it so I came across your matlab code. But it uses SAC format. Can you
please guide me on how can I use dat format in this code. Also, can you
provide me with some sample SAC file . Thankx.

Thanking you Alot

Sunil Kapur
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://www.iris.washington.edu/pipermail/sac-help/attachments/20130817/639abcb2/attachment-0001.htm

------------------------------

Message: 5
Date: Sun, 18 Aug 2013 17:27:28 -0700
From: Avinash Nayak <avinash07guddu<at>gmail.com>
Subject: [SAC-HELP] HELP DISPLAY PHASE PICKS
To: sac-help<at>iris.washington.edu
Message-ID:
&nbsp; &nbsp; &nbsp; &nbsp;
<CA+ebHScgxNX4iACZ=ftoGMCKC9Nfgj5jYKo81KNrOPNR+yJTaA<at>mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hiii,

I am a beginner to SAC and I am trying to pick and display phases on
seismograms using PPK. I will really appreciate some help on this.

SAC>read filename
SAC>p1
SAC>ppk
# using curser, I click on a point and press p to show P-wave pick, then i
press q to get #out of ppk
SAC>p1

but now the plot shows IPUO instead of just P and it shows ISUO instead of
S. I tried assigning t0, t1 to phase picks, and then trying to change the
name using PICKPHASE, but for some reason it doesn't work (or maybe I am
using the wrong command)

SAC>pickphase t0 P
SAC>p1

please please please help :( :(
How do I get SAC to display just P or any phase name or just time picks (no
phase name) ?

Thanks.

Regards,
Avinash
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://www.iris.washington.edu/pipermail/sac-help/attachments/20130818/16b7416d/attachment.htm

------------------------------

_______________________________________________
sac-help mailing list
sac-help<at>iris.washington.edu
http://www.iris.washington.edu/mailman/listinfo/sac-help


End of sac-help Digest, Vol 94, Issue
4***************************************


06:40:11 v.22510d55