Skip to content

Export first pixel position for DIALS#200

Merged
YooSunYoung merged 2 commits intomainfrom
geometry
Feb 27, 2026
Merged

Export first pixel position for DIALS#200
YooSunYoung merged 2 commits intomainfrom
geometry

Conversation

@YooSunYoung
Copy link
Copy Markdown
Member

It should also fixes (partially) scipp/ess#190 .

In the NXLauetof format everything is based on the center position of the detector, so we the center position as origin_position but the DIALS expect the origin position to be the top-left (first pixel position).
It's not simply the top left in the space since NMX detector panels can translate/rotate along all three axis, x, y, z.
So the workflow finds the lowest pixel ID in each panel and find the position of that pixel.

@github-project-automation github-project-automation Bot moved this to In progress in Development Board Feb 18, 2026
@YooSunYoung YooSunYoung moved this from In progress to Selected in Development Board Feb 18, 2026
@aaronfinke
Copy link
Copy Markdown
Collaborator

Save first_pixel_position as an attribute to entry/instrument/detector_panel_{n}/origin

Comment thread src/ess/nmx/types.py
@aaronfinke
Copy link
Copy Markdown
Collaborator

Was successfully able to index reflections with the geometry in the essnmx output, but using first_pixel_position as the origin in DIALS as expected.

@YooSunYoung YooSunYoung merged commit f53ece4 into main Feb 27, 2026
4 checks passed
@YooSunYoung YooSunYoung deleted the geometry branch February 27, 2026 13:43
@github-project-automation github-project-automation Bot moved this from Selected to Done in Development Board Feb 27, 2026
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 this pull request may close these issues.

2 participants