IntegratePeaksMDHKL v1

../_images/IntegratePeaksMDHKL-v1_dlg.png

IntegratePeaksMDHKL dialog.

Summary

Integrate single-crystal peaks in reciprocal space, for MDHistoWorkspaces.

Properties

Name Direction Type Default Description
InputWorkspace Input IMDWorkspace Mandatory An input Sample MDHistoWorkspace or MDEventWorkspace in HKL.
DeltaHKL Input number 0.5 Distance from integer HKL to integrate peak.
GridPoints Input number 201 Number of grid points for each dimension of HKL box.
NeighborPoints Input number 10 Number of points in 5^3 surrounding points above intensity threshold for point to be part of peak.
FluxWorkspace Input MatrixWorkspace   An optional input workspace containing momentum dependent flux for normalization.
SolidAngleWorkspace Input MatrixWorkspace   An optional input workspace containing momentum integrated vanadium for normalization (a measure of the solid angle).
PeaksWorkspace Input PeaksWorkspace Mandatory A PeaksWorkspace containing the peaks to integrate.
OutputWorkspace Output PeaksWorkspace   The output PeaksWorkspace will be a copy of the input PeaksWorkspace with the peaks’ integrated intensities.

Description

IntegratePeaksMDHKL provides integration of a MDHistoWorkspace or MDEventWorkspace in 3-dimensions. The units of the workspace must be HKL. The main usage will be for data normalized by 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.

I_{corr} = I_{peak} - pts_{peak}/pts_{bg} * I_{bg}

with the errors summed in quadrature:

\sigma_{I,corr}^2 = \sigma_{I,peak}^2 + (pts_{peak}/pts_{bg})^2 * \sigma_{I,bg}^2

Using the DeltaHKL parameter, the problem of nearly peaks or regions of diffuse scattering can be avoided. Also for normalized data, the unmeasured data points are excluded from the background. See white regions in last figure.

peak3d.png

Peak Integration Input. 3D Box.

IntegratePeaksMDHKLbox.png

Integration slice at center of box.

IntegratePeaksMDHKLpeak.png

Integration slice of peak grid points.

IntegratePeaksMDHKLbkg.png

Integration slice of background grid points.

Usage

Example - IntegratePeaksMDHKL event histo

#Create PeaksWorkspace
sampleWs = CreateSampleWorkspace()
pws = CreatePeaksWorkspace(InstrumentWorkspace=sampleWs,NumberOfPeaks=3)
p = pws.getPeak(0)
p.setHKL(5,0,0)
p = pws.getPeak(1)
p.setHKL(0,0,0)
p = pws.getPeak(2)
p.setHKL(-5,0,0)
#Test with MDEventWorkspace
mdws = CreateMDWorkspace(Dimensions=3, Extents=[-10,10,-10,10,-10,10], Names='[H,0,0],[0,K,0],[0,0,L]',Units='A^-1,A^-1,A^-1',Frames='HKL,HKL,HKL')
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 =IntegratePeaksMDHKL(InputWorkspace=mdws,PeaksWorkspace=pws,DeltaHKL=1.5,GridPoints=21)
for i in range(3):
    p = pws.getPeak(i)
    print p.getIntensity(),p.getSigmaIntensity()
#Test with MDHistoWorkspace
mdws = BinMD(InputWorkspace=mdws,AlignedDim0="[H,0,0],-10,10,101",AlignedDim1="[0,K,0],-10,10,101",AlignedDim2="[0,0,L],-10,10,101")
pws =IntegratePeaksMDHKL(InputWorkspace=mdws,PeaksWorkspace=pws,DeltaHKL=1.5,GridPoints=21)
for i in range(3):
    p = pws.getPeak(i)
    print p.getIntensity(),p.getSigmaIntensity()

Output:

99913.3212993 316.123352485
99913.3212993 316.123352485
99913.3212993 316.123352485
99945.2374619 316.157736186
99951.6716018 316.164910575
99926.3456269 316.133414893

Categories: Algorithms | MDAlgorithms\Peaks