Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refs #9992. Extract interface of PawleyFunction into API
This is currently required so the function can be used in the SINQ module. When the POLDI algorithms are in CurveFitting/Algorithms, this interface can be deleted again.
- Loading branch information
Michael Wedel
committed
Mar 27, 2015
1 parent
3964efd
commit 8173c34
Showing
5 changed files
with
97 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
#ifndef MANTID_API_IPAWLEYFUNCTION_H_ | ||
#define MANTID_API_IPAWLEYFUNCTION_H_ | ||
|
||
#include "MantidAPI/DllConfig.h" | ||
#include "MantidAPI/FunctionParameterDecorator.h" | ||
#include "MantidAPI/IPeakFunction.h" | ||
|
||
namespace Mantid { | ||
namespace API { | ||
|
||
/** IPawleyFunction | ||
This abstract class defines the interface of a PawleyFunction. An | ||
implementation can be found in CurveFitting/PawleyFunction. This interface | ||
exists so that the function can be used in modules outside CurveFitting. | ||
@author Michael Wedel, Paul Scherrer Institut - SINQ | ||
@date 11/03/2015 | ||
Copyright © 2015 PSI-NXMM | ||
This file is part of Mantid. | ||
Mantid is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 3 of the License, or | ||
(at your option) any later version. | ||
Mantid is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
File change history is stored at: <https://github.com/mantidproject/mantid> | ||
Code Documentation is available at: <http://doxygen.mantidproject.org> | ||
*/ | ||
class MANTID_API_DLL IPawleyFunction : public FunctionParameterDecorator { | ||
public: | ||
IPawleyFunction(); | ||
/// Virtual destructor. | ||
virtual ~IPawleyFunction() {} | ||
|
||
/// A string that names the crystal system. | ||
virtual void setCrystalSystem(const std::string &crystalSystem) = 0; | ||
|
||
/// Sets the name of the profile function used for the reflections. | ||
virtual void setProfileFunction(const std::string &profileFunction) = 0; | ||
|
||
/// Set the function parameters according to the supplied unit cell. | ||
virtual void setUnitCell(const std::string &unitCellString) = 0; | ||
|
||
/// Assign several peaks with the same fwhm/height parameters. | ||
virtual void setPeaks(const std::vector<Kernel::V3D> &hkls, double fwhm, | ||
double height) = 0; | ||
|
||
/// Removes all peaks from the function. | ||
virtual void clearPeaks() = 0; | ||
|
||
/// Add a peak with the given parameters. | ||
virtual void addPeak(const Kernel::V3D &hkl, double fwhm, double height) = 0; | ||
|
||
/// Returns the number of peaks in the function | ||
virtual size_t getPeakCount() const = 0; | ||
|
||
/// Returns the profile function stored for the i-th peak. | ||
virtual IPeakFunction_sptr getPeakFunction(size_t i) const = 0; | ||
|
||
/// Returns the Miller indices stored for the i-th peak. | ||
virtual Kernel::V3D getPeakHKL(size_t i) const = 0; | ||
}; | ||
|
||
typedef boost::shared_ptr<IPawleyFunction> IPawleyFunction_sptr; | ||
|
||
} // namespace API | ||
} // namespace Mantid | ||
|
||
#endif /* MANTID_API_IPAWLEYFUNCTION_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#include "MantidAPI/IPawleyFunction.h" | ||
|
||
namespace Mantid { | ||
namespace API { | ||
/// Default constructor | ||
IPawleyFunction::IPawleyFunction() : FunctionParameterDecorator() {} | ||
|
||
} // namespace API | ||
} // namespace Mantid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters