You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A limitation of using a datavars per coordinate component with SkyCoord dataset is its not easy to recombine direction/position into a single tensor. For example, SkyCoord.to_cartesian exposes the x, y, z parts as the fastest changing axis.
The reason for separating the components is primarily due to each direction component potentially needing different metadata per axis, such as units, which is not supported by any xarray unit plugins.
A novel proposal to support such a dataset where direction components are stored together could be:
In this case the usage of an array in metadata it attaches to the fastest changing dimension (in this case: direction) of the dataarray. While compact, its potentially ambiguous as to which dimension/s is being assigned to.
add special dictionary keyword in metadata for assigning metadata to a dimension, i.e. "dims"
Here a special {"dims": ...} value means attach metadata along specified dimension. This is less ambiguous, but is unable to support assigning metadata along multiple dimensions, i.e a matrix of metadata to a datacube, due to most formats requiring strings keys for dicts. The utility in supporting such as scheme maybe too complex for most comprehensive data storage. Worst case, a string based tuple encoding could be proposed with backwards compatibility with this proposed metadata expression.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
A limitation of using a datavars per coordinate component with SkyCoord dataset is its not easy to recombine direction/position into a single tensor. For example,
SkyCoord.to_cartesianexposes thex, y, zparts as the fastest changing axis.The reason for separating the components is primarily due to each direction component potentially needing different metadata per axis, such as units, which is not supported by any xarray unit plugins.
A novel proposal to support such a dataset where direction components are stored together could be:
overload meaning of arrays in metadata
In this case the usage of an
arrayin metadata it attaches to the fastest changing dimension (in this case: direction) of the dataarray. While compact, its potentially ambiguous as to which dimension/s is being assigned to.add special dictionary keyword in metadata for assigning metadata to a dimension, i.e. "dims"
Here a special
{"dims": ...}value means attach metadata along specified dimension. This is less ambiguous, but is unable to support assigning metadata along multiple dimensions, i.e a matrix of metadata to a datacube, due to most formats requiring strings keys for dicts. The utility in supporting such as scheme maybe too complex for most comprehensive data storage. Worst case, a string based tuple encoding could be proposed with backwards compatibility with this proposed metadata expression.All reactions