26namespace DataHandling {
61 const std::string
name()
const override {
return "LoadSpice2D"; }
63 const std::string
summary()
const override {
64 return "Loads a SANS data file produce by the HFIR instruments at ORNL. "
65 "The instrument geometry is also loaded. The center of the detector "
66 "is placed at (0,0,D), where D is the sample-to-detector distance.";
70 int version()
const override {
return 1; }
71 const std::vector<std::string>
seeAlso()
const override {
return {
"LoadSpiceAscii",
"LoadSpiceXML2DDet"}; }
73 const std::string
category()
const override {
return "DataHandling\\Text;SANS\\DataHandling"; }
75 static const int nMonitors = 2;
88 void throwException(Poco::XML::Element *elem,
const std::string &name,
const std::string &fileName);
92 void setInputPropertiesAsMemberProperties();
94 void addMetadataAsRunProperties(
const std::map<std::string, std::string> &);
95 std::pair<int, int> parseDetectorDimensions(
const std::string &);
97 std::vector<int> getData(
const std::string &);
98 void createWorkspace(
const std::vector<int> &data,
const std::string &title,
double monitor1_counts,
99 double monitor2_counts);
100 void setWavelength(std::map<std::string, std::string> &metadata);
102 T addRunProperty(std::map<std::string, std::string> &metadata,
const std::string &oldName,
const std::string &newName,
103 const std::string &units =
"");
104 template <
class T>
void addRunProperty(
const std::string &name,
const T &
value,
const std::string &units =
"");
105 void setBeamTrapRunProperty(std::map<std::string, std::string> &metadata);
106 void detectorDistance(std::map<std::string, std::string> &metadata);
107 void detectorTranslation(std::map<std::string, std::string> &metadata);
108 void setMetadataAsRunProperties(std::map<std::string, std::string> &metadata);
109 void rotateDetector(
const double &);
111 void setSansSpiceXmlFormatVersion(std::map<std::string, std::string> &metadata);
115 double m_wavelength_input{0.0};
116 double m_wavelength_spread_input{0.0};
118 double m_wavelength{0.0};
119 double m_dwavelength{0.0};
120 double m_sansSpiceXmlFormatVersion{0.0};
double value
The value of the point.
Defines an interface to an algorithm that loads a file so that it can take part in the automatic sele...
This algorithm loads a SPICE2D file for HFIR SANS into a workspace.
const std::string name() const override
Algorithm's name for identification overriding a virtual method.
const std::string summary() const override
Summary of algorithms purpose.
DataObjects::Workspace2D_sptr m_workspace
Mantid::Types::Core::DateAndTime m_endTime
int version() const override
Algorithm's version for identification overriding a virtual method.
Mantid::Types::Core::DateAndTime m_startTime
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
const std::string category() const override
Algorithm's category for identification overriding a virtual method.
Mantid::DataHandling::XmlHandler m_xmlHandler
Defines a wrapper around an open file.
std::shared_ptr< T > createWorkspace(InitArgs... args)
std::shared_ptr< Workspace2D > Workspace2D_sptr
shared pointer to Mantid::DataObjects::Workspace2D
Helper class which provides the Collimation Length for SANS instruments.