Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
4dd249f2
Commit
4dd249f2
authored
14 years ago
by
Doucet, Mathieu
Browse files
Options
Downloads
Patches
Plain Diff
Added fourth column. Re #2648
parent
5ff35972
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/Mantid/Framework/DataHandling/src/SaveNISTDAT.cpp
+4
-2
4 additions, 2 deletions
Code/Mantid/Framework/DataHandling/src/SaveNISTDAT.cpp
Code/Mantid/Framework/DataHandling/test/SaveNISTDATTest.h
+2
-2
2 additions, 2 deletions
Code/Mantid/Framework/DataHandling/test/SaveNISTDATTest.h
with
6 additions
and
4 deletions
Code/Mantid/Framework/DataHandling/src/SaveNISTDAT.cpp
+
4
−
2
View file @
4dd249f2
...
...
@@ -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
"
;
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Code/Mantid/Framework/DataHandling/test/SaveNISTDATTest.h
+
2
−
2
View file @
4dd249f2
...
...
@@ -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
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment