Skip to content

Fix broken unit in DREAM I(d) workflow#705

Draft
SimonHeybrock wants to merge 1 commit intomainfrom
fix/dream-id-broken-unit
Draft

Fix broken unit in DREAM I(d) workflow#705
SimonHeybrock wants to merge 1 commit intomainfrom
fix/dream-id-broken-unit

Conversation

@SimonHeybrock
Copy link
Member

Summary

  • _fake_proton_charge force-set the fake charge unit to counts/µAh, but its input (CorrectedDspacing) already carries Lorentz-corrected units (m^4·counts). Dividing by the wrong-unit charge produced 3.6e-43*m^4*s*A instead of dimensionless values.
  • Removed the unit override so the fake charge retains the data's actual unit, making data / proton_charge dimensionless.

Test plan

  • Manual: verify DREAM I(d) dashboard shows dimensionless (or sensible) units instead of [3.6e-43*m^4*s*A]

Closes #703

🤖 Generated with Claude Code

The `_fake_proton_charge` provider force-set the unit to `counts/µAh`,
but its input (`CorrectedDspacing`) has already been Lorentz-corrected
with units of `m^4*counts`. Dividing by the wrong-unit fake charge
produced `3.6e-43*m^4*s*A` instead of dimensionless values.

Remove the unit override so the fake charge retains the actual data
unit, making `data / proton_charge` dimensionless as expected.

Closes #703

Prompt: Please investigate #703. Don't make changes yet.
Follow-up: Yes, please use a new branch and make a PR.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@nvaytet
Copy link
Member

nvaytet commented Feb 12, 2026

This appears to be related to scipp/essdiffraction#239 ?

@SimonHeybrock SimonHeybrock marked this pull request as draft February 13, 2026 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DREAM] I(d) workflow shows broken unit

2 participants