Commit 8bd2716d authored by Mathieu Tillet's avatar Mathieu Tillet
Browse files

Clarify function names

parent 7b99617e
......@@ -65,11 +65,9 @@ private:
void initWorkSpaceD16(NeXus::NXEntry &, const std::string &);
void createEmptyWorkspace(const size_t, const size_t);
size_t loadDataIntoWorkspaceFromMonitors(NeXus::NXEntry &firstEntry,
size_t firstIndex = 0);
size_t loadDataIntoWorkspaceFromVerticalTubes(NeXus::NXInt &,
const std::vector<double> &,
size_t);
size_t loadDataFromMonitors(NeXus::NXEntry &firstEntry,
size_t firstIndex = 0);
size_t loadDataFromTubes(NeXus::NXInt &, const std::vector<double> &, size_t);
void runLoadInstrument();
void moveDetectorsD33(const DetectorPosition &);
void moveDetectorDistance(double, const std::string &);
......
......@@ -291,8 +291,8 @@ void LoadILLSANS::initWorkSpace(NeXus::NXEntry &firstEntry,
loadMetaData(firstEntry, instrumentPath);
size_t nextIndex;
nextIndex = loadDataIntoWorkspaceFromVerticalTubes(data, m_defaultBinning, 0);
nextIndex = loadDataIntoWorkspaceFromMonitors(firstEntry, nextIndex);
nextIndex = loadDataFromTubes(data, m_defaultBinning, 0);
nextIndex = loadDataFromMonitors(firstEntry, nextIndex);
if (data.dim1() == 128) {
m_resMode = "low";
}
......@@ -327,13 +327,10 @@ void LoadILLSANS::initWorkSpaceD11B(NeXus::NXEntry &firstEntry,
loadMetaData(firstEntry, instrumentPath);
size_t nextIndex;
nextIndex =
loadDataIntoWorkspaceFromVerticalTubes(dataCenter, m_defaultBinning, 0);
nextIndex = loadDataIntoWorkspaceFromVerticalTubes(dataLeft, m_defaultBinning,
nextIndex);
nextIndex = loadDataIntoWorkspaceFromVerticalTubes(
dataRight, m_defaultBinning, nextIndex);
nextIndex = loadDataIntoWorkspaceFromMonitors(firstEntry, nextIndex);
nextIndex = loadDataFromTubes(dataCenter, m_defaultBinning, 0);
nextIndex = loadDataFromTubes(dataLeft, m_defaultBinning, nextIndex);
nextIndex = loadDataFromTubes(dataRight, m_defaultBinning, nextIndex);
nextIndex = loadDataFromMonitors(firstEntry, nextIndex);
}
/**
......@@ -361,11 +358,9 @@ void LoadILLSANS::initWorkSpaceD22B(NeXus::NXEntry &firstEntry,
loadMetaData(firstEntry, instrumentPath);
size_t nextIndex;
nextIndex =
loadDataIntoWorkspaceFromVerticalTubes(dataCenter, m_defaultBinning, 0);
nextIndex = loadDataIntoWorkspaceFromVerticalTubes(dataSide, m_defaultBinning,
nextIndex);
nextIndex = loadDataIntoWorkspaceFromMonitors(firstEntry, nextIndex);
nextIndex = loadDataFromTubes(dataCenter, m_defaultBinning, 0);
nextIndex = loadDataFromTubes(dataSide, m_defaultBinning, nextIndex);
nextIndex = loadDataFromMonitors(firstEntry, nextIndex);
}
/**
......@@ -490,22 +485,16 @@ void LoadILLSANS::initWorkSpaceD33(NeXus::NXEntry &firstEntry,
g_log.debug("Loading the data into the workspace...");
size_t nextIndex =
loadDataIntoWorkspaceFromVerticalTubes(dataRear, binningRear, 0);
nextIndex = loadDataIntoWorkspaceFromVerticalTubes(dataRight, binningRight,
nextIndex);
nextIndex =
loadDataIntoWorkspaceFromVerticalTubes(dataLeft, binningLeft, nextIndex);
nextIndex =
loadDataIntoWorkspaceFromVerticalTubes(dataDown, binningDown, nextIndex);
nextIndex =
loadDataIntoWorkspaceFromVerticalTubes(dataUp, binningUp, nextIndex);
nextIndex = loadDataIntoWorkspaceFromMonitors(firstEntry, nextIndex);
size_t nextIndex = loadDataFromTubes(dataRear, binningRear, 0);
nextIndex = loadDataFromTubes(dataRight, binningRight, nextIndex);
nextIndex = loadDataFromTubes(dataLeft, binningLeft, nextIndex);
nextIndex = loadDataFromTubes(dataDown, binningDown, nextIndex);
nextIndex = loadDataFromTubes(dataUp, binningUp, nextIndex);
nextIndex = loadDataFromMonitors(firstEntry, nextIndex);
}
size_t
LoadILLSANS::loadDataIntoWorkspaceFromMonitors(NeXus::NXEntry &firstEntry,
size_t firstIndex) {
size_t LoadILLSANS::loadDataFromMonitors(NeXus::NXEntry &firstEntry,
size_t firstIndex) {
// let's find the monitors; should be monitor1 and monitor2
for (std::vector<NXClassInfo>::const_iterator it =
......@@ -545,9 +534,9 @@ LoadILLSANS::loadDataIntoWorkspaceFromMonitors(NeXus::NXEntry &firstEntry,
return firstIndex;
}
size_t LoadILLSANS::loadDataIntoWorkspaceFromVerticalTubes(
NeXus::NXInt &data, const std::vector<double> &timeBinning,
size_t firstIndex = 0) {
size_t LoadILLSANS::loadDataFromTubes(NeXus::NXInt &data,
const std::vector<double> &timeBinning,
size_t firstIndex = 0) {
// Workaround to get the number of tubes / pixels
int numberOfTubes;
......
......@@ -13,7 +13,7 @@ This loads the nexus files produced by the SANS instruments D11, D22, D33 at the
For D33, it supports both monochromatic and TOF modes.
This loader reads the detector positions from the nexus file and places the detectors accordingly.
For D11 and D22 it supports the nominal and low resolution modes (pixel splitting).
It also supports the newer version fo these instruments.
It also supports the newer version for these instruments.
The output is a histogram workspace with unit of wavelength (Angstrom).
It has a single bin for monochromatic, and many bins (ragged) for TOF mode for D33.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment