G-Node / nix

Neuroscience information exchange format
https://readthedocs.org/projects/nixio/
Other
66 stars 36 forks source link

Tagging DataArrays with different dimenisionalities #800

Closed jgrewe closed 4 years ago

jgrewe commented 4 years ago

So far a single Tags (and MTags) can only tag DataArrays that have the same dimensionality. We will make this a more flexible by implementing the following rules.

1) The coordinates used in a Tag are applied first to last to the dimensions of referenced DataArrays. Errors will be raised if position, extent and unit can not be applied. 2) If there are more coordinates in the Tag than there are dimensions in the DataArray, the superfluous coordinates will be ignored. 3) If there are less coordinates in the Tag than there are dimensions in the DataArray, the full extent of the dimensions is assumed. (e.g. the tag points to a region of interest in a 2D DataArray and I now want to access the data of a 3D DataArray. The ROI coordinates are applied to the first two dims, while the slices extends across the full 3rd dimension).

First step before we come up with a wildcard tagging as proposed in #793

jgrewe commented 4 years ago

should be supported in 1.4 and 1.5

achilleas-k commented 4 years ago

The only point I'm not fully on board with is the second one. I guess you want to have the flexibility to tag 3 dimensions, then reference a 3D array and a 2D array and have the 2D array ignore tag dim 3?

jgrewe commented 4 years ago

closing since done for 1.4 and 1.5