-
Notifications
You must be signed in to change notification settings - Fork 48
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
Support registering internal groups/dataset in HDF5. #687
Merged
danielballan
merged 8 commits into
bluesky:main
from
danielballan:register-hdf5-internal
Mar 21, 2024
Merged
Support registering internal groups/dataset in HDF5. #687
danielballan
merged 8 commits into
bluesky:main
from
danielballan:register-hdf5-internal
Mar 21, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
danielballan
force-pushed
the
register-hdf5-internal
branch
from
March 12, 2024 19:48
6ae6ab0
to
b498936
Compare
Demo of registering a DataSource with shape from tiled.client import from_uri
from tiled.structures.core import StructureFamily
from tiled.structures.data_source import Asset, DataSource, Management
from tiled.structures.array import ArrayStructure, BuiltinDtype
import numpy
c = from_uri('http://localhost:8000', api_key='secret')
arr = numpy.ones((1, 5, 5))
structure = ArrayStructure.from_array(arr)
data_source = DataSource(management='external', mimetype='application/x-hdf5', structure_family='array', structure=structure, assets=[Asset(data_uri='file://localhost/tmp/test.h5', is_directory=False, parameter='data_uri')])
ac = c.new(structure_family='array', data_sources=[data_source])
url = ac.uri.replace('/metadata/', '/data_source/')
ac.refresh()
ds = ac.data_sources()[0]
ds['structure']['shape'] = [2, 5, 5]
ds['structure']['chunks'] = [[dim] for dim in [2, 5, 5]]
ac.context.http_client.put(url, json={'data_source': ds}, params={'data_source': 1}) |
danielballan
force-pushed
the
register-hdf5-internal
branch
from
March 15, 2024 20:40
97df21a
to
9c7a8ca
Compare
danielballan
commented
Mar 18, 2024
genematx
approved these changes
Mar 21, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A wrapper function takes the same parameters as
HDF5Adapter
but additionally exposes an optionalpath
, a list of strings navigating to a group or dataset nested inside an HDF5 file.