Mantid
Loading...
Searching...
No Matches
SaveHKL.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
10#include "MantidCrystal/DllConfig.h"
12
13namespace Mantid {
14namespace Geometry {
15class ComponentInfo;
16}
17
18namespace Crystal {
19
26class MANTID_CRYSTAL_DLL SaveHKL final : public API::Algorithm {
27public:
29 const std::string name() const override { return "SaveHKL"; }
31 const std::string summary() const override { return "Save a PeaksWorkspace to a ASCII .hkl file."; }
32
34 int version() const override { return 1; }
35 const std::vector<std::string> seeAlso() const override { return {"LoadHKL", "SaveHKLCW"}; }
37 const std::string category() const override { return "Crystal\\DataHandling;DataHandling\\Text"; }
38
45 static double slantPathLength(const Geometry::Instrument_const_sptr &inst,
46 const Geometry::ComponentInfo &componentInfo, const std::string &bankName,
47 const double L2, const double depth);
48
49private:
51 void init() override;
53 void exec() override;
54
55 double absorbSphere(double radius, double twoth, double wl, double &tbar);
56 double spectrumCalc(double TOF, int iSpec, const std::vector<std::vector<double>> &time,
57 const std::vector<std::vector<double>> &spectra, size_t id);
58 void sizeBanks(const std::string &bankName, int &nCols, int &nRows);
59
61 double m_smu = 0.0; // in 1/cm
62 double m_amu = 0.0; // in 1/cm
63 double m_power_th = 0.0;
64};
65
66} // namespace Crystal
67} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition Algorithm.h:76
Save a PeaksWorkspace to a Gsas-style ASCII .hkl file.
Definition SaveHKL.h:26
const std::string summary() const override
Summary of algorithms purpose.
Definition SaveHKL.h:31
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 SaveHKL.h:35
const std::string category() const override
Algorithm's category for identification.
Definition SaveHKL.h:37
DataObjects::PeaksWorkspace_sptr m_ws
Definition SaveHKL.h:60
int version() const override
Algorithm's version for identification.
Definition SaveHKL.h:34
const std::string name() const override
Algorithm's name for identification.
Definition SaveHKL.h:29
ComponentInfo : Provides a component centric view on to the instrument.
std::shared_ptr< PeaksWorkspace > PeaksWorkspace_sptr
Typedef for a shared pointer to a peaks workspace.
std::shared_ptr< const Instrument > Instrument_const_sptr
Shared pointer to an const instrument object.
Helper class which provides the Collimation Length for SANS instruments.