Skip to content

Commit

Permalink
Merge pull request #85 from scipp/fix-geometry
Browse files Browse the repository at this point in the history
Rotated detector pixel offset based on the starting position.
  • Loading branch information
jokasimr authored Sep 30, 2024
2 parents 24da326 + 5c39817 commit ef0d80e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/ess/nmx/mcstas/xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,11 @@ def _pixel_positions(
return (
(pixel_n_slow * slow_axis_steps)
+ (pixel_n_fast * fast_axis_steps)
+ position_offset
)
+ detector.rotation_matrix
* sc.vector(
[detector.start_x, detector.start_y, 0.0], unit=position_offset.unit
) # Detector pixel offset should also be rotated first.
) + position_offset


def _detector_pixel_positions(
Expand Down

0 comments on commit ef0d80e

Please sign in to comment.