Thread: blackboard variables

Started: 2014-06-16 19:30:34
Last activity: 2014-06-16 22:28:51
Topics: SAC Help
Geo .
2014-06-16 19:30:34
Hello,
I have noticed that blackboard variables declared with an underscore (e.g.
MIN_NPTS) cannot be recalled (e.g. %MIN_NPTS). Is this a bug or standard
syntax? I am using SAC version 101.6.

Many thanks!

Januka.

--
Januka Attanayake
Postdoctoral Research Associate
Laboratório de Sismologia
Complexo Interdisciplinar
Departamento de Física
Instituto Superior Técnico
Av. Rovisco Pais, 1
1049-001 Lisboa, Portugal

Honorary Research Associate
University College London

University email: januka.attanayake<at>ist.utl.pt
Homepage: http://sites.google.com/site/janukaattanayake/

  • Dongdong Tian
    2014-06-16 22:28:51
    Seems to be a bug of sac v101.6, and it works in the latest version of sac
    (v101.6a).

    SAC> setbb MIN_NPTS 10000
    SAC> fg impulse npts %MIN_NPTS
    SAC> lh npts

    FILE: IMPULSE - 1
    -------------
    npts = 10000




    2014-06-16 15:00 GMT+08:00 Januka Attanayake <jattanayake<at>gmail.com>:

    Hello,
    I have noticed that blackboard variables declared with an underscore (e.g.
    MIN_NPTS) cannot be recalled (e.g. %MIN_NPTS). Is this a bug or standard
    syntax? I am using SAC version 101.6.

    Many thanks!

    Januka.

    --
    Januka Attanayake
    Postdoctoral Research Associate
    Laboratório de Sismologia
    Complexo Interdisciplinar
    Departamento de Física
    Instituto Superior Técnico
    Av. Rovisco Pais, 1
    1049-001 Lisboa, Portugal

    Honorary Research Associate
    University College London

    University email: januka.attanayake<at>ist.utl.pt
    Homepage: http://sites.google.com/site/janukaattanayake/

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



    • Geo .
      2014-06-16 20:11:28
      Hi George,
      Thanks, the following example is what led to my question.

      This didn't work,
      SAC > SETBB DEC_FACT1 5
      SAC > DECIMATE %DEC_FACT1 FILTER ON
      (I also tried this with %DEC_FACT1% and SAC complains when
      calling DEC_FACT1)

      This, however, works fine,
      SAC > SETBB DFACT1 5
      SAC > DECIMATE %DFACT1 FILTER ON

      This (variables with strings) works fine,
      SAC > SETBB STAT_N_VEL '&1,KSTNM&_BHN.VEL.SAC'
      SAC > SETBB STAT_E_VEL '&1,KSTNM&_BHE.VEL.SAC'
      SAC > READ SETBB STAT_N_VEL SETBB STAT_E_VEL

      From this example, it seems to me that *numeric BB variables* are the ones
      showing this behaviour. I came across a similar issue when running SAC one
      liners as follows;

      This didn't work,
      READ file1 file2 file3
      SETBB MIN_NPTS (min &1,NPTS& &2,NPTS& &3,NPTS&)
      SETBB dt &1,DELTA&
      SETBB TRACE_LEN (MULTIPLY %MIN_NPTS% %dt%)
      (SAC complains when calling MIN_NPTS)

      But this works fine,
      SETBB MINNPTS (min &1,NPTS& &2,NPTS& &3,NPTS&)
      SETBB dt &1,DELTA&
      SETBB TRACE_LEN (MULTIPLY %MINNPTS% %dt%)

      Thanks again!


      On 16 June 2014 12:58, Dongdong Tian <seisman.ustc<at>gmail.com> wrote:

      Seems to be a bug of sac v101.6, and it works in the latest version of sac
      (v101.6a).

      SAC> setbb MIN_NPTS 10000
      SAC> fg impulse npts %MIN_NPTS
      SAC> lh npts

      FILE: IMPULSE - 1
      -------------
      npts = 10000




      2014-06-16 15:00 GMT+08:00 Januka Attanayake <jattanayake<at>gmail.com>:

      Hello,
      I have noticed that blackboard variables declared with an underscore
      (e.g. MIN_NPTS) cannot be recalled (e.g. %MIN_NPTS). Is this a bug or
      standard syntax? I am using SAC version 101.6.

      Many thanks!

      Januka.

      --
      Januka Attanayake
      Postdoctoral Research Associate
      Laboratório de Sismologia
      Complexo Interdisciplinar
      Departamento de Física
      Instituto Superior Técnico
      Av. Rovisco Pais, 1
      1049-001 Lisboa, Portugal

      Honorary Research Associate
      University College London

      University email: januka.attanayake<at>ist.utl.pt
      Homepage: http://sites.google.com/site/janukaattanayake/

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





      --
      Januka Attanayake
      Postdoctoral Research Associate
      Laboratório de Sismologia
      Complexo Interdisciplinar
      Departamento de Física
      Instituto Superior Técnico
      Av. Rovisco Pais, 1
      1049-001 Lisboa, Portugal

      Honorary Research Associate
      University College London

      University email: januka.attanayake<at>ist.utl.pt
      Homepage: http://sites.google.com/site/janukaattanayake/

05:17:47 v.22510d55