diff --git a/Code/Mantid/docs/source/algorithms/AbsorptionCorrection-v1.rst b/Code/Mantid/docs/source/algorithms/AbsorptionCorrection-v1.rst index fc1ba8e28f89..8a3a0c8f6842 100644 --- a/Code/Mantid/docs/source/algorithms/AbsorptionCorrection-v1.rst +++ b/Code/Mantid/docs/source/algorithms/AbsorptionCorrection-v1.rst @@ -69,4 +69,33 @@ defined because detector, source & sample position are needed. .. |AbsorptionFlow.png| image:: /images/AbsorptionFlow.png +Usage +----- + +**Example: A simple spherical sample** + +.. testcode:: ExSimpleSpere + + #setup the sample shape + sphere = ''' + + + ''' + + ws = CreateSampleWorkspace("Histogram",NumBanks=1) + ws = ConvertUnits(ws,"Wavelength") + CreateSampleShape(ws,sphere) + SetSampleMaterial(ws,ChemicalFormula="V") + + #restrict the number of wavelength points to speed up the example + wsOut = AbsorptionCorrection(ws,NumberOfWavelengthPoints=5) + + print "The created workspace has one entry for each spectra: %i" % wsOut.getNumberHistograms() + +Output: + +.. testoutput:: ExSimpleSpere + + The created workspace has one entry for each spectra: 100 + .. categories::