$$\renewcommand\AA{\unicode{x212B}}$$

# RingProfile v1¶

## Summary¶

Calculates the sum of the counts against a circular ring.

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

Input

number

0

Input

number

Optional

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.

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

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.

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

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")

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")

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


Output:

The RingProfile has been calculated with 200 bins


Categories: AlgorithmIndex | Transforms\Grouping