[ESSSPECTROSCOPY] `save_sqw` writes a file Horace refuses when an axis has one bin

未关闭 适合新手
#925 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
75/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
python
领域
data

调研方向

从 ess/bifrost/io/sqw.py 中的 _make_dnd_metadata(约第 380 行)开始,跟踪单 bin 轴的 single_bin_defines_iax 和 dax 是如何设置的。比较为 u3: 1 和 u3: 2 生成的元数据,然后检查是否有覆盖 save_sqw 和 read_sqw 的测试。当 Horace 接受包含单 bin 轴的文件,且元数据只列出绘图轴时,即视为完成。

由索引模型根据 Issue 内容生成。

描述

essspectroscopy

With bin_sizes={'u1': 40, 'u2': 40, 'u3': 1, 'u4': 40}, Horace 4.2.0's read_sqw refuses the file: "number of display axes elements (4) have to be equal to the number of projection axes (3)". _make_dnd_metadata (ess/bifrost/io/sqw.py:380) sets single_bin_defines_iax true on every axis and dax to all four axes, whatever the bin counts. With 'u3': 2 Horace reads the file.

Suggestion: write dax over the plot axes only.

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

主要语言
Python
星标
3
派生
6
平均合并
2 天 7 小时
30 天内合并 PR
36

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

scipp/ess 的其他 Issue

查看 scipp/ess 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。