Xi-CAM / Xi-cam

Xi-cam is a graphical environment for synchrotron data analysis, management, and visualization developed by the Advanced Light Source at Lawrence Berkeley National Laboratory. This is a cross-platform open-source Python project licensed under BSD.
https://www.camera.lbl.gov/
Other
9 stars 7 forks source link

Adding support for FigureSpec model in intents #64

Open danielballan opened 3 years ago

danielballan commented 3 years ago

Notes and follow-up thoughts from today's best-effort-viz call with @ronpandolfi, @HarinarayanKrishnan, @ihumphrey, @cryos, and @AbbyGi

Edited potentially confusing typos for clarity.

ronpandolfi commented 3 years ago

@danielballan A few questions about FigureSpec and friends:

  1. Can the variety of Spec's be extensible? If I want to describe a new type of visualization that can't well be described in terms of the available primitives, how would I supply my own? With Intent and Canvas, we currently have plugins for both providing an option for extensibility; I've applied this in our hyperspectral imaging visualizations.
  2. Then, if I write a PyQtGraph interpreter for Spec's, I'd also want to provide a point of extensibility to complement the extensibility of Spec's. I think there is an advantage here in separating out the Canvas's as individual components independent of the 'Manager'. Could the Canvas concept be fit into your design?
  3. AxesSpec, PlotSpec, and ImageSpec have appropriate analogs in PyQtGraph. Even though FigureSpec could be compared to GraphicsView, rendering directly into GraphicsView rather than a more specialized widget would mean you'd give up some useful elements. For example, PyQtGraph's ImageView gives you a free HistogramLUTWidget that couples with its ImageItem, as so on. Would it be safe to build into FigureSpec an option to specify a 'Canvas' type?
danielballan commented 3 years ago

Follow-up from the call:

  1. The refactor in https://github.com/bluesky/bluesky-widgets/pull/97 makes it possible to add custom models to a Axes, beyond the Line and Image models currently defined. It's up to the views to decide what to do with an unsupported or unrecognized model: make a best effort at representing it, silently ignore it, issue a warning, or raise an exception.
  2. Is there documentation on Canvas somewhere? This has been mentioned on previous calls but not explored in the same depth as Intents.
  3. Does splitting out Figure into different types address this in part or in whole?
ronpandolfi commented 3 years ago
  1. Agreed. Can we add an entrypoints registry to support their serialization?
  2. Not yet, I'll get something for you to look at
  3. Yes it does.