I'm guessing this is a question of edge detection... but I might be barking up the wrong tree with that...

Have a look at the image, Sample_Transition.gif. This is about the cleanest version I can find of a process that happens about every minute or two across every day. "X" varies from 0 to 24 hours, "Y" varies from 44 to 120 (in this case). In the example, the transition from 44 to 90 is stepwise (which I'm not particularly interested in); that is, it generally rests on 44 and "if the conditions are right", it will immediately jump to 90; there are no in-between values. It's the next region that I'm more interested in...

What I'm trying to do is to detect when Y becomes somehow stable on 90 - let's call that T1. Then, Y will get to a stage of being somehow stable on 120 - let's say that's at T2. For simplicity's sake, I'll make the decision that I would like T3, the time I'm interested in, to be such that T3 = (T1+T2)/2, so I get a rough idea of the mid-point of the transition from "stable Y point 1" to "stable Y point 2".

As you can see in the periods around 06:40 and 07:40, there is still some instability and I'm guessing I might need to decide what constitutes "stable" before I can go any further... but how can I do that when the silly thing flips around so much? (a more typical picture is Busier_Activity.gif) - note that there should be another stable Y point in the period 09:30-15:00 or so).

Perhaps I need to do a line-fit of some sort, to get an "average" straight line for each of these "bouncing" regions and that would be enough (for example, see Simplified_Activity.gif)... but I'm not even sure how to reduce all this noise to something simpler...

I'd greatly appreciate any suggestions on how I might attack this...

Thanks.

NOTE: MediaFire is having update problems so the images are currently only downloadable and not directly viewable. Hopefully, this condition won't last long. --Aug 19, 2009 at 01:35 UTC

Update:Given up with MediaFire, trying something else for the image hosting, which seems to work Ok. --Aug 24, 2009 at 00:06 UTC


In reply to How to Determine Stable Y-Values... or Detect an Edge..? by ozboomer

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.