Thread: RTREND seems not work

Started: 2015-12-22 14:43:35
Last activity: 2015-12-23 13:27:07
Topics: SAC Help
Weijia
2015-12-22 14:43:35
Dear All,

I try to use rtrend to remove the linear trend. It seems not to work well properly. Is there something wrong with my version 101.6a?


Many thanks.


--

Kind regards,


Weijia
Attachments
  • Milton Plasencia
    2015-12-22 13:08:51
    Weijia,

    Your file in not “synchronized”, so rtf seems not work here, try:

    r AU.FORT.01994
    synch
    mean
    rtf

    and it works.

    HTH,

    Milton



    On Dec 21, 2015, at 23:46, Weijia <swj<at>mail.iggcas.ac.cn> wrote:

    Dear All,

    I try to use rtrend to remove the linear trend. It seems not to work well properly. Is there something wrong with my version 101.6a?

    Many thanks.

    --
    Kind regards,

    Weijia



    <AU.FORT.01994>
    ----------------------
    SAC Help (http://ds.iris.edu/message-center/topic/sac-help/)

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


    • Brian Savage
      2015-12-22 16:16:29
      Weijia,

      Milton is mostly correct. The file you sent has a large initial time value.

      During the computation of the slope and intercept in scm/lifite.c, the values of sum(x) and sum(x^2) lose precision due to the large values thus resulting in a negative variance making for a bad result. The variance should not be negative.

      This is simply fixed by using a smaller b value. This is what synchronize command will do for you.
      or
      A different fix would be to make sure the summations in scm/lifite.c do not lose precision for large values. The computation of the data mean has also had this issue. I will add these fixes into the next version.

      Cheers,
      Brian

      On Dec 21, 2015, at 11:09 PM, Milton Plasencia <mplasencia<at>inogs.it> wrote:

      Weijia,

      Your file in not “synchronized”, so rtf seems not work here, try:

      r AU.FORT.01994
      synch
      mean
      rtf

      and it works.

      HTH,

      Milton

      <Screen Shot 2015-12-22 at 05.07.41.png>

      On Dec 21, 2015, at 23:46, Weijia <swj<at>mail.iggcas.ac.cn> wrote:

      Dear All,

      I try to use rtrend to remove the linear trend. It seems not to work well properly. Is there something wrong with my version 101.6a?

      Many thanks.

      --
      Kind regards,

      Weijia



      <AU.FORT.01994>
      ----------------------
      SAC Help (http://ds.iris.edu/message-center/topic/sac-help/)

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


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

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


      • Weijia
        2015-12-23 13:27:07
        Dear Milton and Brian,

        Thanks very much for your answer. This may be common while cutting continuous waveforms into a fixed length.



        Merry Christmas and Happy new year 2016.


        --

        Kind regards,


        Weijia

        At 2015-12-22 21:17:24, "savage<at>uri.edu" <savage<at>uri.edu> wrote:
        Weijia,


        Milton is mostly correct. The file you sent has a large initial time value.


        During the computation of the slope and intercept in scm/lifite.c, the values of sum(x) and sum(x^2) lose precision due to the large values thus resulting in a negative variance making for a bad result. The variance should not be negative.


        This is simply fixed by using a smaller b value. This is what synchronize command will do for you.
        or
        A different fix would be to make sure the summations in scm/lifite.c do not lose precision for large values. The computation of the data mean has also had this issue. I will add these fixes into the next version.


        Cheers,
        Brian


        On Dec 21, 2015, at 11:09 PM, Milton Plasencia <mplasencia<at>inogs.it> wrote:


        Weijia,


        Your file in not “synchronized”, so rtf seems not work here, try:


        r AU.FORT.01994
        synch
        mean
        rtf


        and it works.


        HTH,


        Milton


        <Screen Shot 2015-12-22 at 05.07.41.png>


        On Dec 21, 2015, at 23:46, Weijia <swj<at>mail.iggcas.ac.cn> wrote:


        Dear All,

        I try to use rtrend to remove the linear trend. It seems not to work well properly. Is there something wrong with my version 101.6a?


        Many thanks.


        --

        Kind regards,


        Weijia





        <AU.FORT.01994>
        ----------------------
        SAC Help (http://ds.iris.edu/message-center/topic/sac-help/)

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




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

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



09:00:40 v.01697673