scipp / scipp/ess

[ESSnmx] Use more accurate domain types for sample

Open
#254 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

There are two issues with how the sample rotation is encoded:

  1. The workflow uses NXcrystal to identify the sample rotation. That class is meant for analysers (monochromators). So our code should be changed to use NXsample.

  2. The sample rotation is stored as a Position. But that is not accurate, there should be a dedicated rotation / angle type. In spectroscopy we use this: https://github.com/scipp/essspectroscopy/blob/8676040cb9c693f8a5d7d84330fe5c0b87119db4/src/ess/spectroscopy/types.py#L114 We should move this into ESSreduce and optionally rename it if others prefer 'rotation' over 'angle'.

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 by locating the ESSnmx workflow that encodes sample rotation and compare the spectroscopy angle type in src/ess/spectroscopy/types.py. Update the sample representation to use NXsample and a dedicated rotation or angle type moved into ESSreduce, then verify the workflow and related data handling still represent sample rotation accurately.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.