Apply Lorentz correction after binning into `(d, theta)`?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1
- Forks
- 3
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 17
Description
In scipp/essdiffraction#29 the Lorentz correction is computed in event mode and applied to the data. I think a cheaper approach would be something like:
data = data.bin(dspacing, theta) # no more pixels, or data.groupby(theta).bins.concat('pixel')
lorentz_factor = sc.midpoints(dspacing)**4 * sc.sin(sc.midpoints(theta))
scale = lorentz_factor / vanadium # vandium depends only on dspacing
data *= scale
This would result only in a single event-data op (which we would have to do anyway for the vanadium normalization). Binning in theta would have some extra cost, but we may need it anyway for other purposes. Computation of the Lorentz correction itself would essentially be free, and independent of the event count.
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
Start with scipp/essdiffraction#29 and compare its event-mode Lorentz correction with the proposed binning into dspacing and theta. Investigate whether the binned approach remains valid alongside vanadium normalization and measure its cost. Done means the project has a decided approach and an implementation or documented rejection backed by relevant comparisons.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100