mantidimaging.core.operations.overlap_correction.overlap_correction module#

class mantidimaging.core.operations.overlap_correction.overlap_correction.OverlapCorrection[source]#

Bases: BaseFilter

Overlap correction is a post-experimental data correction performed when the input fluxes are periodic, accurately restoring the input flux up to a very large fraction of pixels (up to ~90%) occupied by the end of the acquisition shutter which leads to large distortions of measured timing characteristics of the input flux. More information is available here: https://dx.doi.org/10.1088/1748-0221/9/05/C05026

Intended to be used on: Time of Flight images

When: As a pre-processing step, to correct the observed spectrum and clarify its characteristics.

allow_for_180_projection = False#
static execute_wrapper(*args) partial[source]#

Should construct a partial call to _filter_func using values taken from the widgets passed to this function as kwargs. :param kwargs: widgets which contain values required for _filter_func. :return: a partial call to _filter_func using parameters taken from the input widgets.

static filter_func(images: ImageStack, progress=None) ImageStack[source]#
Returns:

The ImageStack object which has been corrected using the supplied shutter information.

filter_name = 'Overlap Correction'#
static get_shutters(data_dir: Path) list[ShutterInfo][source]#
static register_gui(form: QFormLayout, on_change: Callable, view: BaseMainWindowView) dict[str, QWidget][source]#

Adds any required input widgets to the given form and returns references to them.

The return values should be in a dict which can be unpacked as kwargs for a call to the operations execute_wrapper.

Parameters:
  • view

  • form – the layout to create input widgets in

  • on_change – the filter view action to be bound to all created inputs

Returns:

the widgets bound as kwargs which are needed to call execute_wrapper

static validate_execute_kwargs(kwargs: dict[str, Any]) bool[source]#
class mantidimaging.core.operations.overlap_correction.overlap_correction.ShutterInfo(number: 'int', count: 'int', start_time: 'float' = 0, end_time: 'float' = 0, start_index: 'int' = 0, end_index: 'int' = 0)[source]#

Bases: object

count: int#
end_index: int = 0#
end_time: float = 0#
number: int#
start_index: int = 0#
start_time: float = 0#
mantidimaging.core.operations.overlap_correction.overlap_correction.execute_single(data, shutters, progress=None)[source]#