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

RingProfile v1

../_images/RingProfile-v1_dlg.png

RingProfile dialog.

Summary

Calculates the sum of the counts against a circular ring.

See Also

LineProfile

Properties

Name

Direction

Type

Default

Description

InputWorkspace

Input

MatrixWorkspace

Mandatory

An input workspace.

OutputWorkspace

Output

MatrixWorkspace

Mandatory

An output workspace.

Centre

Input

dbl list

0,0,0

Coordinate of the centre of the ring

MinRadius

Input

number

0

Radius of the inner ring(m)

MaxRadius

Input

number

Optional

Radius of the outer ring(m)

NumBins

Input

number

100

Number of slice bins for the output

StartAngle

Input

number

0

The angle to start from.

Sense

Input

string

Anti-ClockWise

The direction of the integration around the ring. Allowed values: [‘ClockWise’, ‘Anti-ClockWise’]

Description

RingProfile sums the counts against a ring.

Below, there is an example of the execution of the RingProfile to a Workspace2D where the position of the pixels are not associated to detector positions, but it is derived from the Axes.

../_images/ExecuteRingProfile.png

The image below shows a visual interpretation for the inputs of the algorithm

../_images/RingProfileInputsView.png

The algorithm goes through each pixel and find its distance from the center. If it relies inside the defined ring, it checks the angle between the pixel position and the center and uses this information to define the bin where to put the count for that pixel.

The RingProfile is also defined for Workspace2D which has the positions based on the detectors, as you can see in the picture below.

../_images/RingProfileInstrument.png

In this case, the inputs of the algorithm is like the image below

../_images/Ringprofileinstrument1.png

The algorithm does to each spectrum, get the associated detector from which it get the positions. From the positions it work out if it belongs or not to the ring and in which bin it must be placed. It finally accumulate all the spectrum values inside the target bin.

It is possible to setup the StartAngle from where to starting the Ring as well as the Sense, if in clockwise direction or anti-clockwise direction. But, the resulting workspace will always place the bins in a relative angle position from the start. Which means that for anti-clockwise sense, the real 3D angle is:

RealAngle = StartAngle + Angle

While for clockwise sense, the real 3D angle is:

RealAngle = StartAngle - Angle

Usage

Example - A complete Circle - no inner radius

ws = CreateSampleWorkspace("Histogram","Multiple Peaks")
wsOut = RingProfile(ws,Centre=[0,5,10],MaxRadius=5)

print("The RingProfile has been calculated with {} bins".format(wsOut.blocksize()))

Output:

The RingProfile has been calculated with 100 bins

Example - A ring

ws = CreateSampleWorkspace("Histogram","Multiple Peaks")
wsOut = RingProfile(ws,Centre=[0,5,10],MinRadius=1,MaxRadius=5,NumBins=200)

print("The RingProfile has been calculated with {} bins".format(wsOut.blocksize()))

Output:

The RingProfile has been calculated with 200 bins

Categories: AlgorithmIndex | Transforms\Grouping

Source

C++ header: RingProfile.h

C++ source: RingProfile.cpp