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
3a32cf1f
Commit
3a32cf1f
authored
10 years ago
by
Peter Parker
Browse files
Options
Downloads
Patches
Plain Diff
Refs #9245 - Output correct unit string in CanSAS format.
Also, the CanSAS format expects "A" rather than "Angstrom".
parent
48f29b06
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/SaveCanSAS1D2.cpp
+2
-2
2 additions, 2 deletions
Code/Mantid/Framework/DataHandling/src/SaveCanSAS1D2.cpp
Code/Mantid/Framework/DataHandling/test/SaveCanSAS1dTest2.h
+1
-1
1 addition, 1 deletion
Code/Mantid/Framework/DataHandling/test/SaveCanSAS1dTest2.h
with
3 additions
and
3 deletions
Code/Mantid/Framework/DataHandling/src/SaveCanSAS1D2.cpp
+
2
−
2
View file @
3a32cf1f
...
...
@@ -221,10 +221,10 @@ void SaveCanSAS1D2::createSASTransElement(std::string& sasTrans, const std::stri
<<
name
<<
"
\"
>"
;
std
::
string
t_unit
=
m_ws
->
YUnitLabel
();
std
::
string
lambda_unit
=
m_ws
->
getAxis
(
0
)
->
unit
()
->
caption
();
std
::
string
lambda_unit
=
m_ws
->
getAxis
(
0
)
->
unit
()
->
label
();
if
(
t_unit
.
empty
())
t_unit
=
"none"
;
if
(
lambda_unit
.
empty
())
if
(
lambda_unit
.
empty
()
||
lambda_unit
==
"Angstrom"
)
lambda_unit
=
"A"
;
const
MantidVec
&
xdata
=
m_ws
->
readX
(
0
);
...
...
This diff is collapsed.
Click to expand it.
Code/Mantid/Framework/DataHandling/test/SaveCanSAS1dTest2.h
+
1
−
1
View file @
3a32cf1f
...
...
@@ -178,7 +178,7 @@ public:
std
::
getline
(
testFile
,
fileLine
);
// transmission spectrum start
TS_ASSERT_EQUALS
(
fileLine
,
"
\t\t
<SAStransmission_spectrum name=
\"
sample
\"
>"
);
idataline
=
"
\t\t\t
<Tdata><Lambda unit=
\"
Wavelength
\"
>3543.75</Lambda><T unit=
\"
Counts
\"
>111430</T><Tdev unit=
\"
none
\"
>333.811</Tdev></Tdata>"
;
idataline
=
"
\t\t\t
<Tdata><Lambda unit=
\"
A
\"
>3543.75</Lambda><T unit=
\"
Counts
\"
>111430</T><Tdev unit=
\"
none
\"
>333.811</Tdev></Tdata>"
;
std
::
getline
(
testFile
,
fileLine
);
// transmission spectrum data
TS_ASSERT_EQUALS
(
fileLine
,
idataline
);
...
...
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