labscript-suite / runviewer

π—Ώπ˜‚π—»π˜ƒπ—Άπ—²π˜„π—²π—Ώ is a graphical interface for visualising hardware-timed experiments composed using the 𝘭𝘒𝘣𝘴𝘀𝘳π˜ͺ𝘱𝘡 𝘴𝘢π˜ͺ𝘡𝘦.
http://labscriptsuite.org
BSD 2-Clause "Simplified" License
2 stars 39 forks source link

Custom scaling for nonlinear time #24

Closed philipstarkey closed 6 years ago

philipstarkey commented 6 years ago

Original report (archived issue) by Shaun Johnstone (Bitbucket: shjohnst, GitHub: shjohnst).


To extend the functionality of nonlinear time, I propose that we introduce the ability to move markers by hand, by clicking & dragging them in the top markers plot area. This would be active at all times, and instead of the current toggle button to switch between nonlinear time and linear time, there would be two reset push buttons, one to move the markers back to their 'natural' positions, corresponding to linear time, and one to move the markers to be evenly spaced, as they are in the current implementation of nonlinear time.

When the markers are in their regular linear time positions, the x-axis should show time ticks, but once markers have been moved time will only be accessible via the tooltip (as it is in the current nonlinear time mode).

Following on from discussion in issue #5, and discussions with @cbillington, I would suggest that the behavior of markers is similar to that of the columns in a file browser (or runmanager), where moving a marker re-scales the space to its left, and translates markers to its right.

A basic example of this functionality, based on example code by @PhyNerd, is available here: https://pastebin.com/2PeQgwD4

philipstarkey commented 6 years ago

Original comment by Shaun Johnstone (Bitbucket: shjohnst, GitHub: shjohnst).


I'm part way through working out an implementation for this, so don't worry about looking into it @PhyNerd

philipstarkey commented 6 years ago

Original comment by Jan Werkmann (Bitbucket: PhyNerd, GitHub: PhyNerd).


Sounds good. The 'file browser'-like scrolling feels much better than the original demo code! Have you also made progress with the additional markers? For shots that don't have markers this might be useful. But that would probably be a different issue.

philipstarkey commented 6 years ago

Original comment by Shaun Johnstone (Bitbucket: shjohnst, GitHub: shjohnst).


I think I'll leave extra markers for now, but might look into it once I've got the new scaling working.

philipstarkey commented 6 years ago

Original comment by Shaun Johnstone (Bitbucket: shjohnst, GitHub: shjohnst).


Resolved by pull request #29