Thread: extracting time series in sac to excel

Started: 2014-01-07 01:47:15
Last activity: 2014-01-07 16:52:26
Topics: SAC Help
firdaus
2014-01-07 01:47:15
dear All

anyone knows how to extract time series in sac file to excel sheet ?

I need this time series in order to use it in EERA.


regards

  • Chad Trabant
    2014-01-07 02:38:34

    Hello Firdaus,

    The easiest solution is to convert the SAC data to simple ASCII format and “import” the text values into Excel.

    One possibility is to use the ‘sac’ program to write the data in “SAC alphanumeric” format, which is just ASCII. The challenge is that this data is not easily imported into Excel due to how it is formatted (the series spans multiple columns).

    An easier possibility is to use one of many programs to convert the SAC data to simple ASCII in a single column of data (and time stamps).

    If you can compile software from source code, one such program that I would recommended is called "sacdump” available here:

    https://seiscode.iris.washington.edu/projects/sacdump

    To print all the defined headers and the all the samples, you can use a command line like this:

    $ sacdump -a -D mydata.sac > mydata.txt

    That command would save the output to a file mydata.txt, which can then be easily imported into Excel.

    The man page (and Wiki) contains full usage:
    https://seiscode.iris.washington.edu/projects/sacdump/wiki

    If you cannot compile software you should let the list know what system you are running on for other suggestions.

    regards,
    Chad


    On Jan 6, 2014, at 5:47 PM, Firdaus firdaus <alikomeini<at>gmail.com> wrote:

    dear All

    anyone knows how to extract time series in sac file to excel sheet ?

    I need this time series in order to use it in EERA.


    regards

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



    • sahar sadri
      2014-01-07 16:52:26
      Hello

      you can also use 'saclst' command to read the time you want and then put
      them in a text file:

      saclst a f mydata.sac >> mydata.txt




      On Tue, Jan 7, 2014 at 6:08 AM, Chad Trabant <chad<at>iris.washington.edu>wrote:


      Hello Firdaus,

      The easiest solution is to convert the SAC data to simple ASCII format and
      “import” the text values into Excel.

      One possibility is to use the ‘sac’ program to write the data in “SAC
      alphanumeric” format, which is just ASCII. The challenge is that this data
      is not easily imported into Excel due to how it is formatted (the series
      spans multiple columns).

      An easier possibility is to use one of many programs to convert the SAC
      data to simple ASCII in a single column of data (and time stamps).

      If you can compile software from source code, one such program that I
      would recommended is called "sacdump” available here:

      https://seiscode.iris.washington.edu/projects/sacdump

      To print all the defined headers and the all the samples, you can use a
      command line like this:

      $ sacdump -a -D mydata.sac > mydata.txt

      That command would save the output to a file mydata.txt, which can then be
      easily imported into Excel.

      The man page (and Wiki) contains full usage:
      https://seiscode.iris.washington.edu/projects/sacdump/wiki

      If you cannot compile software you should let the list know what system
      you are running on for other suggestions.

      regards,
      Chad


      On Jan 6, 2014, at 5:47 PM, Firdaus firdaus <alikomeini<at>gmail.com> wrote:

      dear All

      anyone knows how to extract time series in sac file to excel sheet ?

      I need this time series in order to use it in EERA.


      regards

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


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




      --

12:03:15 v.b3198453