Thread: Macro

Started: 2017-11-27 23:06:55
Last activity: 2017-11-28 04:24:05
Topics: SAC Help
Thamer Banjar
2017-11-27 23:06:55
I have 100 files and I want to normalise the traces by using Macro. I wrote this script ( r *DA01*/.

rmean/.
rtrend/.
envelope/.

lh depmax depmin/.

setaa a (max &1,depmax)/.
setbb b (min &1,depmin)/.

div (max %a (abs %b))/.)
I want to take the depmax and depmin for each file and do the calculation, but the used depmax & depmin in the script is only from the first file. How can I take the data for each file?!



  • Geo .
    2017-11-28 04:24:05
    Hi,
    You have to read files in a for loop, and not as a list as you do with r
    *DA01*.

    Januka

    On Monday, 27 November 2017, Thamer Banjar <thamer.tr.1995<at>gmail.com> wrote:

    I have 100 files and I want to normalise the traces by using Macro. I
    wrote this script ( r *DA01*/.


    rmean/.
    rtrend/.
    envelope/.

    lh depmax depmin/.

    setaa a (max &1,depmax)/.
    setbb b (min &1,depmin)/.

    div (max %a (abs %b))/.)
    I want to take the depmax and depmin for each file and do the calculation,
    but the used depmax & depmin in the script is only from the first file. How
    can I take the data for each file?!




    --
    Januka Attanayake
    Postdoctoral Research Associate

    Institute of 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/

Page built 18:58:57 | v.b'59d0d2