<div>Greetings,</div>
<div>&nbsp;</div>
<div>I have 3 questions today !</div>
<div>&nbsp;</div>
<div>1) I have the following piece of script that I use to mark t0 on the seismogram</div>
<div>&nbsp;</div>
<div>r 1 2 3</div>
<div>ppk&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ---&gt;(I mark t0 using the cursor)</div>
<div>setbb t0 &amp;1, t0 &amp;2, t0 &amp;3</div>
<div>r 1 2 3</div>
<div>ch t0 %t0</div>
<div>w over</div>
<div>&nbsp;</div>
<div>say I have 500 seismograms, how do I replace&nbsp;&quot; setbb t0 &amp;1, t0 &amp;2, t0 &amp;3 &quot; so that I can mark&nbsp;t0&nbsp;&nbsp;all together?</div>
<div>&nbsp;</div>
<div>2) If I have again a bunch of seismograms that I need to seperate according to distance&nbsp; how do I do that? is there a script that I can use to do this?</div>
<div>&nbsp;</div>
<div>3) How can I make an ASCII file (2-column, time and amplitude) from a sac file that I down load from IRIS?</div>
<div>&nbsp;</div>
<div>Thank you ..!<br>&nbsp;</div>
<div>Januka.<br>&nbsp;</div>
<div><span class="gmail_quote">On 11/23/06, <b class="gmail_sendername"><a href="mailto:sac-help-request@iris.washington.edu">sac-help-request@iris.washington.edu</a></b> &lt;<a href="mailto:sac-help-request@iris.washington.edu">
sac-help-request@iris.washington.edu</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Send sac-help mailing list submissions to<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="mailto:sac-help@iris.washington.edu">sac-help@iris.washington.edu
</a><br><br>To subscribe or unsubscribe via the World Wide Web, visit<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://www.iris.washington.edu/mailman/listinfo/sac-help">http://www.iris.washington.edu/mailman/listinfo/sac-help</a><br>or, via email, send a message with subject or body 'help' to
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="mailto:sac-help-request@iris.washington.edu">sac-help-request@iris.washington.edu</a><br><br>You can reach the person managing the list at<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="mailto:sac-help-owner@iris.washington.edu">
sac-help-owner@iris.washington.edu</a><br><br>When replying, please edit your Subject line so it is more specific<br>than &quot;Re: Contents of sac-help digest...&quot;<br><br><br>Today's Topics:<br><br>&nbsp;&nbsp;1.&nbsp;&nbsp;naming files (Januka Attanayake)
<br>&nbsp;&nbsp;2. Re:&nbsp;&nbsp;naming files (andreas wessel)<br><br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Thu, 23 Nov 2006 00:31:15 -0500<br>From: &quot;Januka Attanayake&quot; &lt;
<a href="mailto:jattanayake@gmail.com">jattanayake@gmail.com</a>&gt;<br>Subject: [SAC-HELP] naming files<br>To: <a href="mailto:sac-help@iris.washington.edu">sac-help@iris.washington.edu</a><br>Message-ID:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<a href="mailto:984f6f900611222131s12305e84mbc738dddf0ed8c7d@mail.gmail.com">
984f6f900611222131s12305e84mbc738dddf0ed8c7d@mail.gmail.com</a>&gt;<br>Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br><br>Greetings,<br>I have a question regarding naming files. Assume that I have a sac file by
<br>the name<br>2006.300.33.SDMD.BHZ.R.SAC<br>say, If I want to extract only the 2006.300.33.SDMD part for naming purposes<br>after I do certain calculations on it, how do I do it?<br>would something like this work?<br><br>
set bb name $1$.$STATION$ ?<br>w %name.z<br><br>It didn't so far for me?<br>Would like to hear any suggestions from any one out there....<br><br>Thank you.<br><br>Januka<br><br>On 11/14/06, <a href="mailto:sac-help-request@iris.washington.edu">
sac-help-request@iris.washington.edu</a> &lt;<br><a href="mailto:sac-help-request@iris.washington.edu">sac-help-request@iris.washington.edu</a>&gt; wrote:<br>&gt;<br>&gt; Send sac-help mailing list submissions to<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="mailto:sac-help@iris.washington.edu">sac-help@iris.washington.edu</a><br>&gt;<br>&gt; To subscribe or unsubscribe via the World Wide Web, visit<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.iris.washington.edu/mailman/listinfo/sac-help">
http://www.iris.washington.edu/mailman/listinfo/sac-help</a><br>&gt; or, via email, send a message with subject or body 'help' to<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="mailto:sac-help-request@iris.washington.edu">sac-help-request@iris.washington.edu
</a><br>&gt;<br>&gt; You can reach the person managing the list at<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="mailto:sac-help-owner@iris.washington.edu">sac-help-owner@iris.washington.edu</a><br>&gt;<br>&gt; When replying, please edit your Subject line so it is more specific
<br>&gt; than &quot;Re: Contents of sac-help digest...&quot;<br>&gt;<br>&gt;<br>&gt; Today's Topics:<br>&gt;<br>&gt;&nbsp;&nbsp; 1. Re:&nbsp;&nbsp;Cut command (andreas wessel)<br>&gt;<br>&gt;<br>&gt; ----------------------------------------------------------------------
<br>&gt;<br>&gt; Message: 1<br>&gt; Date: Tue, 14 Nov 2006 13:44:57 +1300<br>&gt; From: &quot;andreas wessel&quot; &lt;<a href="mailto:awbochum@gmail.com">awbochum@gmail.com</a>&gt;<br>&gt; Subject: Re: [SAC-HELP] Cut command
<br>&gt; To: &quot;Talal Merghelani&quot; &lt;<a href="mailto:talalmg1@yahoo.com">talalmg1@yahoo.com</a>&gt;<br>&gt; Cc: SAC HELP &lt;<a href="mailto:sac-help@iris.washington.edu">sac-help@iris.washington.edu</a>&gt;<br>&gt; Message-ID:
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<a href="mailto:2afddd310611131644k148e9719x21a328c850048ca8@mail.gmail.com">2afddd310611131644k148e9719x21a328c850048ca8@mail.gmail.com</a>&gt;<br>&gt; Content-Type: text/plain; charset=&quot;iso-8859-1&quot;
<br>&gt;<br>&gt; Hi Talal,<br>&gt;<br>&gt; you could create a shellscript that runs your cutting macro for every<br>&gt; sac-file in the current directory:<br>&gt; I used that to byteswap a lot of files at once:<br>&gt;<br>
&gt; for j in $*<br>&gt; do<br>&gt; fn=$j<br>&gt; echo sac_starts_here %%%%%%%%%%%%%%%%<br>&gt; /usr/local/bin/sac /macro/macro.m $fn<br>&gt; done<br>&gt; exit 0<br>&gt;<br>&gt; You have to adjust the pathes to point to your sac binary and to the macro
<br>&gt; you want to use.<br>&gt; The macro looks like this:<br>&gt;<br>&gt; r $1<br>&gt; &quot;some other commands&quot;<br>&gt; q<br>&gt;<br>&gt;<br>&gt; If you execute the shellscript with<br>&gt; &quot;script.sh *.SAC&quot;
<br>&gt; the for loop will cycle through all the .SAC files, read every single one<br>&gt; in<br>&gt; sac and then execute the commands in the macro.<br>&gt; You still would have to figure out a way to calculate the parameters for
<br>&gt; every file, but this depends on what you want.<br>&gt;<br>&gt; ciao,<br>&gt; Andreas<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; On 11/14/06, Talal Merghelani &lt;<a href="mailto:talalmg1@yahoo.com">talalmg1@yahoo.com
</a>&gt; wrote:<br>&gt; &gt;<br>&gt; &gt; Hi all<br>&gt; &gt;<br>&gt; &gt; i wanna use cut command for many files( 40~60 files) to cut<br>&gt; S-wave(usually<br>&gt; &gt; 3-5sec time window), for each file they have their own values for cut
<br>&gt; &gt; parameters(depend on S-wave).<br>&gt; &gt;<br>&gt; &gt; i have reviewed the sac manual for cut command. but, there is no such<br>&gt; way<br>&gt; &gt; to select the command cut values indepently for each file..?
<br>&gt; &gt;<br>&gt; &gt; its time consuming doing this manaully...!!<br>&gt; &gt;<br>&gt; &gt; there is any systematic way for doing this by writing a macros command<br>&gt; &gt; file..?<br>&gt; &gt;<br>&gt; &gt; of course i care about the result quality. mean, should be the time that
<br>&gt; i<br>&gt; &gt; wanna to cut it exaclty..!!<br>&gt; &gt;<br>&gt; &gt; any idea any help..!! please, attached with an example..<br>&gt; &gt;<br>&gt; &gt; thank you in advance<br>&gt; &gt; Talal<br>&gt; &gt;<br>&gt; &gt; 
P.S. the input is in *.SAC file and the output is *.TXT file.<br>&gt; &gt;<br>&gt; &gt; ------------------------------<br>&gt; &gt;<br>&gt; -------------- next part --------------<br>&gt; An HTML attachment was scrubbed...
<br>&gt; URL:<br>&gt; <a href="http://www.iris.washington.edu/pipermail/sac-help/attachments/20061113/b953fb91/attachment-0001.html">http://www.iris.washington.edu/pipermail/sac-help/attachments/20061113/b953fb91/attachment-0001.html
</a><br>&gt;<br>&gt; ------------------------------<br>&gt;<br>&gt; _______________________________________________<br>&gt; sac-help mailing list<br>&gt; <a href="mailto:sac-help@iris.washington.edu">sac-help@iris.washington.edu
</a><br>&gt; <a href="http://www.iris.washington.edu/mailman/listinfo/sac-help">http://www.iris.washington.edu/mailman/listinfo/sac-help</a><br>&gt;<br>&gt;<br>&gt; End of sac-help Digest, Vol 17, Issue 9<br>&gt; ***************************************
<br>&gt;<br><br><br><br>--<br>&quot;Nothing can start to exist nor can cease to exist, only transformation is<br>possible&quot;<br><br>Januka Attanayake<br>Center for Integrative Geosciences - Solid Earth Geophysics<br>University of Connecticut
<br>Beach Hall&nbsp;&nbsp; U-2045<br>354,Mansfield Rd;<br>Storrs.CT 06269<br><br>Tel: 1 860 486 0475<br><a href="http://www.geocities.com/jattanayake">http://www.geocities.com/jattanayake</a><br><a href="http://earth.uconn.edu/">http://earth.uconn.edu/
</a><br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <a href="http://www.iris.washington.edu/pipermail/sac-help/attachments/20061122/f2e73296/attachment-0001.html">http://www.iris.washington.edu/pipermail/sac-help/attachments/20061122/f2e73296/attachment-0001.html
</a><br><br>------------------------------<br><br>Message: 2<br>Date: Thu, 23 Nov 2006 18:47:04 +1300<br>From: &quot;andreas wessel&quot; &lt;<a href="mailto:awbochum@gmail.com">awbochum@gmail.com</a>&gt;<br>Subject: Re: [SAC-HELP] naming files
<br>To: <a href="mailto:sac-help@iris.washington.edu">sac-help@iris.washington.edu</a><br>Message-ID:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<a href="mailto:2afddd310611222147m95030aak7d68f61efa8c5891@mail.gmail.com">2afddd310611222147m95030aak7d68f61efa8c5891@mail.gmail.com
</a>&gt;<br>Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br><br>Hi there,<br><br>I think you have just a typing error.<br><br>- setbb goes together, without a space..<br>- to take a variable and append something, you have to put the delimiter at
<br>the end of the name of the var, just as you did with the $<br><br>setbb name 1234<br>sc echo %name%567<br><br>You didn't post what error msg you get, but I think it is&nbsp;&nbsp;&quot;Could not find<br>VARS variable blackboard&quot;, because Sac is looking for a variable &quot;
name.z&quot;<br>instead of &quot;name&quot;<br><br>good luck<br>andreas<br><br>On 11/23/06, Januka Attanayake &lt;<a href="mailto:jattanayake@gmail.com">jattanayake@gmail.com</a>&gt; wrote:<br>&gt;<br>&gt; 2006.300.33.SDMD.BHZ.R.SAC
<br>&gt;<br>I want to extract only the 2006.300.33.SDMD part for naming purposes after I<br>&gt; do certain calculations on it<br><br>set bb name $1$.$STATION$ ?<br>&gt; w %name.z<br>&gt;<br>&gt;<br>-------------- next part --------------
<br>An HTML attachment was scrubbed...<br>URL: <a href="http://www.iris.washington.edu/pipermail/sac-help/attachments/20061122/cdc42f96/attachment-0001.html">http://www.iris.washington.edu/pipermail/sac-help/attachments/20061122/cdc42f96/attachment-0001.html
</a><br><br>------------------------------<br><br>_______________________________________________<br>sac-help mailing list<br><a href="mailto:sac-help@iris.washington.edu">sac-help@iris.washington.edu</a><br><a href="http://www.iris.washington.edu/mailman/listinfo/sac-help">
http://www.iris.washington.edu/mailman/listinfo/sac-help</a><br><br><br>End of sac-help Digest, Vol 17, Issue 12<br>****************************************<br></blockquote></div><br><br clear="all"><br>-- <br>&quot;Nothing can start to exist nor can cease to exist, only transformation is possible&quot;
<br><br>Januka Attanayake<br>Center for Integrative Geosciences -&nbsp;&nbsp;Earthquake Seismology<br>University of Connecticut<br>Beach Hall&nbsp;&nbsp; U-2045<br>354,Mansfield Rd;<br>Storrs.CT 06269<br><br>Tel: 1 860 486 0475<br><a href="http://www.geocities.com/jattanayake">
http://www.geocities.com/jattanayake</a><br><a href="http://earth.uconn.edu/">http://earth.uconn.edu/</a>