Skip to content

Conversation

@tacaswell
Copy link
Contributor

@tacaswell
Copy link
Contributor Author


bundle = event_model.compose_run()
start_doc, compose_descriptor, compose_resource, compose_stop = bundle
assert bundle.start_doc is start_doc
assert bundle.compose_descriptor is compose_descriptor
assert bundle.compose_resource is compose_resource
assert bundle.compose_stop is compose_stop
motor_data = 5.0
counter_data = 10
image_data = numpy.zeros((512, 512))
structure_data = numpy.zeros((512,), dtype=np.dtype("f,i"))
bundle = compose_descriptor(
    data_keys={
        "motor": {"source": "...", **infer_datakeys(motor_data)},
        "counter": {"source": "...", **infer_datakeys(counter_data)},
        "structure_data": {"source": "...", **infer_datakeys(structure_data)},
        "image": {
            **infer_datakeys(image_data),
            "source": "...",
            "external": "FILESTORE:",
        },
    },
    name="primary",
)
descriptor_doc, compose_event, compose_event_page = bundle

structure_from_descriptor(descriptor_doc, "data", 5, {})

is the snippet I tested this with.

@tacaswell tacaswell force-pushed the enh_add_structured_arrays branch from b11fa37 to 896c3c2 Compare September 22, 2021 02:13
@danielballan danielballan marked this pull request as ready for review September 22, 2021 18:18
@danielballan danielballan reopened this Sep 22, 2021
@danielballan danielballan merged commit 2e56215 into bluesky:v2.0.0-dev Sep 22, 2021
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

Successfully merging this pull request may close these issues.

2 participants