Load time-dependent transformations from NeXus#246
Conversation
021f15c to
fbd43c4
Compare
|
This causes an issue with the class Position(sciline.Scope[Component, RunType, sc.Variable | sc.DataArray], sc.Variable | sc.DataArray):But that is not possible because we can't inherit from unions. So I'm thinking we could always make positions data arrays. But that impacts a lot of downstream code that currently expects variables. But that code is anyway broken for dime dependent positions and might need an update. Alternatively, we could use a separate path through the workflow and add class MovingPosition(sciline.Scope[Component, RunType, sc.DataArray], sc.DataArray):and providers then have to request that type when they can deal with time dependence. The providers constructing Thoughts? (@SimonHeybrock, @nvaytet) |
The previous attempt added the time as an event coord. This makes grouping by time-dependent coords more difficult down the line. It is not apparent which event coords depend on a slow timescale that we might later want to group or bin into and which coords truly depend on the events.
Needed for vector lookup.
2a49cd8 to
407d815
Compare
Lookup relative error threshold
251fd99 to
7a0234c
Compare
8720cee to
153a588
Compare
| def compute_dynamic_position( | ||
| transformation: NeXusTransformation[Component, RunType], | ||
| ) -> DynamicPosition[Component, RunType]: | ||
| """Compute the position of a component from a transformation matrix.""" |
There was a problem hiding this comment.
Nitpick: Should there also be an error message if we attempt here to compute a dynamic position from a scalar variable?
| params={ | ||
| PreopenNeXusFile: PreopenNeXusFile(False), | ||
| TransformationTimeFilter: reject_time_dependent_transform, | ||
| }, |
There was a problem hiding this comment.
Can you explain/sketch out what the e.g. Loki workflow would look like if we need to load both moving and stationary monitors?
I didn't see where the DynamicPosition is being used.
| 'source_position': lambda: source_position, | ||
| 'sample_position': lambda: sample_position, | ||
| 'source_position': lambda: source_position.position, | ||
| 'sample_position': lambda: sample_position.position, |
There was a problem hiding this comment.
I'm wondering if this can potentially break a lot of existing code?
Still testing with BIFROST to see if this is what we need.