tiled icon indicating copy to clipboard operation
tiled copied to clipboard

WIP: Array Views

Open genematx opened this issue 11 months ago • 4 comments

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

genematx avatar Jan 27 '25 15:01 genematx

Capturing notes on discussion:

  • Management.view is 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 ArrayViewAdapter which takes a slice parameter, so that the parameters in the database match the signature of the Adapter, as usual.

danielballan avatar Jan 27 '25 22:01 danielballan

@whs92

genematx avatar Feb 07 '25 09:02 genematx

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 avatar Feb 11 '25 15:02 dylanmcreynolds

@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.

genematx avatar Feb 11 '25 19:02 genematx

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.

danielballan avatar Jul 02 '25 15:07 danielballan

Curious what the simpler approach is.

dylanmcreynolds avatar Jul 02 '25 21:07 dylanmcreynolds