Skip to content

Normalization by integrated monitor should take into account detector masks when determining wavelength integration interval #166

@SimonHeybrock

Description

@SimonHeybrock

See

# Clip `monitor` to the range of `detector`, where the bins at the boundary
# may extend past the detector range (how label-based indexing works).
det_coord = (
detector.coords[dim] if dim in detector.coords else detector.bins.coords[dim]
)
lo = det_coord.nanmin()
hi = det_coord.nanmax()
monitor = monitor[dim, lo:hi]
# Strictly limit `monitor` to the range of `detector`.
edges = sc.concat([lo, monitor.coords[dim][1:-1], hi], dim=dim)
monitor = sc.rebin(monitor, {dim: edges})

I think this is a bug, which likely was not noticed so far since neither 2-theta nor wavelength masking is used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions