<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">I think you want the "rotate" command in sac.<DIV><BR class="khtml-block-placeholder"></DIV><DIV>within sac, type "help rotate" to get more info about this command</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Georgia</DIV><DIV><BR><DIV><DIV>On Oct 12, 2006, at 4:42 AM, Januka Attanayake wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV>Hi,</DIV> <DIV>I want to convert horizontal components in to transverse and radial components in SAC. Would anyone have a code/instructions to do this? You feedback is greatly appreciated.</DIV> <DIV> </DIV> <DIV>Januka.<BR><BR> </DIV> <DIV><SPAN class="gmail_quote">On 10/10/06, <B class="gmail_sendername"><A href="mailto:sac-help-request@iris.washington.edu">sac-help-request@iris.washington.edu</A></B> <<A href="mailto:sac-help-request@iris.washington.edu"> sac-help-request@iris.washington.edu</A>> 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> <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> <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> <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> <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 "Re: Contents of sac-help digest..."<BR><BR><BR>Today's Topics:<BR><BR> 1. Re: get the header in ascii (andreas wessel) <BR> 2. Re: get header data (Peter Goldstein)<BR> 3. Re: get header data (Frederik Tilmann)<BR> 4. Passing commands to SAC using sac<<eof (andreas wessel)<BR><BR><BR>---------------------------------------------------------------------- <BR><BR>Message: 1<BR>Date: Tue, 10 Oct 2006 13:17:59 +1300<BR>From: "andreas wessel" <<A href="mailto:awbochum@gmail.com">awbochum@gmail.com</A>><BR>Subject: Re: [SAC-HELP] get the header in ascii<BR>To: <A href="mailto:sac-help@iris.washington.edu">sac-help@iris.washington.edu</A><BR>Message-ID:<BR> <<A href="mailto:2afddd310610091717i60eeb6e8r555d3574b922a3c@mail.gmail.com">2afddd310610091717i60eeb6e8r555d3574b922a3c@mail.gmail.com </A>><BR>Content-Type: text/plain; charset="iso-8859-1"<BR><BR>Hello,<BR><BR>There is a way to write ascii, but it's far from perfect, as it is kind of<BR>tricky to see which values belong to which variables. <BR>If you have the file in SAC memory, you can write it as ascii with<BR><BR>SAC> WRITE ALPHA filename<BR>and then look at the values in your terminal, the header is at the beginning<BR>(it shows only the values, but not the names) <BR><BR>$ head filename<BR><BR>Please let me know if you find a better way to do this.<BR><BR><BR>Andreas<BR><BR><BR><BR>On 10/9/06, <A href="mailto:Heloise.Cadet@ujf-grenoble.fr">Heloise.Cadet@ujf-grenoble.fr</A> <<A href="mailto:Heloise.Cadet@ujf-grenoble.fr"> Heloise.Cadet@ujf-grenoble.fr</A>><BR>wrote:<BR>><BR>><BR>> Good mornning<BR>><BR>> I'd like to know how to get the header of sac files into an ascii file?<BR>><BR>> thank you<BR>><BR>> Regards <BR>><BR>> Héloïse<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>-------------- next part --------------<BR>An HTML attachment was scrubbed...<BR>URL: <A href="http://www.iris.washington.edu/pipermail/sac-help/attachments/20061009/9d65a158/attachment-0001.html"> http://www.iris.washington.edu/pipermail/sac-help/attachments/20061009/9d65a158/attachment-0001.html</A><BR><BR>------------------------------<BR><BR>Message: 2<BR>Date: Mon, 9 Oct 2006 18:02:14 -0700<BR>From: Peter Goldstein < <A href="mailto:peterg@llnl.gov">peterg@llnl.gov</A>><BR>Subject: Re: [SAC-HELP] get header data<BR>To: <<A href="mailto:Heloise.Cadet@ujf-grenoble.fr">Heloise.Cadet@ujf-grenoble.fr</A>><BR>Cc: <A href="mailto:sac-help@iris.washington.edu"> sac-help@iris.washington.edu</A><BR>Message-ID: <p06110409c1509d5fdfa8@[<A href="http://192.168.1.5">192.168.1.5</A>]><BR>Content-Type: text/plain; charset="iso-8859-1" ; format="flowed"<BR><BR><BR> As Art suggests, saclst will hopefully provide<BR>the header list capabilities you need.<BR>In the short term you can hopefully get by using listheader within a script and<BR>redirect the output to the file you want.<BR><BR> Something like the following script could be invoked as<BR>sac_lh.csh "your_filename"<BR>Note that the blank lines are needed to get all the headers and you'll<BR>still have to edit the results if you want a particular format or to get rid of <BR>extraneous information and blank lines.<BR><BR><BR>#!/bin/csh -xvf<BR># sac_lh.csh: script to list sac header listing to standard out<BR>sac<<eof<BR>r $argv[1]<BR>lh inclusive on<BR><BR><BR><BR><BR>q<BR>eof<BR># end of sac_lh.csh <BR><BR>>Good morning,<BR>><BR>>I'd like to get some information in the header but the subroutines getfhv<BR>>doesn't seem to work for depmin, depmax and dist<BR>><BR>>in a fortran code:<BR>><BR>>call GETFHV ('DEPMIN', depmin, nerr) <BR>><BR>>I got this error message:<BR>>ERROR: Undefined header field value. DEPMIN<BR>><BR>>but it works for:<BR>><BR>>call GETNHV ('NZYEAR', nyear, nerr)<BR>><BR>>is there a bug? or an other way to extract data from the header? <BR>><BR>>Best regards<BR>><BR>>HÈloÔse<BR>>CETE Nice, LGIT Grenoble<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>--<BR><BR>Peter Goldstein, Ph.D. (925) 423-1231 (office) <BR>L-103, PO Box 808 (925) 422-5844 (fax)<BR>Livermore, CA 94551 <A href="mailto:peterg@llnl.gov">peterg@llnl.gov</A> (email)<BR>web page: <A href="http://www.llnl.gov/sac">http://www.llnl.gov/sac</A><BR><BR> <BR><BR>------------------------------<BR><BR>Message: 3<BR>Date: Tue, 10 Oct 2006 09:29:53 +0100<BR>From: Frederik Tilmann <<A href="mailto:tilmann@esc.cam.ac.uk">tilmann@esc.cam.ac.uk</A>><BR>Subject: Re: [SAC-HELP] get header data <BR>To: <A href="mailto:Heloise.Cadet@ujf-grenoble.fr">Heloise.Cadet@ujf-grenoble.fr</A><BR>Cc: <A href="mailto:sac-help@iris.washington.edu">sac-help@iris.washington.edu</A><BR>Message-ID: <<A href="mailto:452B5A01.80609@esc.cam.ac.uk"> 452B5A01.80609@esc.cam.ac.uk</A>><BR>Content-Type: text/plain; charset=us-ascii; format=flowed<BR><BR>Heloise<BR><BR>these values all need to be calculated by sac so when the sac file is<BR>generated externally, e.g. by rdseed they are generally left undefined. <BR><BR>Try reading into sac and writing again, i.e.<BR><BR>sac<<eof<BR>r file<BR>w over<BR>q<BR>eof<BR><BR>Of course, for dist evla,evlo,stla,stlo all need to be set and lcalda<BR>must be true.<BR><BR>Frederik<BR><BR> <BR><A href="mailto:Heloise.Cadet@ujf-grenoble.fr">Heloise.Cadet@ujf-grenoble.fr</A> wrote:<BR>> Good morning,<BR>><BR>> I'd like to get some information in the header but the subroutines getfhv<BR>> doesn't seem to work for depmin, depmax and dist <BR>><BR>> in a fortran code:<BR>><BR>> call GETFHV ('DEPMIN', depmin, nerr)<BR>><BR>> I got this error message:<BR>> ERROR: Undefined header field value. DEPMIN<BR>><BR>> but it works for:<BR>> <BR>> call GETNHV ('NZYEAR', nyear, nerr)<BR>><BR>> is there a bug? or an other way to extract data from the header?<BR>><BR>> Best regards<BR>><BR>> H?lo?se<BR>> CETE Nice, LGIT Grenoble<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>--<BR>Frederik Tilmann<BR>Bullard Laboratories Tel. +44 1223 765545<BR>Department of Earth Sciences Fax. +44 1223 360779<BR>University of Cambridge email: <A href="mailto:tilmann@esc.cam.ac.uk">tilmann@esc.cam.ac.uk</A><BR>Madingley Road<BR>Cambridge CB3 0EZ<BR>UK<BR><BR><BR><BR><BR><BR><BR>------------------------------<BR><BR>Message: 4<BR>Date: Tue, 10 Oct 2006 23:30:39 +1300 <BR>From: "andreas wessel" <<A href="mailto:awbochum@gmail.com">awbochum@gmail.com</A>><BR>Subject: [SAC-HELP] Passing commands to SAC using sac<<eof<BR>To: <A href="mailto:sac-help@iris.washington.edu"> sac-help@iris.washington.edu</A><BR>Message-ID:<BR> <<A href="mailto:2afddd310610100330t118cd90cg717e7c22a91d94b@mail.gmail.com">2afddd310610100330t118cd90cg717e7c22a91d94b@mail.gmail.com</A>><BR>Content-Type: text/plain; charset="iso-8859-1" <BR><BR>Good evening,<BR><BR>I'm trying to pass some commands to SAC with <<<BR>But all I get is the SAC startup lines:<BR><BR>SEISMIC ANALYSIS CODE [06/06/2005 (Version 100.1)]<BR>Copyright 1995 Regents of the University of California <BR><BR>.. and a blinking cursor a few lines below. All I can do then is kill the<BR>script with Ctrl+C.<BR>I am running a minimal example. I get the "echo start", it's only the SAC<BR>part that causes trouble.<BR> <BR>#!/bin/sh<BR>echo start<BR>sac<<eof<BR>r test.e<BR>p<BR>q<BR>eof<BR>exit 0<BR><BR>I also tried csh instead of sh, but that didn't help.<BR>Are there any environmental things besides SACAUX I need to consider?<BR> <BR>Thanks,<BR>Andreas<BR>-------------- next part --------------<BR>An HTML attachment was scrubbed...<BR>URL: <A href="http://www.iris.washington.edu/pipermail/sac-help/attachments/20061010/3ef772f6/attachment-0001.html"> http://www.iris.washington.edu/pipermail/sac-help/attachments/20061010/3ef772f6/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 16, Issue 2<BR>***************************************<BR></BLOCKQUOTE></DIV><BR><BR clear="all"><BR><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">sac-help mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:sac-help@iris.washington.edu">sac-help@iris.washington.edu</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://www.iris.washington.edu/mailman/listinfo/sac-help">http://www.iris.washington.edu/mailman/listinfo/sac-help</A></DIV> </BLOCKQUOTE></DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>-----------------------------</DIV><DIV>Dr. Georgia Cua</DIV><DIV>Swiss Seismological Service</DIV><DIV>Institute of Geophysics</DIV><DIV>ETH Hoenggerberg HPP P</DIV><DIV>CH-8093 Zurich</DIV><DIV>Switzerland</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Tel: +41-044-633-7574 </DIV><DIV>Fax: +41-044-633-1065 </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><A href="mailto:georgia.cua@sed.ethz.ch">georgia.cua@sed.ethz.ch</A></DIV><DIV>-----------------------------</DIV><BR class="Apple-interchange-newline"></SPAN></SPAN></SPAN> </DIV><BR></DIV></BODY></HTML>