[essreduce] `BifrostSimulationWorkflow` fails with its defaults on ESS's own simulated file

Aperta
#922 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

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

Direzione di ricerca

Start with to_disk_choppers in ess/reduce/nexus/workflow.py and trace how it passes chopper fields to DiskChopper.from_nexus. Check the logged rotation_speed and delay values in the simulated file and the scalar-variable requirement reported by scippneutron. Done means the workflow handles constant logged values or reports a clear error naming the field and the suggested step.

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

Descrizione

essreduce essspectroscopy
from ess.bifrost import BifrostSimulationWorkflow, data
from ess.spectroscopy.types import (Filename, LookupTableRelativeErrorThreshold,
                                    NormalizedIncidentEnergyDetector, SampleRun)

wf = BifrostSimulationWorkflow()
wf[Filename[SampleRun]] = data.simulated_elastic_incoherent_with_phonon()
wf[LookupTableRelativeErrorThreshold] = {k: float('inf') for k in
    ['detector', 'monitor', 'normalization_monitor', 'elastic_monitor']}
wf.compute(NormalizedIncidentEnergyDetector[SampleRun])
# DimensionError: Chopper field 'rotation_speed' must be a scalar variable, got a 1d variable.

With wavelength_from='analytical' now the default, the workflow builds DiskChoppers. to_disk_choppers (ess/reduce/nexus/workflow.py) passes each chopper's fields to DiskChopper.from_nexus unchanged, and that refuses logged values (scipp/scippneutron#731). Files that log rotation_speed/delay once per setting, as this one does, therefore fail. Without the threshold the workflow first stops on the missing LookupTableRelativeErrorThreshold (#186).

Suggestion: reduce a constant log to its value in to_disk_choppers, or refuse with a message that names the field and the step to add.

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.