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

Representation of loaded transformations? #234

Closed
SimonHeybrock opened this issue Sep 5, 2024 · 1 comment · Fixed by #243
Closed

Representation of loaded transformations? #234

SimonHeybrock opened this issue Sep 5, 2024 · 1 comment · Fixed by #243

Comments

@SimonHeybrock
Copy link
Member

Relating to the larger context of #232, #233, and scipp/essreduce#96, there is one further problem. We may have to deal with noisy motion logs that we want to treat as a static value (potentially after some processing). However, ScippNexus directly converts rotations (defined as axis angle angle) into a rotation matrix (probably quaternions?):

elif transformation_type == 'rotation':
v = sc.spatial.rotations_from_rotvecs(v)
. Performing any kind of processing on this (e.g., determining if the time-dependence is just noise) is much harder and more error prone than in the angle-axis representation (where only the angle, a single number, will be time-dependent).

I am not sure what to do. Should the representation of the loaded transforms be changed? Should the loading be able to perform operations such as taking a mean before this happens? As snx.compute_positions currently tries to compute a time-dependent transform and position this will also have implications there, so this is a tricky decision.

As in other cases, I am feeling more and more that a better and cleaner separation of loading from transformations would be beneficial, but that would be a much larger effort.

@SimonHeybrock
Copy link
Member Author

SimonHeybrock commented Sep 5, 2024

For components without pixels, processing such as averaging can be performed on the resulting positions instead of the transform. This is much easier and well defined. What remains is probably just the NXdetector case, where applying a time-dependent transform to all pixel offsets may not be feasible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant