Thread: question

Started: 2016-04-06 00:14:10
Last activity: 2016-04-06 06:29:37
Topics: SAC Help
‪mehrdad ansari‬ ‪
2016-04-06 00:14:10
hello
can you help?i face with an error when stacking,ERROR 1801: Header field mismatch:i use this script to stack my sac files,#!/bin/bash

# Written by Ansaripour

address_data=/home/mehrdad/CCF
cd $address_data


for fol in `ls`
do
cd $fol
for pairst in `ls` ; do
cd $pairst

ls *RR* | awk '{print "r "$1"\nrmean\nrtr\nw over"} END {print "q"}' | sac
ls *RR* | awk '{if (NR==1) print "r "$1;else print "addf "$1} END {print "div "NR"\nw stack.rr\nq"}' | sac
 
ls *ZZ* | awk '{print "r "$1"\nrmean\nrtr\nw over"} END {print "q"}' | sac
ls *ZZ* | awk '{if (NR==1) print "r "$1;else print "addf "$1} END {print "div "NR"\nw stack.zz\nq"}' | sac

ls *TT* | awk '{print "r "$1"\nrmean\nrtr\nw over"} END {print "q"}' | sac
ls *TT* | awk '{if (NR==1) print "r "$1;else print "addf "$1} END {print "div "NR"\nw stack.tt\nq"}' | sac

ls *RT* | awk '{print "r "$1"\nrmean\nrtr\nw over"} END {print "q"}' | sac
ls *RT* | awk '{if (NR==1) print "r "$1;else print "addf "$1} END {print "div "NR"\nw stack.rt\nq"}' | sac

ls *ZT* | awk '{print "r "$1"\nrmean\nrtr\nw over"} END {print "q"}' | sac
ls *ZT* | awk '{if (NR==1) print "r "$1;else print "addf "$1} END {print "div "NR"\nw stack.zt\nq"}' | sac

ls *ZR* | awk '{print "r "$1"\nrmean\nrtr\nw over"} END {print "q"}' | sac
ls *ZR* | awk '{if (NR==1) print "r "$1;else print "addf "$1} END {print "div "NR"\nw stack.zr\nq"}' | sac

done
done






========with kind regard


  • Milton Plasencia
    2016-04-06 06:29:37

    Hi,

    see if binopper command can help you.

    1801: Header field mismatch: - either the sampling interval or the number of points are not equal. -
    can be controlled using the BINOPERR http://ds.iris.edu/files/sac-manual/commands/binoperr.html command.

    Cheers,

    Milton


    On Apr 5, 2016, at 20:59, ‪mehrdad ansari‬ ‪ @iris.washington.edu <ansariporgeo<at>yah.oo.com> wrote:

    hello
    can you help?
    i face with an error when stacking,
    ERROR 1801: Header field mismatch:
    i use this script to stack my sac files,
    #!/bin/bash

    # Written by Ansaripour

    address_data=/home/mehrdad/CCF
    cd $address_data


    for fol in `ls`
    do
    cd $fol
    for pairst in `ls` ; do
    cd $pairst

    ls *RR* | awk '{print "r "$1"\nrmean\nrtr\nw over"} END {print "q"}' | sac
    ls *RR* | awk '{if (NR==1) print "r "$1;else print "addf "$1} END {print "div "NR"\nw stack.rr\nq"}' | sac

    ls *ZZ* | awk '{print "r "$1"\nrmean\nrtr\nw over"} END {print "q"}' | sac
    ls *ZZ* | awk '{if (NR==1) print "r "$1;else print "addf "$1} END {print "div "NR"\nw stack.zz\nq"}' | sac

    ls *TT* | awk '{print "r "$1"\nrmean\nrtr\nw over"} END {print "q"}' | sac
    ls *TT* | awk '{if (NR==1) print "r "$1;else print "addf "$1} END {print "div "NR"\nw stack.tt\nq"}' | sac

    ls *RT* | awk '{print "r "$1"\nrmean\nrtr\nw over"} END {print "q"}' | sac
    ls *RT* | awk '{if (NR==1) print "r "$1;else print "addf "$1} END {print "div "NR"\nw stack.rt\nq"}' | sac

    ls *ZT* | awk '{print "r "$1"\nrmean\nrtr\nw over"} END {print "q"}' | sac
    ls *ZT* | awk '{if (NR==1) print "r "$1;else print "addf "$1} END {print "div "NR"\nw stack.zt\nq"}' | sac

    ls *ZR* | awk '{print "r "$1"\nrmean\nrtr\nw over"} END {print "q"}' | sac
    ls *ZR* | awk '{if (NR==1) print "r "$1;else print "addf "$1} END {print "div "NR"\nw stack.zr\nq"}' | sac

    done
    done






    ========
    with kind regard


    ----------------------
    SAC Help (http://ds.iris.edu/message-center/topic/sac-help/)

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


    Attachments
15:24:27 v.e73c6799