14#include "MantidAlgorithms/DllConfig.h"
16#include <unordered_map>
64 const std::string
name()
const override {
return "ReadGroupsFromFile"; }
66 const std::string
summary()
const override {
67 return "Read a diffraction calibration file (*.cal) or an XML grouping "
68 "file (*.xml) and an instrument name, and output a 2D workspace "
69 "containing on the Y-axis the values of the Group each detector "
70 "belongs to. This is used to visualise the grouping scheme for "
71 "powder diffractometers, where a large number of detectors are "
72 "grouped together. The output 2D workspace can be visualize using "
73 "the show instrument method.";
77 int version()
const override {
return (1); }
78 const std::vector<std::string>
seeAlso()
const override {
79 return {
"CreateDummyCalFile",
"CreateCalFileByNames",
"AlignDetectors",
"DiffractionFocussing",
80 "LoadCalFile",
"SaveCalFile",
"MergeCalFiles"};
83 const std::string
category()
const override {
return "Diffraction\\DataHandling\\CalFiles"; }
88 using calmap = std::unordered_map<int, std::pair<int, int>>;
96 void readXMLGroupingFile(
const std::string &filename);
Base class from which all concrete algorithm classes should be derived.
Read a diffraction calibration file (*.cal) and an instrument name, and output a 2D workspace contain...
int version() const override
Algorithm's version.
const std::string summary() const override
Summary of algorithms purpose.
const std::string category() const override
Algorithm's category for identification.
const std::string name() const override
Algorithm's name.
std::unordered_map< int, std::pair< int, int > > calmap
Map containing the detector entries found in the *.cal file.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso algorithms related to this algorithm.
DataObjects::Workspace2D_sptr loadEmptyInstrument(const std::string &instrument_xml_name)
Child Algorithm to Load the associated empty instrument.
calmap calibration
Calibration map containing the detector entries found in the *.cal file.
std::map< detid_t, int > readGroupingFile(const std::string &groupingFileName, Progress &prog)
Read old-style .cal file to get the grouping.
std::shared_ptr< Workspace2D > Workspace2D_sptr
shared pointer to Mantid::DataObjects::Workspace2D
Helper class which provides the Collimation Length for SANS instruments.