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

Started: 2008-03-09 07:03:38
Last activity: 2008-03-10 16:44:51
Topics: SAC Help
Tuna Eken
2008-03-09 07:03:38




To message 3:

Hi Onur,

when I tried the same commands with the same parameters onto my example sac
file
it did worked out ... It actually gave the same error messae when i used
different time values (whis is not included by the data) ...

So problem may be caused by applying wrong values for your data. have you ever
checked starting end ending points of the data ?

regards

tuna eken


Message: 3
Date: Sat, 8 Mar 2008 13:29:51 +0200
From: "Onur Tan" <Onur.Tan<at>mam.gov.tr>
Subject: [SAC-HELP] Blackboard Variables and CUT
To: <sac-help<at>iris.washington.edu>
Message-ID:
<110C3E0C4E9ADB4C882229C2A7A1540A052C2511<at>POSTA2K3.mam.gov.tr>
Content-Type: text/plain; charset="us-ascii"


Hi,

When I use a blackboard variable as the first parameter of the cut
command in SAC new version (101.0),
it gives error.

I tried this (echo on):
--------------------
SAC> setbb a 600
setbb a 600
SAC> setbb b 700
setbb b 700
SAC> cut %a %b
cut %a %b
==> cut 600
SAC> r
r
WARNING: Start cut greater than stop cut for file 08010_0707_CEV.1
ERROR 1301: No data files read in.
SAC>
-----------------------------
the cut command do not understand the second variable.


This does also not work:
----
SAC> cut %a 700
cut %a 700
==> cut 600
SAC> r
r
WARNING: Start cut greater than stop cut for file 08010_0707_CEV.1
ERROR 1301: No data files read in.
----


But this works
----
SAC> cut 500 %b
cut 500 %b
==> cut 500 700
SAC> r
r
SAC> p
p
----


Do you have any idea?

best regards
Onur Tan




Citerar sac-help-request<at>iris.washington.edu:

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. Two SAC queries - (i) conversion of SAC files to PITSA-ASCII
and (ii) SAC library issues for multi-channel cross-correlation
(Fiona Darbyshire)
2. About fft routine in SAC (wwxu)
3. Blackboard Variables and CUT (Onur Tan)


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

Message: 1
Date: Fri, 7 Mar 2008 18:13:09 -0500
From: "Fiona Darbyshire" <f.darbyshire<at>gmail.com>
Subject: [SAC-HELP] Two SAC queries - (i) conversion of SAC files to
PITSA-ASCII and (ii) SAC library issues for multi-channel
cross-correlation
To: sac-help<at>iris.washington.edu
Message-ID:
<256ff3740803071513m5ef1bc36nbfdb2c6317b6d87c<at>mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hello,

I have 2 SAC-related queries that are causing me problems on a couple of
fairly urgent projects currently:

i) I inherited a Matlab program for surface wave analysis. The seismogram
files that it reads are in PITSA ASCII format. Is there any existing
software to convert standard SAC to PITSA ASCII? Or will I have to convert
SAC binary to alpha, and try to reformat the resulting ascii files?

ii) Another inheritance: this time I have been given the source code
(fortran) for John VanDecar's "mccc" multi-channel cross-correlation
program. The program contains a lot of SAC functions, such as "rsach",
"getnhv", "rsac1", "getkhv", "getfhv", "setfhv", "setkhv", "wsac0"... (and
probably a few others I haven't spotted yet). Along with the Fortran codes I
was given a couple of SAC libraries of the type "libsac.a". The problem is
that this set worked OK for a SUN system, but I am on Linux (CentOS 5). With
the SAC library that I was given, and the SAC library I obtained when
downloading SAC executables for my current system, I was unable to compile
the code. I have a really old SAC library (old enough that I can't remember
even which version it comes from) and that one allowed mccc to compile...
but not to run (segmentation fault). Can anyone advise me on using SAC
libraries correctly and/or making changes to the fortran code that will
allow me to run this program?

I should add that I'm a rather poor programmer - just about literate in
Fortran, okay in simple shell scripts, but not too great with any other
programming languages! Any advice greatly appreciated.

Thanks a lot,

Fiona Darbyshire.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:

http://www.iris.washington.edu/pipermail/sac-help/attachments/20080307/0f44b481/attachment-0001.html

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

Message: 2
Date: Sat, 08 Mar 2008 02:59:07 GMT
From: "wwxu" <wwxu<at>mail.iggcas.ac.cn>
Subject: [SAC-HELP] About fft routine in SAC
To: sac-help<at>iris.washington.edu
Message-ID: <20080308025907.3888.eqmail<at>mail.iggcas.ac.cn>
Content-Type: text/plain; format=flowed; charset="gb2312"

Hi ALL,

In SAC, I generate a 5Hz sine wave and do fft transforming as follows:
sac> funcgen sine 5 npts 1024 delta 0.01
sac> fft
sac> psp am loglin
and I find that the maximum absolute amplitude is greater than 4 near
frequency 5Hz, but in theory, it should be 0.5 because of amplitude
spectrum symmetry of real series, so could you tell me why?

B.T.W., I also compute the amplitude spectrum using fft program I wrote and
find that the result is not the same with SAC generated, I checked the
program carefully and be sure that it's right and conform with the
theoretical result.

thanks for your attention!


Your sincerely,
Xu W.

************************************************
Dr. WeiWei Xu
Institute of Geology and Geophysics
Chinese Academy of Sciences
P.O.Box 9825
Beijing 100029
China
Tel: 0086-10-62007354(Office)
Fax: 0086-10-62010846
************************************************



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

Message: 3
Date: Sat, 8 Mar 2008 13:29:51 +0200
From: "Onur Tan" <Onur.Tan<at>mam.gov.tr>
Subject: [SAC-HELP] Blackboard Variables and CUT
To: <sac-help<at>iris.washington.edu>
Message-ID:
<110C3E0C4E9ADB4C882229C2A7A1540A052C2511<at>POSTA2K3.mam.gov.tr>
Content-Type: text/plain; charset="us-ascii"


Hi,

When I use a blackboard variable as the first parameter of the cut
command in SAC new version (101.0),
it gives error.

I tried this (echo on):
--------------------
SAC> setbb a 600
setbb a 600
SAC> setbb b 700
setbb b 700
SAC> cut %a %b
cut %a %b
==> cut 600
SAC> r
r
WARNING: Start cut greater than stop cut for file 08010_0707_CEV.1
ERROR 1301: No data files read in.
SAC>
-----------------------------
the cut command do not understand the second variable.


This does also not work:
----
SAC> cut %a 700
cut %a 700
==> cut 600
SAC> r
r
WARNING: Start cut greater than stop cut for file 08010_0707_CEV.1
ERROR 1301: No data files read in.
----


But this works
----
SAC> cut 500 %b
cut 500 %b
==> cut 500 700
SAC> r
r
SAC> p
p
----


Do you have any idea?

best regards
Onur Tan




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

_______________________________________________
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 33, Issue 4
***************************************





  • Brian Savage
    2008-03-10 16:44:51
    Onur Tan and Tuna Eken

    This is an issue with SAC version 101.0. The blackboard variable
    section
    of the code base has a bug regarding the concatenation of blackboard
    variables.
    Please upgrade to 101.1 to resolve this issue.

    Cheers
    Brian Savage

    On Mar 8, 2008, at 5:03 PM , Tuna Eken wrote:





    To message 3:

    Hi Onur,

    when I tried the same commands with the same parameters onto my
    example sac
    file
    it did worked out ... It actually gave the same error messae when i
    used
    different time values (whis is not included by the data) ...

    So problem may be caused by applying wrong values for your data.
    have you ever
    checked starting end ending points of the data ?

    regards

    tuna eken


    Message: 3
    Date: Sat, 8 Mar 2008 13:29:51 +0200
    From: "Onur Tan" <Onur.Tan<at>mam.gov.tr>
    Subject: [SAC-HELP] Blackboard Variables and CUT
    To: <sac-help<at>iris.washington.edu>
    Message-ID:
    <110C3E0C4E9ADB4C882229C2A7A1540A052C2511<at>POSTA2K3.mam.gov.tr>
    Content-Type: text/plain; charset="us-ascii"


    Hi,

    When I use a blackboard variable as the first parameter of the cut
    command in SAC new version (101.0),
    it gives error.

    I tried this (echo on):
    --------------------
    SAC> setbb a 600
    setbb a 600
    SAC> setbb b 700
    setbb b 700
    SAC> cut %a %b
    cut %a %b
    ==> cut 600
    SAC> r
    r
    WARNING: Start cut greater than stop cut for file 08010_0707_CEV.1
    ERROR 1301: No data files read in.
    SAC>
    -----------------------------
    the cut command do not understand the second variable.


    This does also not work:
    ----
    SAC> cut %a 700
    cut %a 700
    ==> cut 600
    SAC> r
    r
    WARNING: Start cut greater than stop cut for file 08010_0707_CEV.1
    ERROR 1301: No data files read in.
    ----


    But this works
    ----
    SAC> cut 500 %b
    cut 500 %b
    ==> cut 500 700
    SAC> r
    r
    SAC> p
    p
    ----


    Do you have any idea?

    best regards
    Onur Tan




    Citerar sac-help-request<at>iris.washington.edu:

    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. Two SAC queries - (i) conversion of SAC files to PITSA-ASCII
    and (ii) SAC library issues for multi-channel cross-correlation
    (Fiona Darbyshire)
    2. About fft routine in SAC (wwxu)
    3. Blackboard Variables and CUT (Onur Tan)


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

    Message: 1
    Date: Fri, 7 Mar 2008 18:13:09 -0500
    From: "Fiona Darbyshire" <f.darbyshire<at>gmail.com>
    Subject: [SAC-HELP] Two SAC queries - (i) conversion of SAC files to
    PITSA-ASCII and (ii) SAC library issues for multi-channel
    cross-correlation
    To: sac-help<at>iris.washington.edu
    Message-ID:
    <256ff3740803071513m5ef1bc36nbfdb2c6317b6d87c<at>mail.gmail.com>
    Content-Type: text/plain; charset="iso-8859-1"

    Hello,

    I have 2 SAC-related queries that are causing me problems on a
    couple of
    fairly urgent projects currently:

    i) I inherited a Matlab program for surface wave analysis. The
    seismogram
    files that it reads are in PITSA ASCII format. Is there any existing
    software to convert standard SAC to PITSA ASCII? Or will I have to
    convert
    SAC binary to alpha, and try to reformat the resulting ascii files?

    ii) Another inheritance: this time I have been given the source code
    (fortran) for John VanDecar's "mccc" multi-channel cross-correlation
    program. The program contains a lot of SAC functions, such as
    "rsach",
    "getnhv", "rsac1", "getkhv", "getfhv", "setfhv", "setkhv",
    "wsac0"... (and
    probably a few others I haven't spotted yet). Along with the
    Fortran codes I
    was given a couple of SAC libraries of the type "libsac.a". The
    problem is
    that this set worked OK for a SUN system, but I am on Linux
    (CentOS 5). With
    the SAC library that I was given, and the SAC library I obtained when
    downloading SAC executables for my current system, I was unable to
    compile
    the code. I have a really old SAC library (old enough that I can't
    remember
    even which version it comes from) and that one allowed mccc to
    compile...
    but not to run (segmentation fault). Can anyone advise me on using
    SAC
    libraries correctly and/or making changes to the fortran code that
    will
    allow me to run this program?

    I should add that I'm a rather poor programmer - just about
    literate in
    Fortran, okay in simple shell scripts, but not too great with any
    other
    programming languages! Any advice greatly appreciated.

    Thanks a lot,

    Fiona Darbyshire.
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL:

    http://www.iris.washington.edu/pipermail/sac-help/attachments/
    20080307/0f44b481/attachment-0001.html

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

    Message: 2
    Date: Sat, 08 Mar 2008 02:59:07 GMT
    From: "wwxu" <wwxu<at>mail.iggcas.ac.cn>
    Subject: [SAC-HELP] About fft routine in SAC
    To: sac-help<at>iris.washington.edu
    Message-ID: <20080308025907.3888.eqmail<at>mail.iggcas.ac.cn>
    Content-Type: text/plain; format=flowed; charset="gb2312"

    Hi ALL,

    In SAC, I generate a 5Hz sine wave and do fft transforming as
    follows:
    sac> funcgen sine 5 npts 1024 delta 0.01
    sac> fft
    sac> psp am loglin
    and I find that the maximum absolute amplitude is greater than 4 near
    frequency 5Hz, but in theory, it should be 0.5 because of amplitude
    spectrum symmetry of real series, so could you tell me why?

    B.T.W., I also compute the amplitude spectrum using fft program I
    wrote and
    find that the result is not the same with SAC generated, I checked
    the
    program carefully and be sure that it's right and conform with the
    theoretical result.

    thanks for your attention!


    Your sincerely,
    Xu W.

    ************************************************
    Dr. WeiWei Xu
    Institute of Geology and Geophysics
    Chinese Academy of Sciences
    P.O.Box 9825
    Beijing 100029
    China
    Tel: 0086-10-62007354(Office)
    Fax: 0086-10-62010846
    ************************************************



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

    Message: 3
    Date: Sat, 8 Mar 2008 13:29:51 +0200
    From: "Onur Tan" <Onur.Tan<at>mam.gov.tr>
    Subject: [SAC-HELP] Blackboard Variables and CUT
    To: <sac-help<at>iris.washington.edu>
    Message-ID:
    <110C3E0C4E9ADB4C882229C2A7A1540A052C2511<at>POSTA2K3.mam.gov.tr>
    Content-Type: text/plain; charset="us-ascii"


    Hi,

    When I use a blackboard variable as the first parameter of the cut
    command in SAC new version (101.0),
    it gives error.

    I tried this (echo on):
    --------------------
    SAC> setbb a 600
    setbb a 600
    SAC> setbb b 700
    setbb b 700
    SAC> cut %a %b
    cut %a %b
    ==> cut 600
    SAC> r
    r
    WARNING: Start cut greater than stop cut for file 08010_0707_CEV.1
    ERROR 1301: No data files read in.
    SAC>
    -----------------------------
    the cut command do not understand the second variable.


    This does also not work:
    ----
    SAC> cut %a 700
    cut %a 700
    ==> cut 600
    SAC> r
    r
    WARNING: Start cut greater than stop cut for file 08010_0707_CEV.1
    ERROR 1301: No data files read in.
    ----


    But this works
    ----
    SAC> cut 500 %b
    cut 500 %b
    ==> cut 500 700
    SAC> r
    r
    SAC> p
    p
    ----


    Do you have any idea?

    best regards
    Onur Tan




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

    _______________________________________________
    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 33, Issue 4
    ***************************************




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


01:19:40 v.22510d55