DataTree requirements #9801
Replies: 2 comments 3 replies
-
Or is it that you have an image pyramid (the same image at different resolutions / pixel size), currently put them as siblings and would like to verify whether that is supported behavior? If so: yes, the restriction only applies to parent-child relationships, siblings are intentionally not included in that rule. So while the parent node must align with its children, siblings don't have to: root = xr.Dataset(coords={"x": range(10)})
group1 = xr.Dataset(coords={"x": range(5)})
group2 = xr.Dataset(coords={"x": range(10)})
xr.DataTree.from_dict({"/": root1, "/group1": group1}) # parent conflicts with a child, error
xr.DataTree.from_dict({"/": root1, "/group/subgroup": group1}) # parent conflicts with a descendant, error
xr.DataTree.from_dict({"/": root1, "/group": group2}) # no conflicts, allowed
xr.DataTree.from_dict({"/group1": group1, "/group2": group2}) # empty parent, allowed
xr.DataTree.from_dict({"/": root, "/group1": group1, "/group2": group2}) # parent conflicts with a child, error |
Beta Was this translation helpful? Give feedback.
-
From my understanding we have a |
Beta Was this translation helpful? Give feedback.
-
It is stated in the documentation that with the newest Xarray release, for
DataTree
the dimensions and indices need to be aligned across parents / children in theDataTree
. However, in multiscale-spatial-image we end up having aDataTree
with a root node not having any dimensions, while the children do. Is this intended behaviour or should this be considered as a bug?In case of a bug,
MultiscaleSpatialImage
is depending on it right now and with that also SpatialData.Beta Was this translation helpful? Give feedback.
All reactions