Skip to content

Commit

Permalink
Refs #12585 release notes and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
VickieLynch committed Jul 1, 2016
1 parent 1bc78b8 commit 5fcf12e
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef MANTID_MDALGORITHMS_INTEGRATEPEAKSMDHKL_H_
#define MANTID_MDALGORITHMS_INTEGRATEPEAKSMHKL_H_
#define MANTID_MDALGORITHMS_INTEGRATEPEAKSMDHKL_H_

#include "MantidAPI/Algorithm.h"
#include "MantidAPI/IMDHistoWorkspace_fwd.h"
Expand Down
69 changes: 69 additions & 0 deletions docs/source/algorithms/IntegratePeaksMDHKL-v1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@

.. algorithm::

.. summary::

.. alias::

.. properties::

Description
-----------

:ref:`IntegratePeaksMDHKL <algm-IntegratePeaksMDHKL>` provides integration of a
:ref:`MDHistoWorkspace <MDHistoWorkspace>` or :ref:`MDEventWorkspace <MDEventWorkspace>` in 3-dimensions.
The units of the workspace must be HKL. The main usage will be for data normalized by :ref:`MDNormSCD <algm-MDNormSCD>`.
A 3D box is created for each peak and the background and peak data are separated. The intensity and sigma of the
intensity is found from the grid inside the peak and the background is subtracted. The boxes are created and integrated
in parallel and less memory is required than binning all HKL at once.


.. figure:: /images/peak3d.png
:alt: peak3d.png
:width: 400px
:align: center

Peak Integration Input. 3D Box.

.. figure:: /images/IntegratePeaksMDHKLbox.png
:alt: IntegratePeaksMDHKLbox.png
:width: 400px
:align: left

.. figure:: /images/IntegratePeaksMDHKLpeak.png
:alt: IntegratePeaksMDHKLpeak.png
:width: 400px
:align: center

.. figure:: /images/IntegratePeaksMDHKLbkg.png
:alt: IntegratePeaksMDHKLbkg.png
:width: 400px
:align: right

Integration Output. Slice at center of box (left) with peak (center) grid point and background (right) points separated.


Usage
-----

**Example - IntegratePeaksMDHKL simple cut**

.. testcode:: IntegratePeaksMDHKLExample

mdws = CreateMDWorkspace(Dimensions=3, Extents=[-10,10,-10,10,-10,10], Names='[H,0,0],[0,K,0],[0,0,L]',Units='U,U,U')
FakeMDEventData(InputWorkspace=mdws, PeakParams=[100000,-5,0,0,1])
FakeMDEventData(InputWorkspace=mdws, PeakParams=[100000,0,0,0,1])
FakeMDEventData(InputWorkspace=mdws, PeakParams=[100000,5,0,0,1])
pws = CreatePeaksWorkspace(mdws, NumberOfPeaks=0)
# Add peak to the peaks workspace
AddPeak( pws, ws, TOF=100, DetectorID=101, Height=1 )

#Integrate out 2 dimensions
#pws =IntegratePeaksMDHKL(InputWorkspace=mdws,PeaksWorkspace=pws)


Output:

.. testoutput:: IntegratePeaksMDHKLExample


Binary file added docs/source/images/IntegratePeaksMDHKLbkg.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/images/IntegratePeaksMDHKLbox.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/images/IntegratePeaksMDHKLpeak.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/images/peak3d.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions docs/source/release/v3.8.0/diffraction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ Single Crystal Diffraction
has been expanded and improved from previous release. It provides an integrated user-friendly interface for
instrument scientists and users to access data, calculate and refine UB matrix, merge multiple data sets
for slice-view and peak integration.
.. figure:: ../../images/peak3d.png
:width: 487
:align: right
- :ref:`IntegratePeaksMDHKL <algm-IntegratePeaksMDHKL>` has been added to integrate data in HKL space. The
main usage will be for data normalized by :ref:`MDNormSCD <algm-MDNormSCD>`, but it also works for MDHistoWorkspaces
and MDEventWorkspaces. The MD data must be in units of HKL. A 3D box is created for each peak and the background
and peak data are separated. The intensity and sigma of the intensity is found from the grid inside the peak and
the background is subtracted. The boxes are created and integrated in parallel and less memory is required than
binning all HKL at once.


Engineering Diffraction
Expand Down

0 comments on commit 5fcf12e

Please sign in to comment.