Mantid
Loading...
Searching...
No Matches
LoadILLPolarizedDiffraction.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2017 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
11#include "MantidDataHandling/DllConfig.h"
15
16#include <utility>
17
18namespace Mantid {
19namespace DataHandling {
20
26class MANTID_DATAHANDLING_DLL LoadILLPolarizedDiffraction : public API::IFileLoader<Kernel::NexusDescriptor> {
27public:
28 const std::string name() const override;
29 int version() const override;
30 const std::vector<std::string> seeAlso() const override { return {"LoadNexus"}; }
31 const std::string category() const override;
32 const std::string summary() const override;
33 int confidence(Kernel::NexusDescriptor &) const override;
35
36private:
37 void init() override;
38 std::map<std::string, std::string> validateInputs() override;
39 void exec() override;
40
41 API::MatrixWorkspace_sptr initStaticWorkspace(const NeXus::NXEntry &);
42
43 void loadData();
44 void loadMetaData();
45 API::WorkspaceGroup_sptr sortPolarisations();
46 void loadInstrument(const API::MatrixWorkspace_sptr &, const std::string &);
47 std::vector<double> loadTwoThetaDetectors(const API::MatrixWorkspace_sptr &, const NeXus::NXEntry &, const int);
48 std::vector<double> loadBankParameters(const API::MatrixWorkspace_sptr &, const int);
49 void moveTwoTheta(const NeXus::NXEntry &, const API::MatrixWorkspace_sptr &);
50 std::vector<double> prepareAxes(const NeXus::NXEntry &);
51
53 API::MatrixWorkspace_sptr transposeMonochromatic(const API::MatrixWorkspace_sptr &);
54
55 size_t m_numberOfChannels; // number of channels data
56 size_t m_acquisitionMode; // acquisition mode of measurement, 0 -
57 // monochromatic, 1 - TOF
58
59 std::string m_instName;
60 std::string m_fileName;
61
62 double m_wavelength; // wavelength value is read from the YIG IPF
63
64 std::vector<API::MatrixWorkspace_sptr> m_outputWorkspaceGroup;
65};
66
67} // namespace DataHandling
68} // namespace Mantid
Defines an interface to an algorithm that loads a file so that it can take part in the automatic sele...
Definition: IFileLoader.h:19
LoadILLPolarizedDiffraction : Loads ILL polarized diffraction nexus files from instrument D7.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
std::string m_instName
instrument name to load the IDF
std::vector< API::MatrixWorkspace_sptr > m_outputWorkspaceGroup
vector with output workspaces
Defines a wrapper around a file whose internal structure can be accessed using the NeXus API.
Implements NXentry Nexus class.
Definition: NexusClasses.h:898
std::shared_ptr< WorkspaceGroup > WorkspaceGroup_sptr
shared pointer to Mantid::API::WorkspaceGroup
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Helper class which provides the Collimation Length for SANS instruments.