scipp / scipp/scippnexus

Load NXdata with auxiliary signals with different dims

Open
#304 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
6
Forks
5
PR merge metrics
No merged PRs in 30d

Description

NXdata can contain auxiliary signals in addition to the regular signal. When they are present, we load the whole NXdata group as a Dataset. But the loader requires that all signals and coords share dimensions with the main signal. This is not the case for monitors in ESS files. They now contain a frame_total aux signal that has a different dimension.

There are a couple of options for loading this:

  • Extend the loader to build a dataset with the proper dims
    • Preserves current interface.
    • Potentially tricky to implement.
    • Wastes loading the aux signal if unused in a workflow.
  • Always quietly fall back to loading as a data group
    • This requires updates to the generic nexus workflow to extract and assemble the signal and aux signals.
    • Simplest fix.
    • Wastes loading the aux signal if unused in a workflow.
  • Drop aux signals.
    • This means that group[()] loads the familiar data array.
    • It avoids loading data that will be discarded immediately after in reduction workflows.
    • I don't think we use aux signals anywhere, so this wouldn't actually break anything.
    • But it becomes more difficult to access aux signals in the future.
    • Impl: Detect signal and its coords; drop everything else.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the NXdata loader and the generic nexus workflow, focusing on how signals and coordinates are assigned dimensions. Compare the listed handling options for the monitor frame_total auxiliary signal, then confirm the chosen behavior by loading an ESS file without a dimension error. Done means auxiliary signals with different dimensions are handled consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.