Mantid
Loading...
Searching...
No Matches
SortHKL.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
12
14
17
21
22#include "MantidKernel/V3D.h"
23
24namespace Mantid {
25namespace Crystal {
26
32class MANTID_CRYSTAL_DLL SortHKL final : public API::Algorithm {
33public:
34 SortHKL();
35 ~SortHKL() override;
36
38 const std::string name() const override { return "SortHKL"; };
40 const std::string summary() const override {
41 return "Sorts a PeaksWorkspace by HKL. Averages intensities using point "
42 "group.";
43 }
44
46 int version() const override { return 1; };
47 const std::vector<std::string> seeAlso() const override { return {"TransformHKL"}; }
49 const std::string category() const override { return R"(Crystal\Peaks;DataHandling\Text;Utility\Sorting)"; }
50
51private:
52 void init() override;
53 void exec() override;
54
55 std::vector<DataObjects::Peak> getNonZeroPeaks(const std::vector<DataObjects::Peak> &inputPeaks) const;
56
57 PeakStatisticsTools::UniqueReflectionCollection getUniqueReflections(const std::vector<DataObjects::Peak> &peaks,
58 const Geometry::UnitCell &cell) const;
59
60 Geometry::ReflectionCondition_sptr getCentering() const;
61 Geometry::PointGroup_sptr getPointgroup() const;
62
63 std::pair<double, double> getDLimits(const std::vector<DataObjects::Peak> &peaks,
64 const Geometry::UnitCell &cell) const;
65
66 API::ITableWorkspace_sptr getStatisticsTable(const std::string &name) const;
67 void insertStatisticsIntoTable(const API::ITableWorkspace_sptr &table,
68 const PeakStatisticsTools::PeaksStatistics &statistics) const;
69
71 getOutputPeaksWorkspace(const DataObjects::PeaksWorkspace_sptr &inputPeaksWorkspace) const;
72
73 void sortOutputPeaksByHKL(const API::IPeaksWorkspace_sptr &outputPeaksWorkspace);
74
76 std::vector<Mantid::Geometry::PointGroup_sptr> m_pointGroups;
77
79 std::vector<Mantid::Geometry::ReflectionCondition_sptr> m_refConds;
80};
81
82} // namespace Crystal
83} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
The PeaksStatistics class is a small helper class that is used in SortHKL.
This class computes all possible unique reflections within the specified d-limits,...
Save a PeaksWorkspace to a Gsas-style ASCII .hkl file.
Definition: SortHKL.h:32
const std::string summary() const override
Summary of algorithms purpose.
Definition: SortHKL.h:40
std::vector< Mantid::Geometry::ReflectionCondition_sptr > m_refConds
Reflection conditions.
Definition: SortHKL.h:79
const std::string category() const override
Algorithm's category for identification.
Definition: SortHKL.h:49
int version() const override
Algorithm's version for identification.
Definition: SortHKL.h:46
const std::string name() const override
Algorithm's name for identification.
Definition: SortHKL.h:38
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
Definition: SortHKL.h:47
std::vector< Mantid::Geometry::PointGroup_sptr > m_pointGroups
Point Groups possible.
Definition: SortHKL.h:76
Class to implement unit cell of crystals.
Definition: UnitCell.h:44
std::shared_ptr< IPeaksWorkspace > IPeaksWorkspace_sptr
shared pointer to Mantid::API::IPeaksWorkspace
std::shared_ptr< ITableWorkspace > ITableWorkspace_sptr
shared pointer to Mantid::API::ITableWorkspace
std::shared_ptr< PeaksWorkspace > PeaksWorkspace_sptr
Typedef for a shared pointer to a peaks workspace.
std::shared_ptr< ReflectionCondition > ReflectionCondition_sptr
Shared pointer to a ReflectionCondition.
std::shared_ptr< PointGroup > PointGroup_sptr
Shared pointer to a PointGroup.
Definition: PointGroup.h:67
Helper class which provides the Collimation Length for SANS instruments.