-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Context
In scipp/essdiffraction#249 we found that assemble_output_calibration in ess.powder had a false dependency on CorrectedDetector when it only needed geometric quantities (Ltotal and two_theta).
ess.reduce already provides DetectorLtotal and MonitorLtotal as sciline node types computed from EmptyDetector + beamline geometry. However, there is no equivalent for two_theta.
As a fix, we introduced DetectorTwoTheta in ess.powder (scipp/essdiffraction#250 — PR pending). This mirrors the pattern of DetectorLtotal:
class DetectorTwoTheta(sciline.Scope[RunType, sc.Variable], sc.Variable):
"""Scattering angle (two-theta) for each detector pixel."""with a provider that computes it from EmptyDetector + source/sample positions + gravity using the scippneutron beamline coordinate transformation graph.
Question
Should DetectorTwoTheta live in ess.reduce alongside DetectorLtotal? The argument for:
- Symmetric with
DetectorLtotal— both are purely geometric, per-pixel quantities derived from the same inputs - Other instrument packages (not just powder) may need
two_thetaas a standalone node
The argument against:
two_thetais only meaningful for scattering instruments, whileLtotalis universally needed (e.g., for time-of-flight computation)- May be premature to generalize before more instruments need it
For now it lives in ess.powder. Moving it later would be straightforward.