diff --git a/Code/Mantid/Framework/DataHandling/src/SetSampleMaterial.cpp b/Code/Mantid/Framework/DataHandling/src/SetSampleMaterial.cpp index 613d7da35b4ed842f7ace6b284b95af6ff7cdf64..31802eb33d182e4c63266e68ec134a4d8fe7f46e 100644 --- a/Code/Mantid/Framework/DataHandling/src/SetSampleMaterial.cpp +++ b/Code/Mantid/Framework/DataHandling/src/SetSampleMaterial.cpp @@ -60,9 +60,9 @@ namespace Mantid declareProperty("SampleNumberDensity", EMPTY_DBL(), mustBePositive, "Optional: This number density of the sample in number of formulas per cubic angstrom will be used instead of calculated"); declareProperty("ZParameter", EMPTY_DBL(), mustBePositive, - "Number of formulas in the unit cell needed for chemical formulas with more than 1 atom"); + "Number of atoms in the unit cell"); declareProperty("UnitCellVolume", EMPTY_DBL(), mustBePositive, - "Unit cell volume in Angstoms^3 needed for chemical formulas with more than 1 atom"); + "Unit cell volume in Angstoms^3. Will be calculated from the OrientedLattice if not supplied."); declareProperty("CoherentXSection", EMPTY_DBL(), mustBePositive, "Optional: This coherent cross-section for the sample material in barns will be used instead of tabulated"); declareProperty("IncoherentXSection", EMPTY_DBL(), mustBePositive, diff --git a/Code/Mantid/docs/source/algorithms/SetSampleMaterial-v1.rst b/Code/Mantid/docs/source/algorithms/SetSampleMaterial-v1.rst index 0d7ca7c07f8eacad310163e64972134da50e574b..4f4d227297d632c06f8053bce94fb363c09cce4c 100644 --- a/Code/Mantid/docs/source/algorithms/SetSampleMaterial-v1.rst +++ b/Code/Mantid/docs/source/algorithms/SetSampleMaterial-v1.rst @@ -44,4 +44,30 @@ Also Note that for isotopes specified in a molecular expression, the isotope must be enclosed by parenthesis, except for two special cases, ``D`` and ``T``, which stand for ``H2`` and ``H3``, respectively. +Cross Section Calculations +########################## + +Each of the cross sections (:math:`\sigma`) are calculated according to + +.. math:: \sigma = \frac{1}{N_{atoms}}\sum_{i}\sigma_{i}n_{i} + +where :math:`N_{atoms} = \sum_{i}n_{i}`. A concrete example for the total +cross section of ``D2 O`` + +.. math:: \sigma = \frac{1}{2+1}\left( 7.64*2 + 4.232*1\right) = 6.504\ barns + +Number Density +############## + +The number density is defined as + +.. math:: \rho_n = \frac{ZParameter}{UnitCellVolume} + +It can can be generated in one of two ways: + +1. Specifying it directly with ``SampleNumberDensity`` +2. Specifying the ``ZParameter`` and the ``UnitCellVolume`` (or letting + the algorithm calculate it from the OrientedLattice on the + ``InputWorkspace``). + .. categories::