Skip to content

Load time-dependent transformations from NeXus#246

Draft
jl-wynen wants to merge 6 commits intomainfrom
nxs-time-dependent-transform
Draft

Load time-dependent transformations from NeXus#246
jl-wynen wants to merge 6 commits intomainfrom
nxs-time-dependent-transform

Conversation

@jl-wynen
Copy link
Member

Still testing with BIFROST to see if this is what we need.

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.
@jl-wynen jl-wynen force-pushed the nxs-time-dependent-transform branch from 021f15c to fbd43c4 Compare March 17, 2026 10:29
@jl-wynen
Copy link
Member Author

This causes an issue with the Position domain type. It used to always be a (scalar) Variable. Now, when a component moves, its Position is a 1d data array. That means that the type should be

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 Position would then raise if they get time-dependent inputs.

Thoughts? (@SimonHeybrock, @nvaytet)

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.

1 participant