[essreduce] A chopper with no `beam_position` is silently placed at 0°

Open Beginner friendly
#923 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
data

Research direction

Find to_disk_choppers and trace how it builds chopper data when beam_position is absent; the issue does not name the file or a test. Read the chopper conversion tests and check how they cover missing fields. Done means a missing beam_position raises or warns with the chopper name instead of silently using 0°.

Written by the indexing model from the issue text.

Description

essreduce

to_disk_choppers builds each chopper from {'beam_position': sc.scalar(0.0, unit='deg'), **chopper}, so a missing beam_position becomes 0° without a warning. NeXus has no default for this field, and it sets when every slit reaches the beam. For a disk whose beam really crosses at 298°, that is most of a turn off. ESS's simulated_elastic_incoherent_with_phonon() logs no beam_position on any chopper.

Suggestion: raise or warn, naming the chopper.

Checked on scipp 26.11.0, scippneutron 26.10.0, essreduce 26.11.1, essspectroscopy 26.11.3.

Dominant language
Python
Stars
3
Forks
6
Avg merge
2d 7h
Merged PRs (30d)
36

Getting set up

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.

More from scipp/ess

All issues in scipp/ess

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.