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

CalculateEfficiency v2

../_images/CalculateEfficiency-v2_dlg.png

CalculateEfficiency dialog.

Summary

Calculates the detector efficiency for a SANS instrument.

Properties

Name Direction Type Default Description
InputWorkspace Input Workspace Mandatory The workspace containing the flood data
OutputWorkspace Output MatrixWorkspace   The name of the workspace to be created as the output of the algorithm
MinThreshold Input number 0 Minimum threshold for a pixel to be considered
MaxThreshold Input number 2 Maximum threshold for a pixel to be considered
MergeGroup Input boolean False Whether to merge entries when WorkspaceGroup is specified as input.

Description

Compute the detector efficiency of SANS data. This algorithm is used by SANS reduction.

The flood is a short for flood field. The flood field is collected from a sample that scatters uniformly in angle to ensure that every pixel on the detector has the potential to see the same number of neutrons. Different materials are currently used at the beamlines to measure the flood field. At present, the standard samples used for measuring the flood field are H2O in a 1 mm path length cell for GP-SANS and Bio-SANS, and a 1 mm sheet of PMMA for EQ-SANS.

In case the input is a WorkspaceGroup, it is processed entry-by-entry if the MergeGroup property is set to False. Otherwise, the input group is going to be merged and counts will be averaged. In addition, counts in spectra that are masked in one of the entries of the group but not the other will be replaced with values from the entry that has this spectrum not masked. This allows, for example, for removal of the holes in the efficiency map caused by masking the beam stop, provided at least two measurements are done at different, e.g. horizontal, offsets.

The relative detector sensitivity is computed the following way

\(S(x,y)=\frac{I_{flood}(x,y)}{1/N_{pixels}\sum_{i,j}I_{flood}(i,j)}\)

where \(I_{flood}(x,y)\) is the pixel count of the flood data in pixel (x,y). If a minimum and/or maximum sensitivity is given, the pixels having an sensitivity outside the given limits are set to -inf (In Mantid EMPTY_DBL).

Usage

Note

To run these usage examples please first download the usage data, and add these to your path. In Mantid this is done using Manage User Directories.

Example - Compute the detector efficiency from a BioSANS data file:

# Load your data file
workspace = LoadSpice2D('BioSANS_empty_cell.xml')

# Compute the detector sensitivity
sensitivity = CalculateEfficiency('workspace', MinThreshold=0.5, MaxThreshold=1.5)
# Load your data file
workspace_group = Load('D22_mask_central.nxs,D22_mask_offset.nxs')

# Compute the detector sensitivity
sensitivity = CalculateEfficiency(InputWorkspace='workspace_group', MergeGroup=True, MinThreshold=0.5, MaxThreshold=1.5)

Categories: AlgorithmIndex | SANS | CorrectionFunctions\EfficiencyCorrections

Source

C++ header: CalculateEfficiency2.h (last modified: 2021-03-31)

C++ source: CalculateEfficiency2.cpp (last modified: 2021-03-31)