cctw  0.2.1
cctwcrystalcoordinateparameters.h
Go to the documentation of this file.
1 #ifndef CCTWCRYSTALCOORDINATEPARAMETERS_H
2 #define CCTWCRYSTALCOORDINATEPARAMETERS_H
3 
4 #include "qcepproperty.h"
5 #include "cctwobject.h"
6 #include "cctwvector3d.h"
7 #include "cctwmatrix3x3.h"
8 #include "cctwunitcell.h"
9 
11 {
12  Q_OBJECT
13 public:
14  CctwCrystalCoordinateParameters(QString name, QObject *parent);
15 
16 signals:
17  void parametersChanged();
18 
19 public slots:
20  void setDefaults();
21 
22 public:
23  double pixelSize() const;
24  double wavelength() const;
25  double distance() const;
26 
27  CctwUnitCell unitCell() const;
28  CctwDoubleMatrix3x3 ubMat() const;
29  CctwDoubleMatrix3x3 oMat() const;
30  CctwDoubleVector3D oVec() const;
31 
32  double det0x() const;
33  double det0y() const;
34 
35  CctwDoubleVector3D xTrans() const;
36 
37  double orientErrorDetPitch() const;
38  double orientErrorDetRoll() const;
39  double orientErrorDetYaw() const;
40  double orientErrorGonPitch() const;
41 
42  QString twoTheta() const;
43  double twoThetaCorrection() const;
44  double twoThetaNom() const;
45  double twoThetaStep() const;
46  QcepDoubleVector twoThetaAngles() const;
47 
48  QString omega() const;
49  double omegaCorrection() const;
50  double omegaNom() const;
51  double omegaStep() const;
52  QcepDoubleVector omegaAngles() const;
53 
54  QString chi() const;
55  double chiCorrection() const;
56  double chiNom() const;
57  double chiStep() const;
58  QcepDoubleVector chiAngles() const;
59 
60  QString phi() const;
61  double phiCorrection() const;
62  double phiNom() const;
63  double phiStep() const;
64  QcepDoubleVector phiAngles() const;
65 
70 
71 // int extraFlip() const;
72 
73  void setPixelSize(double sz);
74  void setWavelength(double wv);
75  void setDistance(double d);
76 
77  void setUnitCell(CctwUnitCell uc);
80  void setOVec(CctwDoubleVector3D ov);
81 
82  void setDet0x(double d0x);
83  void setDet0y(double d0y);
84 
86 
87  void setOrientErrorDetPitch(double x);
88  void setOrientErrorDetRoll(double x);
89  void setOrientErrorDetYaw(double x);
90  void setOrientErrorGonPitch(double x);
91 
92  void setTwoTheta(const QString tth);
93  void setOmega(const QString omg);
94  void setChi(const QString chi);
95  void setPhi(const QString phi);
96 
101 
102  double twoThetaAngle(double frame);
103  double omegaAngle(double frame);
104  double chiAngle(double frame);
105  double phiAngle(double frame);
106 
107 // void setExtraFlip(int extra);
108 
109 private:
110  void parseAngleArgument(const QString arg, const QString angleName, QcepDoubleProperty *corr, QcepDoubleProperty *start, QcepDoubleProperty *step, QcepDoubleVectorProperty *angs);
111 
112  double interpolateAngle(double frame, QcepDoubleProperty *corr, QcepDoubleProperty *start, QcepDoubleProperty *step, QcepDoubleVectorProperty *angs);
113 
114 private:
115  double m_PixelSize;
116  double m_Wavelength;
117  double m_Distance;
118 
123 
124  double m_Det0x;
125  double m_Det0y;
126 
128 
133 
138 
139 public:
140  Q_PROPERTY(double pixelSize READ pixelSize WRITE setPixelSize NOTIFY parametersChanged)
141  Q_PROPERTY(double wavelength READ wavelength WRITE setWavelength NOTIFY parametersChanged)
142  Q_PROPERTY(double distance READ distance WRITE setDistance NOTIFY parametersChanged)
143 
144  Q_PROPERTY(CctwUnitCell unitCell READ unitCell WRITE setUnitCell NOTIFY parametersChanged)
145  Q_PROPERTY(CctwDoubleMatrix3x3 ubMat READ ubMat WRITE setUBMat NOTIFY parametersChanged)
146  Q_PROPERTY(CctwDoubleMatrix3x3 oMat READ oMat WRITE setOMat NOTIFY parametersChanged)
147  Q_PROPERTY(CctwDoubleVector3D oVec READ oVec WRITE setOVec NOTIFY parametersChanged)
148 
149  Q_PROPERTY(double det0x READ det0x WRITE setDet0x NOTIFY parametersChanged)
150  Q_PROPERTY(double det0y READ det0y WRITE setDet0y NOTIFY parametersChanged)
151 
152  Q_PROPERTY(CctwDoubleVector3D xTrans READ xTrans WRITE setXTrans NOTIFY parametersChanged)
153 
154  Q_PROPERTY(double orientErrorDetPitch READ orientErrorDetPitch WRITE setOrientErrorDetPitch NOTIFY parametersChanged)
155  Q_PROPERTY(double orientErrorDetRoll READ orientErrorDetRoll WRITE setOrientErrorDetRoll NOTIFY parametersChanged)
156  Q_PROPERTY(double orientErrorDetYaw READ orientErrorDetYaw WRITE setOrientErrorDetYaw NOTIFY parametersChanged)
157  Q_PROPERTY(double orientErrorGonPitch READ orientErrorGonPitch WRITE setOrientErrorGonPitch NOTIFY parametersChanged)
158 
159  Q_PROPERTY(QString twoTheta READ get_TwoTheta WRITE setTwoTheta NOTIFY parametersChanged)
160  QCEP_STRING_PROPERTY(TwoTheta)
161 
162  Q_PROPERTY(double twoThetaCorrection READ get_TwoThetaCorrection WRITE set_TwoThetaCorrection NOTIFY parametersChanged)
163  QCEP_DOUBLE_PROPERTY(TwoThetaCorrection)
164 
165  Q_PROPERTY(double twoThetaNom READ get_TwoThetaNom WRITE set_TwoThetaNom NOTIFY parametersChanged)
166  QCEP_DOUBLE_PROPERTY(TwoThetaNom)
167 
168  Q_PROPERTY(double twoThetaStep READ get_TwoThetaStep WRITE set_TwoThetaStep NOTIFY parametersChanged)
169  QCEP_DOUBLE_PROPERTY(TwoThetaStep)
170 
171  Q_PROPERTY(QcepDoubleVector twoThetaAngles READ get_TwoThetaAngles WRITE set_TwoThetaAngles NOTIFY parametersChanged)
172  QCEP_DOUBLE_VECTOR_PROPERTY(TwoThetaAngles)
173 
174 
175  Q_PROPERTY(QString omega READ get_Omega WRITE setOmega NOTIFY parametersChanged)
176  QCEP_STRING_PROPERTY(Omega)
177 
178  Q_PROPERTY(double omegaCorrection READ get_OmegaCorrection WRITE set_OmegaCorrection NOTIFY parametersChanged)
179  QCEP_DOUBLE_PROPERTY(OmegaCorrection)
180 
181  Q_PROPERTY(double omegaNom READ get_OmegaNom WRITE set_OmegaNom NOTIFY parametersChanged)
182  QCEP_DOUBLE_PROPERTY(OmegaNom)
183 
184  Q_PROPERTY(double omegaStep READ get_OmegaStep WRITE set_OmegaStep NOTIFY parametersChanged)
185  QCEP_DOUBLE_PROPERTY(OmegaStep)
186 
187  Q_PROPERTY(QcepDoubleVector omegaAngles READ get_OmegaAngles WRITE set_OmegaAngles NOTIFY parametersChanged)
188  QCEP_DOUBLE_VECTOR_PROPERTY(OmegaAngles)
189 
190 
191  Q_PROPERTY(QString chi READ get_Chi WRITE setChi NOTIFY parametersChanged)
192  QCEP_STRING_PROPERTY(Chi)
193 
194  Q_PROPERTY(double chiCorrection READ get_ChiCorrection WRITE set_ChiCorrection NOTIFY parametersChanged)
195  QCEP_DOUBLE_PROPERTY(ChiCorrection)
196 
197  Q_PROPERTY(double chiNom READ get_ChiNom WRITE set_ChiNom NOTIFY parametersChanged)
198  QCEP_DOUBLE_PROPERTY(ChiNom)
199 
200  Q_PROPERTY(double chiStep READ get_ChiStep WRITE set_ChiStep NOTIFY parametersChanged)
201  QCEP_DOUBLE_PROPERTY(ChiStep)
202 
203  Q_PROPERTY(QcepDoubleVector chiAngles READ get_ChiAngles WRITE set_ChiAngles NOTIFY parametersChanged)
204  QCEP_DOUBLE_VECTOR_PROPERTY(ChiAngles)
205 
206 
207  Q_PROPERTY(QString phi READ get_Phi WRITE setPhi NOTIFY parametersChanged)
208  QCEP_STRING_PROPERTY(Phi)
209 
210  Q_PROPERTY(double phiCorrection READ get_PhiCorrection WRITE set_PhiCorrection NOTIFY parametersChanged)
211  QCEP_DOUBLE_PROPERTY(PhiCorrection)
212 
213  Q_PROPERTY(double phiNom READ get_PhiNom WRITE set_PhiNom NOTIFY parametersChanged)
214  QCEP_DOUBLE_PROPERTY(PhiNom)
215 
216  Q_PROPERTY(double phiStep READ get_PhiStep WRITE set_PhiStep NOTIFY parametersChanged)
217  QCEP_DOUBLE_PROPERTY(PhiStep)
218 
219  Q_PROPERTY(QcepDoubleVector phiAngles READ get_PhiAngles WRITE set_PhiAngles NOTIFY parametersChanged)
220  QCEP_DOUBLE_VECTOR_PROPERTY(PhiAngles)
221 
222  Q_PROPERTY(CctwDoubleVector3D gridOrigin READ gridOrigin WRITE setGridOrigin NOTIFY parametersChanged)
223  Q_PROPERTY(CctwDoubleMatrix3x3 gridBasis READ gridBasis WRITE setGridBasis NOTIFY parametersChanged)
224  Q_PROPERTY(CctwDoubleVector3D gridDim READ gridDim WRITE setGridDim NOTIFY parametersChanged)
225  Q_PROPERTY(CctwDoubleVector3D gridOffset READ gridOffset WRITE setGridOffset NOTIFY parametersChanged)
226 
227  Q_PROPERTY(bool extraFlip READ get_ExtraFlip WRITE set_ExtraFlip NOTIFY parametersChanged)
228  QCEP_BOOLEAN_PROPERTY(ExtraFlip)
229 };
230 
231 #endif // CCTWCRYSTALCOORDINATEPARAMETERS_H
QcepDoubleVector omegaAngles() const
CctwDoubleVector3D gridOrigin() const
QString name
Definition: cctwobject.h:32
QcepDoubleVector chiAngles() const
CctwDoubleVector3D gridDim() const
CctwDoubleMatrix3x3 oMat() const
double interpolateAngle(double frame, QcepDoubleProperty *corr, QcepDoubleProperty *start, QcepDoubleProperty *step, QcepDoubleVectorProperty *angs)
CctwDoubleVector3D oVec() const
CctwCrystalCoordinateParameters(QString name, QObject *parent)
CctwDoubleVector3D xTrans() const
QcepDoubleVector twoThetaAngles() const
void parseAngleArgument(const QString arg, const QString angleName, QcepDoubleProperty *corr, QcepDoubleProperty *start, QcepDoubleProperty *step, QcepDoubleVectorProperty *angs)
CctwUnitCell unitCell() const
CctwDoubleMatrix3x3 ubMat() const
double orientErrorDetPitch() const
CctwDoubleVector3D gridOffset() const
double twoThetaCorrection() const
QcepDoubleVector phiAngles() const
CctwDoubleMatrix3x3 gridBasis() const
double orientErrorDetRoll() const
double orientErrorGonPitch() const