Skip to content
Snippets Groups Projects
Commit 1b99aeb5 authored by Matt King's avatar Matt King
Browse files

Doxygen comments added

Refs #13508
parent 87004758
No related branches found
No related tags found
No related merge requests found
...@@ -53,6 +53,7 @@ public: ...@@ -53,6 +53,7 @@ public:
const std::string category() const { return "MDAlgorithms"; } const std::string category() const { return "MDAlgorithms"; }
/// Algorithm's version for identification /// Algorithm's version for identification
int version() const { return 1; } int version() const { return 1; }
/// Finding the extents of the first non-zero signals.
void void
findFirstNonZeroMinMaxExtents(Mantid::API::IMDHistoWorkspace_sptr inputWs, findFirstNonZeroMinMaxExtents(Mantid::API::IMDHistoWorkspace_sptr inputWs,
std::vector<Mantid::coord_t> &minVec, std::vector<Mantid::coord_t> &minVec,
......
...@@ -5,10 +5,19 @@ using namespace Mantid::Geometry; ...@@ -5,10 +5,19 @@ using namespace Mantid::Geometry;
using namespace Mantid::Kernel; using namespace Mantid::Kernel;
namespace { namespace {
// helper method to create a string from min and max extents (with non-zero /**
// signals) * helper method to create a string from min and max extents (with non-zero
// ready to be used as the PBins for IntegrateMDHistoWorkspace algorithm in * signals) ready to be used as the PBins for IntegrateMDHistoWorkspace
// exec. * algorithm in
* exec
* @param minVector : Vector containing the minimum extents that we will crop
* to.
* @param maxVector : Vector containing the maximum extents that we will crop
* to.
* @param inputWs : Used in the calculation from centre to bin edges
* @return : a string vector of binning parameters for IntegrateMDHistoWorkspace
* to take as input.
*/
std::vector<std::string> std::vector<std::string>
createPBinStringVector(std::vector<Mantid::coord_t> minVector, createPBinStringVector(std::vector<Mantid::coord_t> minVector,
std::vector<Mantid::coord_t> maxVector, std::vector<Mantid::coord_t> maxVector,
...@@ -39,6 +48,16 @@ namespace MDAlgorithms { ...@@ -39,6 +48,16 @@ namespace MDAlgorithms {
DECLARE_ALGORITHM(CompactMD) DECLARE_ALGORITHM(CompactMD)
/**
* Finding the centre points of Bins with non-zero signal values
* we then compare this centre to minimum and maximum centres we have
* to get the minimum and maximum extents of the workspace that has non-zero
* signal values in the Bins.
* @param inputWs : The workspace that will be iterated over to find the extents.
* @param minVec : Vector used to stored the minimum extent in each dimension
* @param maxVec : Vector used to stored the maximum extents in each dimension
*/
void CompactMD::findFirstNonZeroMinMaxExtents( void CompactMD::findFirstNonZeroMinMaxExtents(
IMDHistoWorkspace_sptr inputWs, std::vector<Mantid::coord_t> &minVec, IMDHistoWorkspace_sptr inputWs, std::vector<Mantid::coord_t> &minVec,
std::vector<Mantid::coord_t> &maxVec) { std::vector<Mantid::coord_t> &maxVec) {
...@@ -66,6 +85,9 @@ void CompactMD::findFirstNonZeroMinMaxExtents( ...@@ -66,6 +85,9 @@ void CompactMD::findFirstNonZeroMinMaxExtents(
} while (ws_iter->next()); } while (ws_iter->next());
} }
/**
* Initiliase the algorithm's properties.
*/
void CompactMD::init() { void CompactMD::init() {
// input workspace to compact // input workspace to compact
declareProperty(new WorkspaceProperty<IMDHistoWorkspace>("InputWorkspace", "", declareProperty(new WorkspaceProperty<IMDHistoWorkspace>("InputWorkspace", "",
...@@ -76,6 +98,9 @@ void CompactMD::init() { ...@@ -76,6 +98,9 @@ void CompactMD::init() {
"OutputWorkspace", "", Direction::Output), "OutputWorkspace", "", Direction::Output),
"Output compacted workspace"); "Output compacted workspace");
} }
/**
* Execute the algorithm.
*/
void CompactMD::exec() { void CompactMD::exec() {
const IMDHistoWorkspace_sptr input_ws = this->getProperty("InputWorkspace"); const IMDHistoWorkspace_sptr input_ws = this->getProperty("InputWorkspace");
IMDWorkspace_sptr out_ws; IMDWorkspace_sptr out_ws;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment