how to plot gaps in the history data?

Issue #260 resolved
dd1 created an issue

If there is a long gap in the data (in this case, there was some kind of outage, many hours), should the history plot graph be empty where there is no data? Right now it connects the start and the end of the gap with a straight line. K.O.

https://daq16.triumf.ca/?cmd=History&group=PWB&panel=v_p5&A=1596473494&B=1596559894

Comments (7)

  1. Stefan Ritt

    A question I was also thinking about since a long time. The problem is that there is not real definition of a “gap”. Is it one minute, one hour, one day? Note that the history is “change-driven”. So whenever a value changes more than an error bar, a new value is injected. If we have a very stable temperature which is exactly at the same point for one day, chances are that the value is NOT updated during this one day. In that case a straight line it the correct way to connect the points. An empty gap would be wrong. Most equipments are “forced” to write a full history event after a certain time (controlled by /Equipment/<name>/Common/Period). But this period is not stored in the history system. Yes the history plotting function can retrieve that period from the ODB, but what if it got changed recently, and we have data in the history system with 1h period followed with 1m periods. The code would only see the 1m period, and display “emtpy gaps” between all 1h points in the previous history. So I’m afraid there is no 100% safe solution for that.

  2. dd1 reporter

    Only some equipments are “change driven”, the only ones I am aware of are those built on top of the “slow control frontend” framework. All frontends I write do not do “change driven” history. I think all the history on the ALPHA and ALPHA-g experiments are not “change driven”. They record data with a fixed period. K.O.

  3. dd1 reporter

    In the “change driven” system one cannot tell “data not changing” from “frontend is not running”. I think a “change driven” system should still periodically write to the history, be it 1/hour or 1/day, just to indicate that it is still alive. K.O.

  4. dd1 reporter

    How long is a “gap”? I would say, 1 day or 1 week would be a reasonable default value. K.O.

  5. Stefan Ritt

    If I put it to 1 day, people will have a gap of 23 hours and say “There is a gap, why are there lines connecting the points!”.

  6. Stefan Ritt

    Decided to give the gap drawing a chance. Fixed the gap to 10 minutes. I like it that way. Check if it works for your setup.

    Screenshot 2020-08-05 at 14.34.23 .png

  7. Log in to comment