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

Projector implementation #585

Merged
merged 6 commits into from
Aug 11, 2020
Merged

Conversation

dylanmcreynolds
Copy link
Contributor

Implementation of projector that can be called with a BlueskyRun, reading a projection as specified in bluesky/event-model#179

This is the result of lots of discussion with @ronpandolfi and @tacaswell.

The result is an xarray.Dataset. Single value fields (like those that might appear in the start doc) would be projected into the Dataset's attrs field. Multi-value event stream fields appear in the Dataset with the projection's key and a Datarray value.

The projection can also support calculable fields. The projection type "calculation" can specify a callable that can be invoked by the projector to populate a Datarray into the return Dataset.

There was also a suggestion for a static type in projections where a value was pulled directly out of the projection. I'm open to this, but left it out for now. I think a lot of thought needs to go into what types of values are supported.

I had originally defined a class structure for projectors, but was convinced that since I wasn't storing state, that a function was good enough.

@danielballan
Copy link
Member

Power-cycled to rerun CI with fixes in master related to docs.

@danielballan danielballan marked this pull request as ready for review August 11, 2020 20:31
@danielballan
Copy link
Member

One random failure. Merging!

@danielballan danielballan merged commit c6143d8 into bluesky:master Aug 11, 2020
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