[ESSSPECTROSCOPY] Whether k_f/k_i is left in depends on the monitor, and nothing records which; `to_nxspe` can't be imported

Aperta
#929 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
42/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
data

Direzione di ricerca

Start with ess/spectroscopy/indirect/io.py, especially _to_one_nxspe and the import of .conservation, then trace how NormalizedIncidentEnergyDetector is created and how its monitor is represented. Check the listed dependency versions and reproduce the missing-module error and scaling behavior for ideal and 1/v monitors. Done when monitor efficiency is recorded and the scaling factor and flag are applied only when appropriate.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

essspectroscopy

The rate scattered per incident neutron is (k_f/k_i)·S. Dividing by the monitor distribution leaves (k_f/k_i)·S behind an ideal monitor (every simulated file) and k_f·S behind a 1/v monitor (the real instrument). Nothing on NormalizedIncidentEnergyDetector says which.

ess/spectroscopy/indirect/io.py _to_one_nxspe always multiplies by √(E_i/E_f) (line 83) and writes ki_over_kf_scaling = True (line 156). That is right behind an ideal monitor and over-corrects behind a 1/v one. It also can't run: line 79 imports .conservation, which isn't shipped (ModuleNotFoundError).

Suggestion: record the monitor's efficiency on the container, and apply the factor (and set the flag) only where it is left in.

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

Lingua principale
Python
Stelle
3
Fork
6
Merge medio
2g 13h
PR unite (30g)
35

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di scipp/ess

Tutte le issue di scipp/ess

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.