Closed g5t closed 2 months ago
As noted in https://github.com/g5t/moreniius/issue/4, a solution without this has been identified and implemented.
Improving the situation in mccode_antlr
would likely require replacing Expr
trees with a more-widely used alternate -- perhaps going so far as to make use of sympy (and pymbolic
could be a useful stepping stone along that path).
For a component positioned based on an instrument parameter, e.g.,
moreniius
is unable to set the correcttransformation
dependency chain in part due to needing the direction and length of the vector[0, 0, dist]
.Utilities already allow for the length, identified correctly as
abs(dist)
, but the direction[0, 0, dist]/abs(dist)
is not simplified to, e.g.[0, 0, sign(dist)]
.What is likely needed in this case for full conversion to NeXus Structure is
length=dist
anddirection=[0, 0, 1]
.