Thread: size of the ASCII data in points

Started: 2016-12-02 22:16:50
Last activity: 2016-12-03 14:47:11
Topics: SAC Help
Igor
2016-12-02 22:16:50
Hello,

Maybe this was explained before but I cannot find an answer.

After converting a 1200 sec SAC file, I am getting the ASCII file with 1191
data points.
Why don't I have all the 1200 points?

Here are some commands (the header values take 4 lines in my example)

cat CIFLS__L1Z__.sac.txt | head
1200
2016,336 07:55:00.000
1.0
1050,1240,1390,1115,840,1065,1290,1320,1085,850,1130,
1410,1530,1625,1720,1480,1240,1445,1650,1210,1020,
830,985,1140,1490,1240,990,1125,1260,1370,1205,
1040,1250,1460,970,1075,1180,1420,1660,1500,1425,

cat CIFLS__L1Z__.sac.txt | tr "," "\n" | sed '/^$/d' | head
1200
2016
336 07:55:00.000
1.0
1050
1240
1390
1115
840
1065

cat CIFLS__L1Z__.sac.txt | tr "," "\n" | sed '/^$/d' | tail; echo
"----------"
1345
1470
960
1335
1710
840
1000
1160
1420
1680
----------

cat CIFLS__L1Z__.sac.txt | tr "," "\n" | sed '/^$/d' | wc -l
1195

Thanks,
Igor

  • Milton Plasencia
    2016-12-03 14:47:11
    Hi,

    Can you send more information about how convert sac to ascii,
    perhaps send a file sac to try, use external program to convert?
    all information will be useful.

    Because if you do:
    sac> funcgen
    sac> lh
    you can see the NTPS variable have 100 points
    after use write alpha command
    sac> w alpha aa.asc
    and obtain aa.asc
    if you look it have the same 100 points, formatted in 20 rows by 5 columns.

    HTH,

    Milton

    * * * * * * * * * * * * * * * * * * * * * * *
    Milton P. PLASENCIA LINARES

    Centro di Ricerche Sismologiche (CRS)
    OGS - Istituto Nazionale di Oceanografia e di Geofisica Sperimentale

    Borgo Grotta Gigante 42/C
    (34010) Sgonico - Trieste - Italia
    Tel: +39 040 2140 156 (Udine)
    Tel: +39 040 2140 256 (Trieste)
    Cel.: +39 331 6481 935

    E-mail: mplasencia<at>inogs.it
    GPG key: 22FCFFA8

    ASAIN (Antarctic Seismographic Argentinean Italian Network)
    *********************************

    On Dec 2, 2016, at 23:17, Igor <stubailo<at>gmail.com> wrote:

    Hello,

    Maybe this was explained before but I cannot find an answer.

    After converting a 1200 sec SAC file, I am getting the ASCII file with 1191 data points.
    Why don't I have all the 1200 points?

    Here are some commands (the header values take 4 lines in my example)

    cat CIFLS__L1Z__.sac.txt | head
    1200
    2016,336 07:55:00.000
    1.0
    1050,1240,1390,1115,840,1065,1290,1320,1085,850,1130,
    1410,1530,1625,1720,1480,1240,1445,1650,1210,1020,
    830,985,1140,1490,1240,990,1125,1260,1370,1205,
    1040,1250,1460,970,1075,1180,1420,1660,1500,1425,

    cat CIFLS__L1Z__.sac.txt | tr "," "\n" | sed '/^$/d' | head
    1200
    2016
    336 07:55:00.000
    1.0
    1050
    1240
    1390
    1115
    840
    1065

    cat CIFLS__L1Z__.sac.txt | tr "," "\n" | sed '/^$/d' | tail; echo "----------"
    1345
    1470
    960
    1335
    1710
    840
    1000
    1160
    1420
    1680
    ----------

    cat CIFLS__L1Z__.sac.txt | tr "," "\n" | sed '/^$/d' | wc -l
    1195

    Thanks,
    Igor

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

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


Page built 20:34:50 | v.b'ea7a92