tiled icon indicating copy to clipboard operation
tiled copied to clipboard

Add query on number of dimensions

Open danielballan opened this issue 3 years ago • 0 comments

It would be useful to have an NDims query that filters for children that are (1) "array" or "sparse" and (2) have particular number of dimensions (i.e. len(shape) in the structure).

This can be applied to xarray_dataset nodes to succinctly select all the scalar variables suitable for exporting in a columnar format like Arrow or CSV. It may be possible to simplify this code, making one request instead of batched requests that spell out the name of every scalar field: https://github.com/bluesky/tiled/blob/ac622966dc2c55d392980e30f570e12f72aeb5d7/tiled/client/xarray.py#L145-L173

This idea was previously discussed but I think never captured in an issue. I believe I let it drop at the time because I did not realize the full potential impact.

danielballan avatar Oct 24 '22 21:10 danielballan