scipp / scipp/ess

[MAGIC] Transformation resolving using vertices instead of pixel offsets.

Open
#585 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

essdiffraction
Dominant language
Python
Stars
1
Forks
3
Avg merge
2d 11h
Merged PRs (30d)
17

Description

The position vectors are zipped assuming there is x_pixel_offset but MAGIC decided not to have any pixel offsets in the file.
So the assumption that x_pixel_offset will always be present is now wrong.

https://github.com/scipp/scippnexus/blob/3550be53b4cb1897e82082400651fecd4a87fc58/src/scippnexus/nxtransformations.py#L493-L520

I asked Iurii in person and MAGIC defines each pixel's 8 voxels positions respect to the sample directly, which will always stay the same in terms of relative position (x, y, z). The only thing that changes is the scattering angle.

Then we need to skip the pixel offset and difectly use the voxel positions...?
i.e. if there are no pixel positions in the file, we just use position of the vertices.
@MridulS Do you maybe have more context on this...?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/scippnexus/nxtransformations.py at lines 493-520 and trace how position vectors are assembled when x_pixel_offset is absent. Confirm the MAGIC case uses the voxel vertex positions directly while accounting for the changing scattering angle; done means transformations resolve without requiring pixel offsets.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.