summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcom-sixs <com-sixs@synchrotron-soleil.fr>2017-05-19 13:46:35 +0200
committercom-sixs <com-sixs@synchrotron-soleil.fr>2017-10-11 17:34:41 +0200
commitfac7088030967a07a90e85f889d93b464f460062 (patch)
treefdba112027b80ebc3fa676a476b63d6137311682
parent64d1593e1a113d7261b32342eb6b424037965cb2 (diff)
add the stereo projection
-rw-r--r--binoculars/backends/sixs.py18
1 files changed, 15 insertions, 3 deletions
diff --git a/binoculars/backends/sixs.py b/binoculars/backends/sixs.py
index c7eeec0..38b495f 100644
--- a/binoculars/backends/sixs.py
+++ b/binoculars/backends/sixs.py
@@ -114,9 +114,9 @@ class QxQyQzProjection(backend.ProjectionBase):
[0 , 0 , 2* math.pi],
[0 , -2 * math.pi, 0]])
- UB = numpy.array([[2* math.pi, 0 , 0],
- [0 , 2 * math.pi , 0],
- [0 , 0, 2 * math.pi]])
+ # UB = numpy.array([[2* math.pi, 0 , 0],
+ # [0 , 2 * math.pi , 0],
+ # [0 , 0, 2 * math.pi]])
# the ki vector should be in the NexusFile or easily extracted
# from the hkl library.
ki = [1, 0, 0]
@@ -143,6 +143,18 @@ class QparQperProjection(QxQyQzProjection):
return 'Qpar', 'Qper'
+class Stereo(QxQyQzProjection):
+ def project(self, index, pdataframe):
+ qx, qy, qz = super(Stereo, self).project(index, pdataframe)
+ q = numpy.sqrt(qx*qx+qy*qy+qz*qz)
+ #ratio = qz + q
+ #x = qx / ratio
+ #y = qy / ratio
+ return q, qx, qy
+
+ def get_axis_labels(self):
+ return "Q", "Qx", "Qy"
+
###################
# Common methodes #
###################