NSLS-II / wishlist

an issue tracker for the big picture
1 stars 0 forks source link

Live Plotting without using a command line #28

Closed danielballan closed 8 years ago

danielballan commented 9 years ago

Ultimately this is the job of the replay project. @ericdill is working on a new incarnation that will be faster, more flexible, and better targeted to users' immediate needs.

But in the meantime, what's the "minimal viable product" for a live plotter that lets users set the x and y variables without using the command line?

danielballan commented 9 years ago

Relevant: https://github.com/mdebbar/jsonsocket

jrmlhermitte commented 9 years ago

Other than playback, I can only think of one other option as a quick GUI option: -play the average of consecutive sequences of images (in for high framerate/low signal time series): for example for 2: imgnew = (img[0::2,:,:] + img[1::2,:,:])/2. play back imgnew (is there terser notation or would someone have to write a function for this?)

danielballan commented 9 years ago

I'm talking bigger picture than that right now. Something along these lines:

  1. Data collection serves up JSON documents (the same ones that go into metadatastore) to an HTTP socket.
  2. On a separate process or even a separate machine, there is a graphical interface (notebook widgets? qt? matplotlib widgets?) that lets users input what to plot against what.
  3. That separate process listen on the socket for JSON documents, caches them, and plots them live using the user input.
  4. The same interface could be used to look at old (meaning non-live) data by going to the broker instead of a socket. But this would require adding more interface elements that let people search old scans.
danielballan commented 9 years ago

@ericdill is solving this properly, but I'm wondering two things:

  1. What's the minimal functionality such a tool would need?
  2. What's the easiest way to implement it -- notebooks, qt, matplotlib, or something else.
ambarb commented 9 years ago

RE item 1)

I can add more, but this goes beyond what is required to simply align a sample (e.g. single crystal) or compare spectroscopic data or look at an ROI counter evolution during a time scan. I omitted more advanced CCD data requirements because not all beamlines require these things.

RE item 2) I think it depends on how you implement.

klauer commented 8 years ago

Live plots are working reasonably well at the moment - in the same process as the collection environment. Plotting in a separate process will be implemented as part of https://github.com/NSLS-II/bluesky/pull/395