Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'dims' to data_key #26

Closed
danielballan opened this issue Dec 10, 2018 · 1 comment
Closed

Add 'dims' to data_key #26

danielballan opened this issue Dec 10, 2018 · 1 comment

Comments

@danielballan
Copy link
Member

danielballan commented Dec 10, 2018

Proposal

Add an optional dims property to the definition of data_key in Event Descriptors. The value of dims should be an array where each item is a string. For a very relevant example of how to specify this in jsonschema, see shape in the linked section of code.

Motivation

Numpy arrays have a shape with N entries corresponding to ndim the number of dimensions in the array. Event Descriptors have a corresponding shape property, declaring the shape of the data in some field of an Event.

Xarrays add string labels to the array axes, called dims ("dimensions"). It would be good if ophyd Devices that return array day could suggest names for the dimensions, like dims=('exposure', 'y', 'x') for AreaDetector. It would would natural to put this in the data_key next to shape.

Then databroker can use this information to label the dims in an xarray correspondingly and make the data easier for the scientist to interpret.

@danielballan
Copy link
Member Author

Closed by #27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant