Skip to content

[ESSDiffraction] Focussing powder data by two_theta created binning artefacts #670

Description

@jl-wynen

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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Status
    Selected

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions