Skip to content

Commit

Permalink
Refs #10623. Fixing doctest for PoldiFitPeaks2D
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Wedel committed Dec 5, 2014
1 parent 03da7df commit 62cf09b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Code/Mantid/docs/source/algorithms/PoldiFitPeaks2D-v1.rst
Expand Up @@ -29,14 +29,14 @@ PoldiFitPeaks2D operates on a MatrixWorkspace with a valid POLDI instrument defi
# Load data file with Si spectrum and instrument definition
raw_6904 = LoadSINQFile(Filename = "poldi2013n006904.hdf", Instrument = "POLDI")
LoadInstrument(raw_6904, InstrumentName = "POLDI")

# Data needs to be truncated to correct dimensions.
truncated_6904 = PoldiTruncateData(raw_6904)

# Perform correlation, peak search and fit
correlated_6904 = PoldiAutoCorrelation(truncated_6904)
peaks_6904 = PoldiPeakSearch(correlated_6904)

PoldiFitPeaks1D(InputWorkspace = correlated_6904, FwhmMultiples = 4.0,
PeakFunction = "Gaussian", PoldiPeakTable = peaks_6904,
OutputWorkspace = "peaks_refined_6904", ResultTableWorkspace = "result_table_6904",
Expand All @@ -45,8 +45,9 @@ PoldiFitPeaks2D operates on a MatrixWorkspace with a valid POLDI instrument defi

# Calculate a 2D spectrum using the refined peaks
PoldiFitPeaks2D(InputWorkspace=truncated_6904,
PoldiPeakWorkspace="peaks_refined_6904",
OutputWorkspace="simulated_6904")
PoldiPeakWorkspace="peaks_refined_6904",
RefinedPoldiPeakWorkspace="peaks_fit_2d_6904",
OutputWorkspace="simulated_6904")

After this step, there is a new workspace containing the simulated spectrum. It should look similar to the one in the following figure:

Expand Down Expand Up @@ -82,6 +83,7 @@ In general, there is a background in POLDI data that depends on :math:`2\theta`.
PoldiFitPeaks2D(InputWorkspace=truncated_6904,
PoldiPeakWorkspace="peaks_refined_6904",
OutputWorkspace="simulated_6904",
RefinedPoldiPeakWorkspace="peaks_fit_2d_6904",
LinearBackgroundParameter=0.01)

Now the spectrum looks different, like in the example below.
Expand Down

0 comments on commit 62cf09b

Please sign in to comment.