\(\renewcommand\AA{\unicode{x212B}}\)
SymmetriseMDHisto v1¶
Summary¶
Symmetrise MDHistoWorkspace using symmetry operations of Laue class point group.
Properties¶
| Name | Direction | Type | Default | Description | 
|---|---|---|---|---|
| InputWorkspace | Input | IMDHistoWorkspace | Mandatory | Input MDHistoWorkspace to symmetrise. | 
| OutputWorkspace | Output | IMDHistoWorkspace | Mandatory | Symmetrised MDHistoWorkspace. | 
| Pointgroup | Input | string | Point group Hermann–Mauguin symbol used to determine the point group of the Laue class. | |
| Spacegroup | Input | string | Spacegroup Hermann–Mauguin symbol used to determine the point group of the Laue class. | |
| WeightedAverage | Input | boolean | False | Perform average weighted by the error squared. | 
Description¶
Function to symmeterise an MDHistoWorkspace with 3 dimensions (HKL) using the
symmetry operations of the point group of the Laue class (inferred from the PointGroup or Spacegroup provided).
Two types of average can be performed:
WeightedAverage=False(simple mean of the signal values and errors are added in quadrature then divided by the number of contributing bins)
WeightedAverage=True(weighted average performed using inverse square of errors as weights).
If (2) WeightedAverage=True then the signal is given by \(s = \Sigma_i w_i s_i\) where
\(s_i\) is the signal in symmetrically equivalent bin \(i\) and the weights are the inverse of the
error squared in each bin, \(w_i = 1/e_i^2\). The final error is given by \(1/e^2 = \Sigma_i w_i\).
Usage¶
Example:
from mantid.simpleapi import *
y = np.r_[4*[1], 4*[0]]
nbins = int(len(y) ** (1 / 3))
ws = CreateMDHistoWorkspace(SignalInput=y, ErrorInput=y,
                                 Dimensionality=3, Extents='-1,1,-1,1,-1,1',
                                 NumberOfBins=3 * [nbins], Names='H,K,L',
                                 Units='rlu,rlu,rlu')
ws_sym = SymmetriseMDHisto(ws, PointGroup="-1", WeightedAverage=False)
print("All HKL voxels have non-zero intensity?", np.all(ws_sym.getSignalArray()))
Output:
All HKL voxels have non-zero intensity? True
Categories: AlgorithmIndex | Crystal\DataHandling
Source¶
Python: SymmetriseMDHisto.py