nixpy icon indicating copy to clipboard operation
nixpy copied to clipboard

DataView: get dimensions/ticks

Open refactoriel opened this issue 5 years ago • 1 comments

MultiTag.retrieve_data returns a DataView to the referenced DataArray. If I want to know the corresponding ticks I have to get the entire array via DataArray.dimensions and then index into that array dependent on MultiTag.positions and MultiTag.extents.

I think it would be handy to also return a view on the dimensions. Does that make sense?

refactoriel avatar Oct 16 '20 14:10 refactoriel

It does indeed make sense and I had a similar thought while preparing the examples in the previous issue. We're always looking out for adding syntactic sugar and convenience methods to make working with NIX easier and this is definitely one of those cases.

Please keep this issue open until it's added.

achilleas-k avatar Oct 16 '20 14:10 achilleas-k