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
bdeb6f3e
Commit
bdeb6f3e
authored
9 years ago
by
Anton Piccardo-Selg
Browse files
Options
Downloads
Patches
Plain Diff
Refs #13872 Fix non-orthogonal with hkl
parent
15bd657e
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
Vates/VatesAPI/test/LoadVTKTest.h
+23
-7
23 additions, 7 deletions
Vates/VatesAPI/test/LoadVTKTest.h
Vates/VatesAPI/test/vtkDataSetToNonOrthogonalDataSetTest.h
+13
-8
13 additions, 8 deletions
Vates/VatesAPI/test/vtkDataSetToNonOrthogonalDataSetTest.h
with
36 additions
and
15 deletions
Vates/VatesAPI/test/LoadVTKTest.h
+
23
−
7
View file @
bdeb6f3e
...
...
@@ -5,6 +5,7 @@
#include
"MantidVatesAPI/LoadVTK.h"
#include
"MantidAPI/IMDHistoWorkspace.h"
#include
"MantidGeometry/MDGeometry/IMDDimension.h"
#include
"MantidGeometry/MDGeometry/UnknownFrame.h"
#include
"MantidAPI/AlgorithmManager.h"
using
namespace
Mantid
::
API
;
...
...
@@ -129,14 +130,29 @@ public:
outWSName
);
TS_ASSERT_EQUALS
(
3
,
outWS
->
getNumDims
());
do_check_dimension
(
outWS
->
getDimension
(
0
),
"X"
,
0
,
67
,
68
);
// These numbers are expected min, max, and nbins known from the input file for dim x.
do_check_dimension
(
outWS
->
getDimension
(
1
),
"Y"
,
0
,
67
,
68
);
// These numbers are expected min, max, and nbins known from the input file for dim y.
do_check_dimension
(
outWS
->
getDimension
(
2
),
"Z"
,
0
,
67
,
68
);
// These numbers are expected min, max, and nbins known from the input file for dim z.
do_check_dimension
(
outWS
->
getDimension
(
0
),
"X"
,
0
,
67
,
68
);
// These numbers are expected min, max, and nbins
// known from the input file for dim x.
do_check_dimension
(
outWS
->
getDimension
(
1
),
"Y"
,
0
,
67
,
68
);
// These numbers are expected min, max, and nbins
// known from the input file for dim y.
do_check_dimension
(
outWS
->
getDimension
(
2
),
"Z"
,
0
,
67
,
68
);
// These numbers are expected min, max, and nbins
// known from the input file for dim z.
TSM_ASSERT_THROWS_NOTHING
(
"Should be an UnknownFrame"
,
dynamic_cast
<
const
Mantid
::
Geometry
::
UnknownFrame
&>
(
outWS
->
getDimension
(
0
)
->
getMDFrame
()))
TSM_ASSERT_THROWS_NOTHING
(
"Should be an UnknownFrame"
,
dynamic_cast
<
const
Mantid
::
Geometry
::
UnknownFrame
&>
(
outWS
->
getDimension
(
1
)
->
getMDFrame
()))
TSM_ASSERT_THROWS_NOTHING
(
"Should be an UnknownFrame"
,
dynamic_cast
<
const
Mantid
::
Geometry
::
UnknownFrame
&>
(
outWS
->
getDimension
(
2
)
->
getMDFrame
()))
TSM_ASSERT_THROWS_NOTHING
(
"Should be an UnknownFrame"
,
dynamic_cast
<
const
Mantid
::
Geometry
::
UnknownFrame
&>
(
outWS
->
getDimension
(
0
)))
TSM_ASSERT_THROWS_NOTHING
(
"Should be an UnknownFrame"
,
dynamic_cast
<
const
Mantid
::
Geometry
::
UnknownFrame
&>
(
outWS
->
getDimension
(
1
)))
TSM_ASSERT_THROWS_NOTHING
(
"Should be an UnknownFrame"
,
dynamic_cast
<
const
Mantid
::
Geometry
::
UnknownFrame
&>
(
outWS
->
getDimension
(
2
)))
double
topPercent
=
loadVTK
.
getProperty
(
"KeepTopPercent"
);
TSM_ASSERT_EQUALS
(
"Should default to 25%"
,
25
,
topPercent
);
...
...
This diff is collapsed.
Click to expand it.
Vates/VatesAPI/test/vtkDataSetToNonOrthogonalDataSetTest.h
+
13
−
8
View file @
bdeb6f3e
...
...
@@ -10,6 +10,9 @@
#include
"MantidKernel/PropertyWithValue.h"
#include
"MantidDataObjects/CoordTransformAffine.h"
#include
"MantidTestHelpers/MDEventsTestHelper.h"
#include
"MantidGeometry/MDGeometry/QSample.h"
#include
"MantidGeometry/MDGeometry/HKL.h"
#include
"MantidKernel/MDUnit.h"
#include
<vtkDataArray.h>
#include
<vtkFieldData.h>
...
...
@@ -38,15 +41,17 @@ private:
// Creating an MDEventWorkspace as the content is not germain to the
// information necessary for the non-orthogonal axes
std
::
string
wsName
=
"simpleWS"
;
IMDEventWorkspace_sptr
ws
=
makeAnyMDEW
<
MDEvent
<
4
>
,
4
>
(
1
,
0.0
,
1.0
,
1
,
wsName
)
;
IMDEventWorkspace_sptr
ws
;
// Set the coordinate system
if
(
!
wrongCoords
)
{
ws
->
setCoordinateSystem
(
Mantid
::
Kernel
::
HKL
);
}
else
{
ws
->
setCoordinateSystem
(
QSample
);
if
(
wrongCoords
)
{
Mantid
::
Geometry
::
QSample
frame
;
ws
=
MDEventsTestHelper
::
makeAnyMDEWWithFrames
<
MDEvent
<
4
>
,
4
>
(
1
,
0.0
,
1.0
,
frame
,
1
,
wsName
);
}
else
{
Mantid
::
Geometry
::
HKL
frame
(
new
Mantid
::
Kernel
::
ReciprocalLatticeUnit
);
ws
=
MDEventsTestHelper
::
makeAnyMDEWWithFrames
<
MDEvent
<
4
>
,
4
>
(
1
,
0.0
,
1.0
,
frame
,
1
,
wsName
);
}
// Set the UB matrix
...
...
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