[ESSSPECTROSCOPY] `EnergyQDetector` drops `final_energy`

Open Beginner friendly
#924 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
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
data

Research direction

Start in ess/spectroscopy/indirect/conversion.py at add_inelastic_coordinates and check which coordinates transform_coords retains when keep_inputs=False. Compare the resulting EnergyQDetector coordinates with those available from NormalizedIncidentEnergyDetector. Done when the detector retains the needed final energy data per element for resolution calculations; the issue suggests retaining final_energy, final_wavevector, and incident_beam alongside a3 and a4.

Written by the indexing model from the issue text.

Description

essspectroscopy

add_inelastic_coordinates (ess/spectroscopy/indirect/conversion.py) calls transform_coords(..., keep_inputs=False) and keeps only a3 and a4 by name. So final_energy, final_wavevector and incident_beam, which NormalizedIncidentEnergyDetector has, are missing from EnergyQDetector. A resolution calculation needs E_f per detector element, and it can't be recovered from the events.

Suggestion: keep 'final_energy' (and 'final_wavevector', 'incident_beam') beside 'a3' and 'a4'.

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.