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
ea58ef61
Commit
ea58ef61
authored
8 years ago
by
Roman Tolchenov
Browse files
Options
Downloads
Patches
Plain Diff
Re #18688. Returned validity checks.
parent
d8164f37
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
MantidQt/MantidWidgets/src/InstrumentView/RotationSurface.cpp
+6
-0
6 additions, 0 deletions
...idQt/MantidWidgets/src/InstrumentView/RotationSurface.cpp
MantidQt/MantidWidgets/src/InstrumentView/UnwrappedSurface.cpp
+2
-0
2 additions, 0 deletions
...dQt/MantidWidgets/src/InstrumentView/UnwrappedSurface.cpp
with
8 additions
and
0 deletions
MantidQt/MantidWidgets/src/InstrumentView/RotationSurface.cpp
+
6
−
0
View file @
ea58ef61
...
@@ -192,6 +192,8 @@ void RotationSurface::findUVBounds() {
...
@@ -192,6 +192,8 @@ void RotationSurface::findUVBounds() {
m_v_max
=
-
DBL_MAX
;
m_v_max
=
-
DBL_MAX
;
for
(
size_t
i
=
0
;
i
<
m_unwrappedDetectors
.
size
();
++
i
)
{
for
(
size_t
i
=
0
;
i
<
m_unwrappedDetectors
.
size
();
++
i
)
{
const
UnwrappedDetector
&
udet
=
m_unwrappedDetectors
[
i
];
const
UnwrappedDetector
&
udet
=
m_unwrappedDetectors
[
i
];
if
(
!
udet
.
isValid
())
continue
;
if
(
udet
.
u
<
m_u_min
)
if
(
udet
.
u
<
m_u_min
)
m_u_min
=
udet
.
u
;
m_u_min
=
udet
.
u
;
if
(
udet
.
u
>
m_u_max
)
if
(
udet
.
u
>
m_u_max
)
...
@@ -223,6 +225,8 @@ void RotationSurface::findAndCorrectUGap() {
...
@@ -223,6 +225,8 @@ void RotationSurface::findAndCorrectUGap() {
std
::
vector
<
UnwrappedDetector
>::
const_iterator
ud
=
std
::
vector
<
UnwrappedDetector
>::
const_iterator
ud
=
m_unwrappedDetectors
.
begin
();
m_unwrappedDetectors
.
begin
();
for
(;
ud
!=
m_unwrappedDetectors
.
end
();
++
ud
)
{
for
(;
ud
!=
m_unwrappedDetectors
.
end
();
++
ud
)
{
if
(
!
ud
->
isValid
())
continue
;
double
u
=
ud
->
u
;
double
u
=
ud
->
u
;
int
i
=
int
((
u
-
m_u_min
)
/
bin_width
);
int
i
=
int
((
u
-
m_u_min
)
/
bin_width
);
ubins
[
i
]
=
true
;
ubins
[
i
]
=
true
;
...
@@ -259,6 +263,8 @@ void RotationSurface::findAndCorrectUGap() {
...
@@ -259,6 +263,8 @@ void RotationSurface::findAndCorrectUGap() {
std
::
vector
<
UnwrappedDetector
>::
iterator
ud
=
m_unwrappedDetectors
.
begin
();
std
::
vector
<
UnwrappedDetector
>::
iterator
ud
=
m_unwrappedDetectors
.
begin
();
for
(;
ud
!=
m_unwrappedDetectors
.
end
();
++
ud
)
{
for
(;
ud
!=
m_unwrappedDetectors
.
end
();
++
ud
)
{
if
(
!
ud
->
isValid
())
continue
;
double
&
u
=
ud
->
u
;
double
&
u
=
ud
->
u
;
u
=
applyUCorrection
(
u
);
u
=
applyUCorrection
(
u
);
}
}
...
...
This diff is collapsed.
Click to expand it.
MantidQt/MantidWidgets/src/InstrumentView/UnwrappedSurface.cpp
+
2
−
0
View file @
ea58ef61
...
@@ -129,6 +129,8 @@ void UnwrappedSurface::cacheAllAssemblies() {
...
@@ -129,6 +129,8 @@ void UnwrappedSurface::cacheAllAssemblies() {
for
(
size_t
i
=
0
;
i
<
m_unwrappedDetectors
.
size
();
++
i
)
{
for
(
size_t
i
=
0
;
i
<
m_unwrappedDetectors
.
size
();
++
i
)
{
const
UnwrappedDetector
&
udet
=
m_unwrappedDetectors
[
i
];
const
UnwrappedDetector
&
udet
=
m_unwrappedDetectors
[
i
];
if
(
!
udet
.
isValid
())
continue
;
// Get the BARE parent (not parametrized) to speed things up.
// Get the BARE parent (not parametrized) to speed things up.
auto
&
detector
=
m_instrActor
->
getDetectorByDetID
(
udet
.
detID
);
auto
&
detector
=
m_instrActor
->
getDetectorByDetID
(
udet
.
detID
);
const
Mantid
::
Geometry
::
IComponent
*
bareDet
=
detector
.
getComponentID
();
const
Mantid
::
Geometry
::
IComponent
*
bareDet
=
detector
.
getComponentID
();
...
...
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