Skip to content
Snippets Groups Projects
Commit 4dd249f2 authored by Doucet, Mathieu's avatar Doucet, Mathieu
Browse files

Added fourth column. Re #2648

parent 5ff35972
No related branches found
No related tags found
No related merge requests found
......@@ -48,7 +48,7 @@ void SaveNISTDAT::exec()
g_log.error("Failed to open file:" + filename);
throw Exception::FileError("Failed to open file:" , filename);
}
out_File << "Qx - Qy - I(Qx,Qy)\r\n";
out_File << "Qx - Qy - I(Qx,Qy) - dI(Qx,Qy)\r\n";
out_File << "ASCII data\r\n";
// Set up the progress reporting object
......@@ -63,6 +63,7 @@ void SaveNISTDAT::exec()
const double qy = (axis(i)+axis(i+1))/2.0;
const MantidVec& XIn = inputWS->readX(i);
const MantidVec& YIn = inputWS->readY(i);
const MantidVec& EIn = inputWS->readE(i);
for ( unsigned int j = 0; j < XIn.size()-1; j++)
{
......@@ -71,7 +72,8 @@ void SaveNISTDAT::exec()
{
out_File << (XIn[j]+XIn[j+1])/2.0;
out_File << " " << qy;
out_File << " " << YIn[j] << "\r\n";
out_File << " " << YIn[j];
out_File << " " << EIn[j] << "\r\n";
}
}
}
......
......@@ -37,11 +37,11 @@ public:
std::string fileLine;
std::getline( testFile, fileLine );
TS_ASSERT_EQUALS ( fileLine, "Qx - Qy - I(Qx,Qy)\r" );
TS_ASSERT_EQUALS ( fileLine, "Qx - Qy - I(Qx,Qy) - dI(Qx,Qy)\r" );
std::getline( testFile, fileLine );
TS_ASSERT_EQUALS ( fileLine, "ASCII data\r" );
std::getline( testFile, fileLine );
TS_ASSERT_EQUALS ( fileLine, "-0.0105 -0.0735 6.13876e+08\r" );
TS_ASSERT_EQUALS ( fileLine, "-0.0105 -0.0735 6.13876e+08 6.1697e+07\r" );
// remove file created by this algorithm
Poco::File(outputFile).remove();
......
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