DetectorFloodWeighting v1

../_images/DetectorFloodWeighting-v1_dlg.png

DetectorFloodWeighting dialog.

Summary

Generates a Detector flood weighting, or sensitivity workspace

Properties

Name Direction Type Default Description
InputWorkspace Input MatrixWorkspace Mandatory Flood weighting measurement
TransmissionWorkspace Input MatrixWorkspace   Flood weighting measurement
Bands Input dbl list   Wavelength bands to use. Single pair min to max.
OutputWorkspace Output MatrixWorkspace Mandatory Normalized flood weighting measurement
SolidAngleCorrection Input boolean True Perform final solid angle correction

Description

This algorithm is used to calculate the detector flood weighting workspace use for pixel flood corrections. It was originally developed for the ANSTO Bilby instrument.

This algorithm crops the data over the specified wavelength region, and sums it. The algorithm will then perform a solid angle correction on each spectra via SolidAngle v1 if specified, and divides through by the provided transmission workspace if provided. The result is divided by the mean spectrum value in the previous result.

Usage

Example - Simple Generation

import numpy as np
# create histogram workspace
dataX = range(0,10) # or use dataX=range(0,10)
dataY = [1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2] # or use dataY=[1]*9
ws = CreateWorkspace(dataX, dataY, NSpec=2, UnitX="Wavelength")

out_ws = DetectorFloodWeighting(InputWorkspace=ws, Bands=[0,10], SolidAngleCorrection=False)

print('Number Histograms {}'.format(out_ws.getNumberHistograms()))
print('Min X: {} Max X: {}'.format(out_ws.readX(0)[0], out_ws.readX(0)[1]))

Output:

Number Histograms 2
Min X: 0.0 Max X: 10.0

Example - With Solid Angle Correction

ws = CreateSimulationWorkspace(Instrument='LOQ', BinParams=[1,1,10], UnitX="Wavelength")
out_ws = DetectorFloodWeighting(InputWorkspace=ws, Bands=[0,10], SolidAngleCorrection=True)

print('Number Histograms {}'.format(out_ws.getNumberHistograms()))
print('Number of Bins {}'.format(out_ws.blocksize()))
print('X units {}'.format(out_ws.getAxis(0).getUnit().unitID()))

Output:

Number Histograms 17776
Number of Bins 1
X units Wavelength

Categories: AlgorithmIndex | Workflow\SANS

Source

Python: DetectorFloodWeighting.py (last modified: 2019-03-11)