GitHub image upload seems to be broken. So here comes a description...
When computing FocussedDataDspacingTwoTheta for BEER with, e.g.
wf[TwoThetaBins] = sc.linspace(dim='two_theta', start=75, stop=105, num=180, unit='degrees')
and making a 1D two_theta histogram, the data contains large spikes. Those are an artefact of first binning into 1024 two theta bins for CorrectedDspacing and then histogramming those into the bins given above. This is a problem even though we use binned data because we only have two_theta as a bin-edge coord, not an event coord. So we are sensitive to the alignment of bin edges.
To fix this, we can use rebin. But that means that we cannot output binned data. If we still want to support outputting binned data, we need to either redistribute the bin weights manually or keep two_theta as an event coord for each pixel.
(Note that I tested this with McStas BEER data. I didn't check DREAM, it might have a two_theta event coord.)
GitHub image upload seems to be broken. So here comes a description...
When computing
FocussedDataDspacingTwoThetafor BEER with, e.g.and making a 1D
two_thetahistogram, the data contains large spikes. Those are an artefact of first binning into 1024 two theta bins forCorrectedDspacingand then histogramming those into the bins given above. This is a problem even though we use binned data because we only havetwo_thetaas a bin-edge coord, not an event coord. So we are sensitive to the alignment of bin edges.To fix this, we can use
rebin. But that means that we cannot output binned data. If we still want to support outputting binned data, we need to either redistribute the bin weights manually or keep two_theta as an event coord for each pixel.(Note that I tested this with McStas BEER data. I didn't check DREAM, it might have a
two_thetaevent coord.)