Thread: Multiple Questions

Started: 2013-11-20 00:27:28
Last activity: 2013-11-21 18:37:35
Topics: SAC Help
Jesse Hutchinson
2013-11-20 00:27:28
Hello,

I am a fairly new user of SAC. I am using it on CentOS.

I have imported events from an Antelope database into SAC files for each
event (the events were actually extracted based on the presence of
converted phases, such as sP and pS waves). I have also adjusted the 0
time for the files to be at the same time as the first arrival, so that
the P phase is always at 0, and all of the other phases have been
adjusted correspondingly.

I have encountered a couple of difficulties however. The first problem
has manifested when using p1(plot1). The resultant plot from 'p1
absolute' does not show any data and the font on the axes is
ridiculously small. From what I can tell, the x-axis is far too large. I
have tried cutting the plots to be between -0.5 and 7 seconds along the
x-axis, but this doesn't seem to effect the p1 plot at all, however, it
does work properly for single waveform plots. When using 'p1 perplot #',
I am sometimes able to see the waveforms, and at other times not. The
problem is that they all show up on single waveform plots, so I am
rather perplexed as to what is going on.

My second problem is that I would like to be able to save .sgf or image
files when using p1 perplot, but I am unsure how to do this. When using
saveimg, for example, only the last plot is saved, not all of them. Does
anyone know how to do this, or is it an impossible task?

For my final problem, I would like to know if the sss command,
plotstack, can be plotted so that file names are hidden. Because I have
over a dozen waveforms on a single plot that are taken from files with
fairly long names, the names overly a large part of the plot and make it
nearly impossible to read. The plus side, is that I don't have the same
problem with visualization of all of the waveforms like I have with p1.
From what I can tell a lot of the plot editing functions do not seem to
work correctly with plotstack, so any advice would be appreciated here
as well.

I appreciate any and all help.

-Sincerely Jesse Hutchinson


  • Brian Savage
    2013-11-20 22:40:47
    Jesse,

    Would you mind sending me a selection of sac files and commands for any set of commands you think is not working properly.

    It appears that the first problem (waveforms not appearing) is a bug and needs fixing.

    Saving multiple files to plots can be achieved with something like
    SAC> read file1 file2 file3 file4
    SAC> bd sgf
    SAC> p1 p 1
    Waiting
    Waiting
    Waiting
    SAC> ls *.sgf
    f001.sgf f002.sgf f003.sgf f004.sgf

    This cannot currently be done with the saveimg command. This is something we need to consider.

    Please let us know what version you are running.

    Thanks
    Brian

    On Nov 19, 2013, at 7:27 PM, Jesse Hutchinson wrote:

    Hello,

    I am a fairly new user of SAC. I am using it on CentOS.

    I have imported events from an Antelope database into SAC files for each
    event (the events were actually extracted based on the presence of
    converted phases, such as sP and pS waves). I have also adjusted the 0
    time for the files to be at the same time as the first arrival, so that
    the P phase is always at 0, and all of the other phases have been
    adjusted correspondingly.

    I have encountered a couple of difficulties however. The first problem
    has manifested when using p1(plot1). The resultant plot from 'p1
    absolute' does not show any data and the font on the axes is
    ridiculously small. From what I can tell, the x-axis is far too large. I
    have tried cutting the plots to be between -0.5 and 7 seconds along the
    x-axis, but this doesn't seem to effect the p1 plot at all, however, it
    does work properly for single waveform plots. When using 'p1 perplot #',
    I am sometimes able to see the waveforms, and at other times not. The
    problem is that they all show up on single waveform plots, so I am
    rather perplexed as to what is going on.

    My second problem is that I would like to be able to save .sgf or image
    files when using p1 perplot, but I am unsure how to do this. When using
    saveimg, for example, only the last plot is saved, not all of them. Does
    anyone know how to do this, or is it an impossible task?

    For my final problem, I would like to know if the sss command,
    plotstack, can be plotted so that file names are hidden. Because I have
    over a dozen waveforms on a single plot that are taken from files with
    fairly long names, the names overly a large part of the plot and make it
    nearly impossible to read. The plus side, is that I don't have the same
    problem with visualization of all of the waveforms like I have with p1.
    From what I can tell a lot of the plot editing functions do not seem to
    work correctly with plotstack, so any advice would be appreciated here
    as well.

    I appreciate any and all help.

    -Sincerely Jesse Hutchinson

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



    • Jesse Hutchinson
      2013-11-20 20:02:28
      Hi Brian,

      I've attached the first five waveforms from one of my stations (s10).
      They should be loaded in the order 1012,1034,103,1051, and 1090. This
      has to do with least to greatest distance of the seismometer from the
      hypocenter of the earthquake. To recreate the blank plot, I typed:

      SAC>r s10.1012.ehz.SAC s10.1034.ehz.SAC s10.103.ehz.SAC s10.1051.ehz.SAC
      s10.1090.ehz.SAC
      SAC>p1 p 5

      Thank you for the advice on how to use 'bd sgf'. I've got that all
      working now with a script that converts the sgf files to ps files
      automatically.

      For further info, I am running SAC v. 101.5c on CentOS 6.4. I also
      discovered a workaround to my plotting issue with p1 using xlim and
      making the plot relative afterward.

      SAC>r s10.1012.ehz.SAC s10.1034.ehz.SAC s10.103.ehz.SAC s10.1051.ehz.SAC
      s10.1090.ehz.SAC
      SAC>xlim -0.5 6
      SAC>p1 p 5 relative

      Somehow, the absolute plot seems to be the issue. I hope that helps and
      that the problem can be reliably found. Thanks again!

      -Jesse

      On Wed, 2013-11-20 at 14:40 -0500, Brian Savage wrote:
      Jesse,

      Would you mind sending me a selection of sac files and commands for any set of commands you think is not working properly.

      It appears that the first problem (waveforms not appearing) is a bug and needs fixing.

      Saving multiple files to plots can be achieved with something like
      SAC> read file1 file2 file3 file4
      SAC> bd sgf
      SAC> p1 p 1
      Waiting
      Waiting
      Waiting
      SAC> ls *.sgf
      f001.sgf f002.sgf f003.sgf f004.sgf

      This cannot currently be done with the saveimg command. This is something we need to consider.

      Please let us know what version you are running.

      Thanks
      Brian

      On Nov 19, 2013, at 7:27 PM, Jesse Hutchinson wrote:

      Hello,

      I am a fairly new user of SAC. I am using it on CentOS.

      I have imported events from an Antelope database into SAC files for each
      event (the events were actually extracted based on the presence of
      converted phases, such as sP and pS waves). I have also adjusted the 0
      time for the files to be at the same time as the first arrival, so that
      the P phase is always at 0, and all of the other phases have been
      adjusted correspondingly.

      I have encountered a couple of difficulties however. The first problem
      has manifested when using p1(plot1). The resultant plot from 'p1
      absolute' does not show any data and the font on the axes is
      ridiculously small. From what I can tell, the x-axis is far too large. I
      have tried cutting the plots to be between -0.5 and 7 seconds along the
      x-axis, but this doesn't seem to effect the p1 plot at all, however, it
      does work properly for single waveform plots. When using 'p1 perplot #',
      I am sometimes able to see the waveforms, and at other times not. The
      problem is that they all show up on single waveform plots, so I am
      rather perplexed as to what is going on.

      My second problem is that I would like to be able to save .sgf or image
      files when using p1 perplot, but I am unsure how to do this. When using
      saveimg, for example, only the last plot is saved, not all of them. Does
      anyone know how to do this, or is it an impossible task?

      For my final problem, I would like to know if the sss command,
      plotstack, can be plotted so that file names are hidden. Because I have
      over a dozen waveforms on a single plot that are taken from files with
      fairly long names, the names overly a large part of the plot and make it
      nearly impossible to read. The plus side, is that I don't have the same
      problem with visualization of all of the waveforms like I have with p1.
      From what I can tell a lot of the plot editing functions do not seem to
      work correctly with plotstack, so any advice would be appreciated here
      as well.

      I appreciate any and all help.

      -Sincerely Jesse Hutchinson

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



      • Arthur Snoke
        2013-11-21 18:37:35
        Jesse,

        Thanks for sending the data and SAC commands that show the problems you are having.

        I do not think there is an "error" in SAC. The "p1 relative} works for you (and you do not need to use the xlim command). Your five data files span about 48 hours and it seems appropriate to me that the plotted total time covers that time range.

        You write, "the font on the axes is ridiculously small". I do not see that. Here is the terminal session I ran, and I am attaching the PDF file.

        [macquake:sac-stuff/tests/jesse] snoke% newsac /usr/local/jas/sac-101.5c
        SEISMIC ANALYSIS CODE [02/01/2012 (Version 101.5c)]
        Copyright 1995 Regents of the University of California

        SAC> r s10.1012.ehz.SAC s10.1034.ehz.SAC s10.103.ehz.SAC s10.1051.ehz.SAC s10.1090.ehz.SAC
        SAC> title "v101.5c p1 absolute"
        SAC> p1
        SAC> save v101-5c_p1_absolute.pdf
        save file v101-5c_p1_absolute.pdf [PDF]

        Sounds like Brian has given you a solution for your SGF questions. Hopefgully someone else can help you with your SSS questions, as I rarely use that subprocess.

        Arthur

        On Nov 20, 2013, at 3:02 PM, Jesse Hutchinson wrote:

        Hi Brian,

        I've attached the first five waveforms from one of my stations (s10).
        They should be loaded in the order 1012,1034,103,1051, and 1090. This
        has to do with least to greatest distance of the seismometer from the
        hypo> center of the earthquake. To recreate the blank plot, I typed:

        SAC>r s10.1012.ehz.SAC s10.1034.ehz.SAC s10.103.ehz.SAC s10.1051.ehz.SAC
        s10.1090.ehz.SAC
        SAC>p1 p 5

        Thank you for the advice on how to use 'bd sgf'. I've got that all
        working now with a script that converts the sgf files to ps files
        automatically.

        For further info, I am running SAC v. 101.5c on CentOS 6.4. I also
        discovered a workaround to my plotting issue with p1 using xlim and
        making the plot relative afterward.

        SAC>r s10.1012.ehz.SAC s10.1034.ehz.SAC s10.103.ehz.SAC s10.1051.ehz.SAC
        s10.1090.ehz.SAC
        SAC>xlim -0.5 6
        SAC>p1 p 5 relative

        Somehow, the absolute plot seems to be the issue. I hope that helps and
        that the problem can be reliably found. Thanks again!



  • Sheila Peacock
    2013-11-20 23:50:54
    Dear Jesse,

    Could you tell us which version of SAC you are using?

    Regards,
    Sheila Peacock,
    Blacknest.

Page built 11:27:25 | v.b'ea7a92