Make necessary updates to load HXN data from tiled #341
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.
For this, I tried to take an approach such that the relevant functions, such as
map_data2D_hxn(), will run properly whetherdbis a v0DataBrokerinstance or a v2 instance (which uses tiled). This would enabledbto just be swapped out for a v2 instance when the time is right.There is a variable
is_tiledthat tries to determine whether v2 is being used or v0, and some of the logic, in just a few places, branches based upon whether tiled is being used or not.Some of the metadata needed to be accessed like
start_doc['dimensions']instead ofstart_doc.dimensions, but this appeared to work for both v0 and v2.I realize this does not take into account the changes in #339. But I think the changes here are simple enough to take into account once #339 is merged.
These changes appeared to work fine with DataBroker v0. I had an example using DataBroker v2 that appeared to have the metadata, but not the data itself. I think it loaded and formatted all the metadata correctly, but there is a little uncertainty as to whether loading the data in to the pandas frame at the end is correct - that is something we can determine once we have a real example.