Skip to content

Commit

Permalink
Refs #10774. Added properties for lambda range, updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Wedel committed Jan 8, 2015
1 parent d35d6e3 commit c8fe98b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
Expand Up @@ -13,10 +13,18 @@ namespace Poldi {
This is an auxilliary interface that has to be implemented by
functions that are supposed to be used for POLDI fits.
This way the calculation of a theoretical diffractogram can be
performed by the corresponding functions, which may behave differently
depending on their nature. For examples see the following classes:
PoldiSpectrumConstantBackground
PoldiSpectrumDomainFunction
Poldi2DFunction
@author Michael Wedel, Paul Scherrer Institut - SINQ
@date 14/03/2014
@date 07/01/2015
Copyright © 2014 PSI-MSS
Copyright © 2015 PSI-MSS
This file is part of Mantid.
Expand Down
5 changes: 4 additions & 1 deletion Code/Mantid/Framework/SINQ/src/PoldiFitPeaks2D.cpp
Expand Up @@ -359,8 +359,11 @@ MatrixWorkspace_sptr PoldiFitPeaks2D::get1DSpectrum(
std::vector<int> indices = detector->availableElements();

// Create the grid for the diffractogram and corresponding domain/values
double lambdaMin = getProperty("LambdaMin");
double lambdaMax = getProperty("LambdaMax");

PoldiDGrid grid(detector, m_poldiInstrument->chopper(), m_deltaT,
std::make_pair(1.1, 5.0));
std::make_pair(lambdaMin, lambdaMax));

FunctionDomain1DVector domain(grid.grid());
FunctionValues values(domain);
Expand Down
4 changes: 4 additions & 0 deletions Code/Mantid/docs/source/algorithms/PoldiFitPeaks2D-v1.rst
Expand Up @@ -17,6 +17,8 @@ At the moment all profiles are calculated independently, using Gaussian function

PoldiFitPeaks2D can also be used to calculate a theoretical 2D pattern from a set of peaks by limiting the iterations to 0.

In addition to performing the 2D-fit, a theoretical 1D-diffractogram of the fit-function is calculated as well, which can be used in conjunction with :ref:`algm-PoldiAnalyseResiduals` to assess the quality of a fit.

Usage
-----

Expand Down Expand Up @@ -47,6 +49,7 @@ PoldiFitPeaks2D operates on a MatrixWorkspace with a valid POLDI instrument defi
PoldiFitPeaks2D(InputWorkspace=truncated_6904,
PoldiPeakWorkspace="peaks_refined_6904",
RefinedPoldiPeakWorkspace="peaks_fit_2d_6904",
Calculated1DSpectrum="simulated_1d_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 @@ -84,6 +87,7 @@ In general, there is a background in POLDI data that depends on :math:`2\theta`.
PoldiPeakWorkspace="peaks_refined_6904",
OutputWorkspace="simulated_6904",
RefinedPoldiPeakWorkspace="peaks_fit_2d_6904",
Calculated1DSpectrum="simulated_1d_6904",
LinearBackgroundParameter=0.01)

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

0 comments on commit c8fe98b

Please sign in to comment.