bluesky / bluesky-widgets

Components for graphical applications that interact with bluesky libraries
http://blueskyproject.io/bluesky-widgets
BSD 3-Clause "New" or "Revised" License
6 stars 22 forks source link

LivePlot and relative scans are confusing. #18

Open ambarb opened 4 years ago

ambarb commented 4 years ago

'ophyd': '1.5.1' 'bluesky': '1.6.3'

Workflow:

From the attached plot, it is clear that what is plotted must be absolute values, and not relative values as indicated by the labels on the axes. This will become very confusing. I myself, would prefer absolute values becuase bec.peaks reports absolute values. Relative is also nice in utility though (especially if you want to move to a local maximum, minimum or something not in bec.peaks.

RE(mv(fccd.fccd1.capture_bgnd, 1))
RE(rel_scan([fccd], nanop.tz,-0.0025, 0.0025, 101))
RE(rel_scan([fccd], nanop.tz,0.0, 0.0050, 101))
#RE(ZP_mvr(0.0026, dir='z'))
RE(ZP_mvr(0.0026, dir='z'))
grabit
RE(rel_scan([fccd], nanop.tx,-0.0025, 0.0025, 101))
RE(ZP_mvr(-0.0018, dir='x'))
grabit
RE(rel_scan([fccd], nanop.tz,-0.0025, 0.0025, 101))
ambarb commented 4 years ago

Web interface on this machine will not let me add the picture. Please let me know if you want it so I can scp this png to my own computer.

ambarb commented 4 years ago

Web interface on this machine will not let me add the picture. Please let me know if you want it so I can scp this png to my own computer.

ambarb commented 4 years ago

Web interface on this machine will not let me add the picture. Please let me know if you want it so I can scp this png to my own computer.

ambarb commented 4 years ago

excuse the mess. something is strange at our workstation in general and the multiple messages aren't passive aggressive.

danielballan commented 4 years ago

This is a sensible request. Moving to the new bluesky/bluesky-widgets repo where we are working on "Best Effort Visualization" (new, more user-oriented branding for the "Best Effort Callback").

danielballan commented 4 years ago

Would it be suitable for the best-effort visualization code to detect when an axis is begin traversed in a "relative" fashion by a plan and, if so, use a secondary axis?

ambarb commented 4 years ago

Would it be suitable for the best-effort visualization code to detect when an axis is begin traversed in a "relative" fashion by a plan and, if so, use a secondary axis?

Yes, if I understand correctly. One x-axis is absolute and another x-axis would have relative. but I don't see how you do that in the same subplot in the circumstance I outlined above -- if you move after the first scan and then do another relative scan. IT seems to me that this would have the same issue.

Maybe it is just better to accept the behavior as it stands because for the real_grid_scan and rel_scan it is also convenient to just bps.mvr to a desired position on the plot if it does not correspond to bec.peaks . It is just super confusing to overlay plots that so the other option is to just make sure that rel_scan is plotted using relative coordinates and not absolute coordinates. Do I make sense? The problem there would be that if there are "common" features to the scan, they will no longer match, but at least the axis makes sense.

ambarb commented 4 years ago

For the last case, if you want to plot absolute, open a notebook and plot absolute valves from the table.