Thread: sac graphic problem

Started: 2017-09-19 17:06:13
Last activity: 2017-09-19 17:06:13
Topics: SAC Help
Sachin Tiwari
2017-09-19 17:06:13
Hi sac users,

I have the following sac macro:














*sc mkdir GoodOnesdo file wild X4_GC_16/*sac setbb vert $file r %vert qdp
off p setbb resp (REPLY "Enter g to copy the file to GoodOnes")if %resp eq
"g" then sc cp %vert GoodOneselse Message "...This was a bad
event." endifenddo*

I want to plot each file and examine it and then send it to GoodOnes folder
by typing "g". But the graphic window it shows does not plot anything at
all and it is all white.

What could be the possible error. Please help.

--
*Sachin Kumar *
*Junior Research Fellow (JRF)*
*Dept. of Applied Geophysics*
*Indian Institute of Technology (Indian School of Mines), Dhanbad*
*Jharkhand- 826004, India.*

*Mobile No.:+91-7631056163*
*Email : *
*sachinism15<at>gmail.com , <sachinism15<at>gmail.com> ismsachin<at>outlook.com
<sachinism15<at>gmail.com>*

  • Geo .
    2017-09-19 16:45:12
    Hi Sachin,
    My guess is that the if statement, which a shell script, jumps ahead of the
    plot function. You can avoid this issue by adding a pause just before the
    if statement. This worked for me. Also, note that your setbb is redundant.
    If you only want to plot the vertical component, then filter other
    components out right at the do wild statement;

    Here's an example that works for me,
    sc rm -r GoodOnes
    sc mkdir GoodOnes
    do file wild *.BHZ.SAC
    r $file
    qdp off
    p
    pause period 0.2
    setbb resp (REPLY "Enter g to copy the file to GoodOnes: ")
    if %resp eq "g" then
    sc cp $file GoodOnes
    else
    Message "...This was a bad event."
    endif
    enddo

    Januka



    Januka Attanayake
    Postdoctoral Research Associate

    Institute for Geophysics
    WWU Münster | CorrensstraBe 24 | 48149 Münster | Germany
    Tel +49 251 833 4727

    University email: jattanayake<at>uni-muenster.de
    Homepage: http://sites.google.com/site/janukaattanayake/

    On 19 September 2017 at 06:37, Sachin Tiwari <sachinism15<at>gmail.com> wrote:

    Hi sac users,

    I have the following sac macro:














    *sc mkdir GoodOnesdo file wild X4_GC_16/*sac setbb vert $file r %vert qdp
    off p setbb resp (REPLY "Enter g to copy the file to GoodOnes")if %resp eq
    "g" then sc cp %vert GoodOneselse Message "...This was a bad
    event." endifenddo*

    I want to plot each file and examine it and then send it to GoodOnes
    folder by typing "g". But the graphic window it shows does not plot
    anything at all and it is all white.

    What could be the possible error. Please help.

    --
    *Sachin Kumar *
    *Junior Research Fellow (JRF)*
    *Dept. of Applied Geophysics*
    *Indian Institute of Technology (Indian School of Mines), Dhanbad*
    *Jharkhand- 826004, India.*

    *Mobile No.:+91-7631056163 <+91%2076310%2056163>*
    *Email : *
    *sachinism15<at>gmail.com , <sachinism15<at>gmail.com> ismsachin<at>outlook.com
    <sachinism15<at>gmail.com>*


    ----------------------
    SAC Help | http://ds.iris.edu/message-center/topic/sac-help/ |
    Unsubscribe: sac-help-unsubscribe<at>lists.ds.iris.edu

    Sent from the IRIS Message Center (http://ds.iris.edu/message-center/)
    Update subscription preferences at http://ds.iris.edu/account/profile/



02:32:51 v.f0c1234e