FindReflectometryLines v1

../_images/FindReflectometryLines-v1_dlg.png

FindReflectometryLines dialog.

Summary

Finds spectrum numbers corresponding to reflected and transmission lines in a line detector Reflectometry dataset.

Properties

Name Direction Type Default Description
InputWorkspace Input MatrixWorkspace Mandatory Input Reflectometry Workspace
OutputWorkspace Output TableWorkspace Mandatory Output Spectrum Numbers
StartWavelength Input number 0 Start wavelength to use for x-axis cropping
KeepIntermediateWorkspaces Input boolean False Keeps cropped and integrated workspaces in memory after usage.

Description

Finds spectrum numbers corresponding to reflected and transmission lines in a line detector Reflectometry dataset.

Expects two or one, reflectometry peaks, will fail if there are more or less than this number of peaks. The first peak is taken to be from the reflected line, the second is taken to be from the transmission line. This algorithm outputs a TableWorkspace containing the spectrum number of interest.

Usage

Example:

# a simple workspace
dataX = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]
dataY = [0.1, 1, 0.1, 0.2, 0.1, 2, 0.1] # Real peaks with values 1, 2, false peak with value 0.2
dataE = [0, 0, 0, 0, 0, 0, 0]
nSpec = 7
ws = CreateWorkspace(DataX=dataX, DataY=dataY, DataE=dataE, NSpec=nSpec, UnitX="Wavelength",
    VerticalAxisUnit="SpectraNumber")

wsOut = FindReflectometryLines(ws)

for i in range(wsOut.columnCount()):
    print wsOut.getColumnNames()[i], wsOut.column(i)[0]

Output:

Reflected Spectrum Number 6
Transmission Spectrum Number 2

Categories: Algorithms | PythonAlgorithms | Reflectometry