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

Abierto
#922 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
55/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python
Área
data

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
3
Forks
6
Merge medio
2 d 13 h
PR fusionados (30 d)
35

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de scipp/ess

Todos los issues de scipp/ess

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.