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
66176355
Commit
66176355
authored
17 years ago
by
Freddie Akeroyd
Browse files
Options
Downloads
Patches
Plain Diff
Add in test for time channels. Refs #85.
parent
ae2da160
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/DataHandling/src/LoadRaw.cpp
+1
-0
1 addition, 0 deletions
Code/Mantid/DataHandling/src/LoadRaw.cpp
Code/Mantid/DataHandling/test/LoadRawTest.h
+2
-0
2 additions, 0 deletions
Code/Mantid/DataHandling/test/LoadRawTest.h
with
3 additions
and
0 deletions
Code/Mantid/DataHandling/src/LoadRaw.cpp
+
1
−
0
View file @
66176355
...
@@ -93,6 +93,7 @@ namespace DataHandling
...
@@ -93,6 +93,7 @@ namespace DataHandling
std
::
transform
(
v
.
begin
(),
v
.
end
(),
e
.
begin
(),
dblSqrt
);
std
::
transform
(
v
.
begin
(),
v
.
end
(),
e
.
begin
(),
dblSqrt
);
// Populate the workspace. Loop starts from 1, hence i-1
// Populate the workspace. Loop starts from 1, hence i-1
m_localWorkspace
->
setData
(
i
-
1
,
v
,
e
);
m_localWorkspace
->
setData
(
i
-
1
,
v
,
e
);
m_localWorkspace
->
setX
(
i
-
1
,
timeChannelsVec
);
// NOTE: Raw numbers go straight into the workspace
// NOTE: Raw numbers go straight into the workspace
// - no account taken of bin widths/units etc.
// - no account taken of bin widths/units etc.
}
}
...
...
This diff is collapsed.
Click to expand it.
Code/Mantid/DataHandling/test/LoadRawTest.h
+
2
−
0
View file @
66176355
...
@@ -69,6 +69,8 @@ public:
...
@@ -69,6 +69,8 @@ public:
TS_ASSERT_EQUALS
(
output2D
->
dataY
(
999
)[
777
],
9
);
TS_ASSERT_EQUALS
(
output2D
->
dataY
(
999
)[
777
],
9
);
// Check that the error on that value is correct
// Check that the error on that value is correct
TS_ASSERT_EQUALS
(
output2D
->
dataE
(
999
)[
777
],
3
);
TS_ASSERT_EQUALS
(
output2D
->
dataE
(
999
)[
777
],
3
);
// Check that the error on that value is correct
TS_ASSERT_EQUALS
(
output2D
->
dataX
(
999
)[
777
],
554.1875
);
//----------------------------------------------------------------------
//----------------------------------------------------------------------
// Tests taken from LoadInstrumentTest to check sub-algorithm is running properly
// Tests taken from LoadInstrumentTest to check sub-algorithm is running properly
...
...
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