Skip to content

Commit

Permalink
Refs #4474 updated PeakIntensityVsRadius docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Janik Zikovsky committed Feb 27, 2012
1 parent ce49ee7 commit 70dcf1e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 7 deletions.
17 changes: 10 additions & 7 deletions Code/Mantid/Framework/Crystal/src/PeakIntensityVsRadius.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,21 @@ parameters filled in:
<source lang="python">
# Load a SCD data set and find the peaks
LoadEventNexus(Filename=r'TOPAZ_3131_event.nxs',OutputWorkspace='top_nxs')
ConvertToDiffractionMDWorkspace(InputWorkspace='top_nxs',OutputWorkspace='top',LorentzCorrection='1')
FindPeaksMD(InputWorkspace='top',PeakDistanceThreshold='0.15',MaxPeaks='100',OutputWorkspace='peaks')
LoadEventNexus(Filename=r'TOPAZ_3131_event.nxs',OutputWorkspace='TOPAZ_3131_nxs')
ConvertToDiffractionMDWorkspace(InputWorkspace='TOPAZ_3131_nxs',OutputWorkspace='TOPAZ_3131_md',LorentzCorrection='1')
FindPeaksMD(InputWorkspace='TOPAZ_3131_md',PeakDistanceThreshold='0.15',MaxPeaks='100',OutputWorkspace='peaks')
FindUBUsingFFT(PeaksWorkspace='peaks',MinD='2',MaxD='16')
IndexPeaks(PeaksWorkspace='peaks')
# Run the PeakIntensityVsRadius algorithm
PeakIntensityVsRadius(InputWorkspace='top',PeaksWorkspace='peaks',
RadiusStart=0.00, RadiusEnd=0.15, NumSteps=51,
BackgroundStartFactor=1.5,BackgroundEndFactor=2,
OutputWorkspace='peak_vs_rad')
PeakIntensityVsRadius(InputWorkspace='TOPAZ_3131_md',PeaksWorkspace='peaks',
RadiusStart=0.00, RadiusEnd=0.15, NumSteps=51,
BackgroundStartFactor=1.5,BackgroundEndFactor=2,
OutputWorkspace='peak_vs_rad')
# Plot a few of the peaks
plotSpectrum('peak_vs_rad', [0,2,3], error_bars=True)
</source>
Expand Down
14 changes: 14 additions & 0 deletions Code/Mantid/Framework/MDEvents/src/IntegratePeaksMD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,20 @@ If BackgroundStartRadius is left blank, then '''BackgroundStartRadius''' = '''Pe
[[File:IntegratePeaksMD_graph2.png]]
=== Sample Usage ===
<source lang="python">
# Load a SCD data set and find the peaks
LoadEventNexus(Filename=r'TOPAZ_3131_event.nxs',OutputWorkspace='TOPAZ_3131_nxs')
ConvertToDiffractionMDWorkspace(InputWorkspace='TOPAZ_3131_nxs',OutputWorkspace='TOPAZ_3131_md',LorentzCorrection='1')
FindPeaksMD(InputWorkspace='TOPAZ_3131_md',PeakDistanceThreshold='0.15',MaxPeaks='100',OutputWorkspace='peaks')
FindUBUsingFFT(PeaksWorkspace='peaks',MinD='2',MaxD='16')
# Perform the peak integration, in-place in the 'peaks' workspace.
IntegratePeaksMD(InputWorkspace='TOPAZ_3131_md', PeaksWorkspace='peaks',
PeakRadius=0.12, BackgroundRadius=0.2, BackgroundStartRadius=0.16,
OutputWorkspace='peaks')
</source>
*WIKI*/
#include "MantidAPI/IMDEventWorkspace.h"
Expand Down

0 comments on commit 70dcf1e

Please sign in to comment.