Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
4f1feba6
Commit
4f1feba6
authored
May 18, 2017
by
Simon Heybrock
Committed by
GitHub
May 18, 2017
Browse files
Merge pull request #19531 from mantidproject/FasterGetPhi
Simplify function Detector::getPhi()
parents
0cf05e40
bbb8ad5a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Framework/Geometry/src/Instrument/Detector.cpp
View file @
4f1feba6
...
...
@@ -92,13 +92,16 @@ double Detector::getSignedTwoTheta(const V3D &observer, const V3D &axis,
return
angle
;
}
/// Get the phi angle between the detector with reference to the origin
///@return The angle
/** Get the phi angle between the detector with reference to the origin
* This function will not be supported in Instrument-2.0 due to its ambiguity.
* DO NOT USE IN NEW CODE
* @return The angle
*/
double
Detector
::
getPhi
()
const
{
double
phi
=
0.0
,
dummy
;
this
->
getPos
().
getSpherical
(
dummy
,
dummy
,
phi
);
return
phi
*
M_PI
/
180.0
;
const
Kernel
::
V3D
pos
=
this
->
getPos
();
return
std
::
atan2
(
pos
[
1
],
pos
[
0
]);
}
/**
* Calculate the phi angle between detector and beam, and then offset.
* @param offset in radians
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment