Skip to content

Tof uncertainty threshold per component#319

Open
nvaytet wants to merge 5 commits intomainfrom
generic-tof-uncertainty-threshold
Open

Tof uncertainty threshold per component#319
nvaytet wants to merge 5 commits intomainfrom
generic-tof-uncertainty-threshold

Conversation

@nvaytet
Copy link
Member

@nvaytet nvaytet commented Feb 13, 2026

Instead of having a single number for the threshold in time-of-flight uncertainty that applies to mask the entire lookup table, we now have one number per beamline Component.

The LookupTableRelativeErrorThreshold is now a dict that contains a mapping from component name to threshold value.
For example, in the case of Dream, this could be something like

wf[LookupTableRelativeErrorThreshold] = {
    "mantle": 0.02,
    "endcap_forward": 0.02,
    "endcap_backward": 0.02,
    "high_resolution": 0.02,
    "monitor_cave": 0.05,
    "monitor_bunker": 1.0,
}

We use the NeXusDetectorName and the NeXusName[MonitorType] to get values from the dict.

I set the default to be a defaultdict that returns Inf if the requested key is not found. I don't know if this is a good idea or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant