Skip to content

Move the tof lookup table error threshold to the GenericTofWorkflow#313

Open
nvaytet wants to merge 9 commits intomainfrom
lut-error-threshold
Open

Move the tof lookup table error threshold to the GenericTofWorkflow#313
nvaytet wants to merge 9 commits intomainfrom
lut-error-threshold

Conversation

@nvaytet
Copy link
Member

@nvaytet nvaytet commented Feb 6, 2026

See discussion here: scipp/essdiffraction#236 (comment)

Instead of hard-coding the error threshold on the LUTs saved to disk, we mask later, in the GenericTofWorkflow.
The LookupTableRelativeErrorThreshold is now a parameter of the main GenericTofWorkflow instead of the workflow that builds the table, and can be set by the user.

This means that scientists can control what threshold they want to apply.
We set a default value on the workflow so that we don't break existing workflows and notebooks.

@nvaytet nvaytet requested a review from SimonHeybrock February 6, 2026 11:10
"pulse_stride",
"distance_resolution",
"time_resolution",
"error_threshold",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that the table may or may not have a error_threshold coord. If it does not, trying to remove it using drop_coords would raise. So we filter it out here.


# Default parameters
wf[PulseStrideOffset] = None
wf[LookupTableRelativeErrorThreshold] = 1.0
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the default be something like np.inf?

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