Thread: Re: sac-help Digest, Vol 18, Issue 3

Started: 2006-12-04 00:16:27
Last activity: 2006-12-04 00:16:27
Topics: SAC Help
Eva-Maria Rumpfhuber
2006-12-04 00:16:27
Hey Januka,

I usually use a csh-script to sort data, and use sac just to extract the
header information. You can try something like this, the following script
will extract you the header information and store it in a file I called
"rayp.list".

Let me know, if it doesn't work.
Good luck, eva


#/bin/csh
# This is a script to extract header information from a
# sac file.

# Selects all seismograms sorted by events
# (you need to change print $2 to what works for you)
set event = ` ls *.sac | nawk -F. '{print $2}' | sort | uniq `

@ i = 1
@ end = $#event + 1
echo Number of events: $#event

# Loop over the events
while ( $i < $end )
echo Processing event: $event[$i]

#
set file_r = *"."$event[$i]".sac"
echo Input file: $file_r

# start sac and read+write header values
sac <<eof
r $file_r
setbb evid $event[$i]
setbb lat &1,evla
setbb lon &1,evlo
setbb dp &1,evdp
setbb gcdeg &1,gcarc
setbb gckm &1,dist
setbb baz1 &1,baz
setbb rayp &1,user0
getbb TO temp.file names off newline off evid baz1 rayp
quit
eof

cat temp.file >>rayp.list
\rm -f temp.file

@ i = $i + 1
end



----- Original Message -----
From: <sac-help-request<at>iris.washington.edu>
To: <sac-help<at>iris.washington.edu>
Sent: Sunday, December 03, 2006 2:00 PM
Subject: sac-help Digest, Vol 18, Issue 3


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. GCARC (Januka Attanayake)


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

Message: 1
Date: Sat, 2 Dec 2006 22:41:04 -0500
From: "Januka Attanayake" <jattanayake<at>gmail.com>
Subject: [SAC-HELP] GCARC
To: sac-help<at>iris.washington.edu
Message-ID:
<984f6f900612021941r23fd0871xdf3e19756ebbd772<at>mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Greetings,
I am interested in seperating a bunch of seismograms according to
different
GCARC values, for example, bunch up all the seismograms that are between
100 & 120 together ... so on and so forth. Is it possible to do this in
SAC?
any clues?

Thank you.

Januka.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://www.iris.washington.edu/pipermail/sac-help/attachments/20061202/1d217264/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 18, Issue 3
***************************************



***************************************************************************
Eva-Maria Rumpfhuber

University of Texas at El Paso / University of Oklahoma
810 Sarkeys Energy Center
100 E. Boyd Street
Norman, OK 73019-1009
U.S.A.

phone: +1-405-325-1563
email: erumpfhuber<at>ou.edu
web: http://www.geo.utep.edu/pub/eva
***************************************************************************
Wheresoever you go, go with all your heart.
<Confucius>



00:59:17 v.22510d55