DetectorEfficiencyVariation

From MantidProject

Jump to: navigation, search

Contents

Summary

Compares two white beam vanadium workspaces from the same instrument to find detectors whose efficiencies have changed beyond a threshold.

Properties

Order Name Direction Type Default Description
1 WhiteBeamBase Input Workspace Mandatory Name of a white beam vanadium workspace
2 WhiteBeamCompare Input Workspace Mandatory Name of a matching second white beam vanadium run from the same instrument
3 OutputWorkspace Output Workspace Mandatory Each histogram from the input workspace maps to a histogram in this workspace with one value that indicates if there was a dead detector
4 Variation Input double Mandatory Identify histograms whose total number of counts has changed by more than this factor of the median change between the two input workspaces
5 StartWorkspaceIndex Input integer 0.0 The index number of the first spectrum to include in the calculation
6 EndWorkspaceIndex Input integer Last spectrum in the workspace The index number of the last spectrum to include in the calculation
7 RangeLower Input double The start of each histogram No bin with a boundary at an x value less than this will be included in the summation used to decide if a detector is 'bad'
8 RangeUpper Input double The end of each histogram No bin with a boundary at an x value higher than this value will be included in the summation used to decide if a detector is 'bad'
9 OutputFile Input string No file output A filename to which to write the list of dead detector UDETs
10 GoodValue Input double 0.0 For each input workspace spectrum that passes write this flag value to the equivalent spectrum in the output workspace
11 BadValue Input double 100.0 For each input workspace spectrum that fails write this flag value to the equivalent spectrum in the output workspace
12 BadSpectraNums Output integer list Not available in MantidPlot The list of specta numbers that failed this test

Description

It is intended that the input white beam vanadium workspaces are from the same instrument and were collected before and after an experimental run of interest. First the ratios of the total number of counts in corresponding histograms from each input workspace are calculated and then the median ratio is calculated. Each ratio is compared to the median and a histogram will fail when any of the following conditions are true:

  • (sum1/sum2)/median(sum1/sum2) > Variation
  • (sum1/sum2)/median(sum1/sum2) < 1/Variation

where sum1 is the sum of the counts in a histogram in the workspace WhiteBeamBase and sum2 is the sum of the counts in the equivalent histogram in WhiteBeamCompare. The above equations only make sense for identifying bad detectors if Variation > 1. If a value of less than one is given for Variation then Variation will be set to the reciprocal.

The output workspace contains single bin histograms with a value of 100 when the input histogram with the same spectrum index fails and 0 for a pass. The detector IDs of all the detectors associated with failing histograms are listed in the output array and the output file contains spectrum numbers and the detector IDs for those histograms. Histograms associated with detectors that were already marked bad in the input workspace are listed as bad in the output workspace, file and the array and are not included in any of the calculations.


Subalgorithms used

Uses the Integration algorithm to sum the spectra.

Source Code

Header DetectorEfficiencyVariation.h

Source DetectorEfficiencyVariation.cpp

Personal tools
Create a book