Skip to content
Snippets Groups Projects
Commit 7ff4ff70 authored by Ricardo Leal's avatar Ricardo Leal
Browse files

Re #6287 Removed monitor info. New EPP and Bining.

parent ff741905
No related branches found
No related tags found
No related merge requests found
......@@ -43,8 +43,12 @@ class DLLExport LoadILL: public API::IDataFileChecker {
public:
/// Constructor
LoadILL() :
API::IDataFileChecker(), m_instrumentName(""), m_nexusInstrumentEntryName(
"") {
API::IDataFileChecker(),
m_instrumentName(""),
//m_nexusInstrumentEntryName(""),
m_wavelength(0),
m_channelWidth(0),
supportedInstruments({"IN5"}){
}
/// Virtual destructor
virtual ~LoadILL() {
......@@ -59,7 +63,7 @@ public:
}
/// Algorithm's category for identification
virtual const std::string category() const {
return "DataHandling;Inelastic";
return "DataHandling";
}
///checks the file can be loaded by reading 1st 100 bytes and looking at the file extension.
bool quickFileCheck(const std::string& filePath, size_t nread,
......@@ -74,22 +78,18 @@ private:
// Execution code
void exec();
/// L
//NeXus::NXEntry initNexusFile();
void setInstrumentName(NeXus::NXEntry& entry);
std::string getInstrumentName(NeXus::NXEntry& entry);
void initWorkSpace(NeXus::NXEntry& entry);
std::vector<int> getMonitorData(NeXus::NXEntry& entry);
template<class T> std::vector<int> peakSearchPosition(
const std::vector<T> &v, int);
template<typename T> std::vector<T> mode(std::vector<T> &data);
void initInstrumentSpecific();
void loadRunDetails(NeXus::NXEntry & entry);
void loadExperimentDetails(NeXus::NXEntry & entry);
int getMonitorElasticPeakPosition(const std::vector<int> &monitorData);
int getDetectorElasticPeakPosition(const NeXus::NXInt &data);
void loadTimeDetails(NeXus::NXEntry& entry);
NeXus::NXData loadNexusFileData(NeXus::NXEntry& entry);
void loadDataIntoTheWorkSpace(NeXus::NXEntry& entry);
double calculateTOF(double);
void runLoadInstrument();
std::string getDateTimeInIsoFormat(std::string dateToParse);
......@@ -110,9 +110,11 @@ private:
int m_monitorElasticPeakPosition;
double m_wavelength;
double m_channelWidth;
double m_timeOfFlightDelay;
double m_timePickupToOpening;
//std::string m_title;
double m_l1; //=2.0;
double m_l2; //=4.0;
std::vector<std::string> supportedInstruments;
// Nexus instrument entry is of the format /entry0/<XXX>/
// XXX changes from version to version
......
This diff is collapsed.
......@@ -8,29 +8,26 @@
using namespace Mantid::API;
using Mantid::DataHandling::LoadILL;
class LoadILLTest: public CxxTest::TestSuite
{
class LoadILLTest: public CxxTest::TestSuite {
public:
LoadILLTest() : testFile("ILLIN5_094460.nxs")
{
LoadILLTest() :
m_testFile("ILLIN5_094460.nxs")
{
}
void testName()
{
LoadILL loader;
void testName() {
LoadILL loader;
TS_ASSERT_EQUALS( loader.name(), "LoadILL");
}
void testVersion()
{
LoadILL loader;
void testVersion() {
LoadILL loader;
TS_ASSERT_EQUALS( loader.version(), 1);
}
void testInit()
{
LoadILL loader;
void testInit() {
LoadILL loader;
TS_ASSERT_THROWS_NOTHING( loader.initialize());
TS_ASSERT( loader.isInitialized());
}
......@@ -39,11 +36,10 @@ public:
// std::cerr << loader.fileCheck(testFile);
// }
void testExec()
{
LoadILL loader;
loader.initialize();
loader.setPropertyValue("Filename", testFile);
void testExec() {
LoadILL loader;
loader.initialize();
loader.setPropertyValue("Filename", m_testFile);
std::string outputSpace = "LoadILLTest_out";
loader.setPropertyValue("OutputWorkspace", outputSpace);
......@@ -57,25 +53,23 @@ public:
MatrixWorkspace_sptr output2D = boost::dynamic_pointer_cast<
MatrixWorkspace>(output);
TS_ASSERT_EQUALS( output2D->getNumberHistograms(), 98304+1);
TS_ASSERT_EQUALS( output2D->getNumberHistograms(), 98304);
AnalysisDataService::Instance().clear();
}
private:
std::string testFile;
std::string m_testFile;
};
//------------------------------------------------------------------------------
// Performance test
//------------------------------------------------------------------------------
class LoadILLTestPerformance: public CxxTest::TestSuite
{
class LoadILLTestPerformance: public CxxTest::TestSuite {
public:
void testDefaultLoad()
{
void testDefaultLoad() {
Mantid::DataHandling::LoadILL loader;
loader.initialize();
loader.setPropertyValue("Filename", "ILLIN5_094460.nxs");
......
This diff is collapsed.
......@@ -6,6 +6,15 @@
<parameter name="deltaE-mode" type="string">
<value val="direct" />
</parameter>
<!--
Distance between sample and equatorial line
of the detector. Mandatory if you want to correct
the flight paths.
-->
<parameter name="l2" type="string">
<value val="4.0" />
</parameter>
</component-link>
......
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