.. algorithm:: .. summary:: .. relatedalgorithms:: .. properties:: Description ----------- Intended for use on data from engineering beamlines, this algorithm creates a shape object for use as the 'gauge volume' (i.e. the portion of the sample that is visible to the detectors in a given run) of a larger sample in the :ref:`algm-AbsorptionCorrection` algorithm. The sample shape will also need to be defined using, e.g., the :ref:`algm-CreateSampleShape` algorithm. Shapes are defined using XML descriptions that can be found :ref:`here `. Internally, this works by attaching the XML string (after validating it) to a property called "GaugeVolume" on the workspace's :ref:`Run ` object. Usage ----- **Example: A simple spherical sample with a cuboid gauge volume** .. testcode:: ExSimpleSpereWithCuboidGuage #setup the sample shape sphere = ''' ''' ws = CreateSampleWorkspace("Histogram",NumBanks=1,BankPixelWidth=1) ws = ConvertUnits(ws,"Wavelength") ws = Rebin(ws,Params=[1]) CreateSampleShape(ws,sphere) SetSampleMaterial(ws,ChemicalFormula="V") #setup the gauge volume cuboid = ''' ''' DefineGaugeVolume(ws,cuboid) #restrict the number of wavelength points to speed up the example wsOut = AbsorptionCorrection(ws, NumberOfWavelengthPoints=5, ElementSize=2) print("The created workspace has one entry for each spectra: {}".format(wsOut.getNumberHistograms())) Output: .. testoutput:: ExSimpleSpereWithCuboidGuage The created workspace has one entry for each spectra: 1 .. categories:: .. sourcelink::