Dream workflow: units are weird after Lorentz correction
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1
- Forks
- 3
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 17
Description
Computing CorrectedDetector[SampleRun] in the dream geant4 workflow from the docs yields data with a strange unit:
dim='event',
content=DataArray(
dims=(event: 1533595),
data=float64[1.00000000000000074e-40*m^4*counts],
coords={'event_time_zero':datetime64[ns], 'tof':float64[ns], 'wavelength':float64[Å],
'dspacing':float64[Å]})
According to the docstring, the corrections is computed as $d^4 \sin\theta$ (https://github.com/scipp/essdiffraction/blob/main/src/ess/powder/correction.py#L358).
This is indeed what is written in the gsas book:
This is weird because the other formulas listed in that document seem to be dimensionless?
But d^4 is obviously not dimensionless...
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the documented Dream Geant4 workflow that computes CorrectedDetector[SampleRun], then inspect src/ess/powder/correction.py around line 358 and the referenced docstring. Compare the resulting m^4*counts unit with the GSAS formula and the other correction formulas; done means the intended units are resolved and the workflow's output and documentation agree.
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
- Mostly clear
- Newbie friendliness
- 48/100