[SAC-HELP] 3 questions

Januka Attanayake jattanayake at gmail.com
Wed Nov 29 16:51:07 PST 2006


Greetings,

I have 3 questions today !

1) I have the following piece of script that I use to mark t0 on the
seismogram

r 1 2 3
ppk       --->(I mark t0 using the cursor)
setbb t0 &1, t0 &2, t0 &3
r 1 2 3
ch t0 %t0
w over

say I have 500 seismograms, how do I replace " setbb t0 &1, t0 &2, t0 &3 "
so that I can mark t0  all together?

2) If I have again a bunch of seismograms that I need to seperate according
to distance  how do I do that? is there a script that I can use to do this?

3) How can I make an ASCII file (2-column, time and amplitude) from a sac
file that I down load from IRIS?

Thank you ..!

Januka.

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



-- 
"Nothing can start to exist nor can cease to exist, only transformation is
possible"

Januka Attanayake
Center for Integrative Geosciences -  Earthquake Seismology
University of Connecticut
Beach Hall   U-2045
354,Mansfield Rd;
Storrs.CT 06269

Tel: 1 860 486 0475
http://www.geocities.com/jattanayake
http://earth.uconn.edu/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.iris.washington.edu/pipermail/sac-help/attachments/20061129/d263f9cb/attachment.html>


More information about the sac-help mailing list