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

Đang mở
#922 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
data

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Python
Star
3
Fork
6
Merge trung bình
2 ngày 13 giờ
Pull request đã merge (30 ngày)
35

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của scipp/ess

Tất cả issue của scipp/ess

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.