nexusformat / definitions

Definitions of the NeXus Standard File Structure and Contents
https://manual.nexusformat.org/
Other
26 stars 55 forks source link

NXtransformations should mention that the value of a directional fields is ignored #1291

Closed woutdenolf closed 11 months ago

woutdenolf commented 1 year ago

https://github.com/nexusformat/definitions/issues/1270#issuecomment-1599610993

phyy-nx commented 1 year ago

(code camp)

In NXtransformations, three types are defined in @transformation_type: translation, rotation, and not specified. The units are listed as:

The value of the field is the amount it is translated or rotated in the case of the first two, and is ignored in the unitless case. This last point is what is missing.

phyy-nx commented 1 year ago

Another note, for rotations and translations I can assemble a homogeneous matrix that represents a frame shift and use it in an equation to build a full depends_on chain. However, I don't know what to do if transformation_type is unspecified. In DIALS I imagine this throws an exception. An alternate use case would be to ignore it. Or we could specify that transformations without a transformation_type should not be in depends_on chains, and they are more for documentation.

Thoughts?

woutdenolf commented 1 year ago

I would say

When transformation_type is missing, the AXISNAME field value is never used so you could set it to the number NaN or leave it empty.

woutdenolf commented 1 year ago

NXtransformations fields without transformation_type do not have a transformation associated with them. So they seem to be purely documentation (to label a certain direction). Nevertheless it would seems strange to me that they cannot be part of a chain. Simply skip them when calculation the overall transformation matrix. If not, what are they doing under NXtransformations then?