WIP: Array Views
This adds a mechanism for creating views of arrays in Tiled. The source for a view could be either an array or a column of a table already registered in Tiled. the view is represented as its own DataSource with possibly several Assets pointing to a location of the source in the Tiled catalog tree, e.g. tiled://X/Y/image or tiled://X/Y/table/column_1. There is a possibility to use additional parameters to slice or reshape (TBD?) the original array and present only a subset of its values as a view. Likewise, multiple arrays (declared in separate assets) can be concatenated into a single view (TBD?).
Checklist
- [ ] Add a Changelog entry
- [ ] Add the ticket number which this PR closes to the comment section
Capturing notes on discussion:
Management.viewis a good way to denote view-ness. :+1:- Using a mimetype is nice because it gives us room to try other approaches to views in the future, with different mimetypes. :+1:
- For now, we may restrict that a view target (a slice of) a single node, never combining the data from multiple nodes. These "multi-views" could be added later, either by extending the existing adapter or (perhaps better) by adding an additional mimetype.
- It may make sense to create
ArrayViewAdapterwhich takes asliceparameter, so that theparametersin the database match the signature of the Adapter, as usual.
@whs92
This is really cool!
I have a question. At what point do you see the view configured? After every scan? We might want to think about automating that at some point in bluesky.
@dylanmcreynolds Yes, the original idea was to create the views in the Bluesky container after every scan, most likely somewhere in TiledWriter, to define a flat namespace across table columns. We are now looking at a bit more performant way to do this, though, but views may still be useful in other scenarios.
We considered making this critical for representing Bluesky data. We concluded that we can use a simpler approach, so this is not needed.
We do not rule out adding support for something like this in the future, but we are not currently pursuing it. We do have some reservations about the load this could place on the server's computational capacity.
Curious what the simpler approach is.