\(\renewcommand\AA{\unicode{x212B}}\)

GroupToXResolution v1

../_images/ImageNotFound.png

Enable screenshots using DOCS_SCREENSHOTS in CMake

Summary

Groups points within intervals given by the Dx into single points

Properties

Name

Direction

Type

Default

Description

InputWorkspace

Input

MatrixWorkspace

Mandatory

An input workspace with Dx values.

OutputWorkspace

Output

MatrixWorkspace

Mandatory

The grouped workspace.

FractionOfDx

Input

number

0.2

A fraction of Dx to group the points to.

Description

This algorithm groups the points of a single histogram workspace according to the X resolution stored in the DX array.

The figure below shows schematically how the grouping procedure proceeds.

Schematic image of the point grouping algorithm.
  1. Select first ungrouped point \(i\). The X resolution (DX) for this point is \(D_{i}\).

  2. Calculate grouping width \(w_{i} =\) FractionOfDx * \(D_{i}\).

  3. Select ungrouped points within \(w_{i}\) from point \(i\).

  4. Calculate the average X, average Y, and the square root of the averaged squared sums of E of the selected points.

  5. Calculate new resolution \(D^{\circ} = \sqrt{D_{i}^{2} + (0.68 \Delta X)^{2}}\) where \(\Delta X\) is span of the X values of the selected points.

  6. Replace the selected points with a single grouped point.

  7. Return to 1.

Usage

Example - Grouping points to X resolution

../_images/ImageNotFound.png

Enable :plots: using DOCS_PLOTDIRECTIVE in CMake

Categories: AlgorithmIndex | Transforms\Rebin

Source

C++ header: GroupToXResolution.h

C++ source: GroupToXResolution.cpp