Thread: SAC 102.0 PLOTC command NOT working in REPLAY mode

Started: 2021-12-19 16:18:11
Last activity: 2021-12-23 18:47:39
Topics: SAC Help
Victor Vescu
2021-12-19 16:18:11
Hello,

I am running SAC 102.0 on a Windows 10 machine using Cygwin AND on an Ubuntu 18.04 Virtual Machine.

I am encountering problems on both when trying to run the PLOTC command.

The command works properly in CREATE mode (allows me to make annotations using the cursor, writes everything into the pcf or pcm file I specified - all good), but NOT in REPLAY mode.

When I run the command in REPLAY mode, giving it either a file or a macro containing good instructions (including files or macros created by PLOTC itself in CREATE mode), the command essentially acts as if I had ran it in CREATE mode (i.e. it opens a window with no created annotations in which I can make annotations using the cursor and replaces the contents of the pcf or pcm file I specified with what I annotate - if I don't annotate anything it just deletes the contents of those files).

Any help or workaround would be much appreciated, thanks!

Best,
Victor V
Master's Student in Seismology
  • George Helffrich
    2021-12-23 18:09:54
    Dear Victor V -

    You might be forgetting to put a Q command at the end of your .pcf or .pcm file. If this is missing, SAC assumes that you want to add to the end of it, even if you REPLAY the file. After you build the file with SAC (or an auxiliary program or script), manually edit the file to add the Q (or have your program/script do it).

    On 23 Dec 2021, at 17:28, Victor Vescu (via IRIS) <sac-help-bounce<at>lists.ds.iris.edu> wrote:

    Hello,

    I am running SAC 102.0 on a Windows 10 machine using Cygwin AND on an Ubuntu 18.04 Virtual Machine.

    I am encountering problems on both when trying to run the PLOTC command.

    The command works properly in CREATE mode (allows me to make annotations using the cursor, writes everything into the pcf or pcm file I specified - all good), but NOT in REPLAY mode.

    When I run the command in REPLAY mode, giving it either a file or a macro containing good instructions (including files or macros created by PLOTC itself in CREATE mode), the command essentially acts as if I had ran it in CREATE mode (i.e. it opens a window with no created annotations in which I can make annotations using the cursor and replaces the contents of the pcf or pcm file I specified with what I annotate - if I don't annotate anything it just deletes the contents of those files).

    Any help or workaround would be much appreciated, thanks!

    Best,
    Victor V
    Master's Student in Seismology

    ----------------------
    SAC Help
    Topic home: http://ds.iris.edu/message-center/topic/sac-help/ | Unsubscribe: sac-help-unsubscribe<at>lists.ds.iris.edu

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



    George Helffrich
    george<at>elsi.jp


    • Dear George,

      Thank you very much for your response, much appreciated! I really wish this were the issue, but sadly I did not forget to add a Q command at the end of my files.

      I have tried, for example, adding a Q line at the end of the sac-generated files, as well as running something like this script taken from your SAC book:

      * The following line sets the line style to be thicker than default
      [W3]
      O 0.5 0.5
      C 0.5 0.8
      O 0.2 0.2
      R 0.8 0.8
      Q

      The PLOTC command still seems to ignore the contents of my files and just opens an empty canvas every time, despite my attempts to run it in REPLAY mode.

      The reason I am trying to run the PLOTC command in the first place is that I am trying to use your ttsac macro:

      https://github.com/ghfbsd/sacbook/blob/master/methods/split/ttsac

      I have scoured the SAC manual for the PLOTC command, as well as your "Seismic Analysis Code - A Primer and User's Guide" book, and both were very helpful, but sadly I could not find anything that might pinpoint why the PLOTC always seemingly runs in CREATE mode for me.

      Any other ideas would be very much appreciated!

      All the best,
      Victor
      ________________________________
      From: George Helffrich <george<at>elsi.jp>
      Sent: 23 December 2021 6:09 PM
      To: Victor Vescu <victor.vescu<at>worc.ox.ac.uk>; sac-help<at>lists.ds.iris.edu <sac-help<at>lists.ds.iris.edu>
      Subject: Re: [IRIS][sac-help] SAC 102.0 PLOTC command NOT working in REPLAY mode

      Dear Victor V -

      You might be forgetting to put a Q command at the end of your .pcf or .pcm file. If this is missing, SAC assumes that you want to add to the end of it, even if you REPLAY the file. After you build the file with SAC (or an auxiliary program or script), manually edit the file to add the Q (or have your program/script do it).

      On 23 Dec 2021, at 17:28, Victor Vescu (via IRIS) <sac-help-bounce<at>lists.ds.iris.edu<sac-help-bounce<at>lists.ds.iris.edu>> wrote:

      Hello,

      I am running SAC 102.0 on a Windows 10 machine using Cygwin AND on an Ubuntu 18.04 Virtual Machine.

      I am encountering problems on both when trying to run the PLOTC command.

      The command works properly in CREATE mode (allows me to make annotations using the cursor, writes everything into the pcf or pcm file I specified - all good), but NOT in REPLAY mode.

      When I run the command in REPLAY mode, giving it either a file or a macro containing good instructions (including files or macros created by PLOTC itself in CREATE mode), the command essentially acts as if I had ran it in CREATE mode (i.e. it opens a window with no created annotations in which I can make annotations using the cursor and replaces the contents of the pcf or pcm file I specified with what I annotate - if I don't annotate anything it just deletes the contents of those files).

      Any help or workaround would be much appreciated, thanks!

      Best,
      Victor V
      Master's Student in Seismology

      ----------------------
      SAC Help
      Topic home: http://ds.iris.edu/message-center/topic/sac-help/ | Unsubscribe: sac-help-unsubscribe<at>lists.ds.iris.edu<sac-help-unsubscribe<at>lists.ds.iris.edu>

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



      George Helffrich
      george<at>elsi.jp<george<at>elsi.jp>


20:45:55 v.01697673