1 #define _USE_MATH_DEFINES
4 #include "ui_cctwqtsetuptransformdialog.h"
15 setAttribute(Qt::WA_DeleteOnClose);
46 ui->m_UnitCellA->setValue(cell.
a());
47 ui->m_UnitCellB->setValue(cell.
b());
48 ui->m_UnitCellC->setValue(cell.
c());
55 ui->m_UBMat00->setValue(ubMat(0,0));
56 ui->m_UBMat01->setValue(ubMat(0,1));
57 ui->m_UBMat02->setValue(ubMat(0,2));
58 ui->m_UBMat10->setValue(ubMat(1,0));
59 ui->m_UBMat11->setValue(ubMat(1,1));
60 ui->m_UBMat12->setValue(ubMat(1,2));
61 ui->m_UBMat20->setValue(ubMat(2,0));
62 ui->m_UBMat21->setValue(ubMat(2,1));
63 ui->m_UBMat22->setValue(ubMat(2,2));
67 ui->m_OMat00->setValue(oMat(0,0));
68 ui->m_OMat01->setValue(oMat(0,1));
69 ui->m_OMat02->setValue(oMat(0,2));
70 ui->m_OMat10->setValue(oMat(1,0));
71 ui->m_OMat11->setValue(oMat(1,1));
72 ui->m_OMat12->setValue(oMat(1,2));
73 ui->m_OMat20->setValue(oMat(2,0));
74 ui->m_OMat21->setValue(oMat(2,1));
75 ui->m_OMat22->setValue(oMat(2,2));
79 ui->m_OVec0->setValue(oVec(0));
80 ui->m_OVec1->setValue(oVec(1));
81 ui->m_OVec2->setValue(oVec(2));
83 ui->m_Det0x->setValue(parms->
det0x());
84 ui->m_Det0y->setValue(parms->
det0y());
88 ui->m_XTransX->setValue(xt.
x());
89 ui->m_XTransY->setValue(xt.
y());
90 ui->m_XTransZ->setValue(xt.
z());
97 ui->m_TwoTheta->setText(parms->get_TwoTheta());
98 ui->m_TwoThetaCorrection->setValue(
rad2deg(parms->get_TwoThetaCorrection()));
99 ui->m_TwoThetaNom->setValue(
rad2deg(parms->get_TwoThetaNom()));
100 ui->m_TwoThetaStep->setValue(
rad2deg(parms->get_TwoThetaStep()));
102 ui->m_Omega->setText(parms->get_Omega());
103 ui->m_OmegaCorrection->setValue(
rad2deg(parms->get_OmegaCorrection()));
104 ui->m_OmegaNom->setValue(
rad2deg(parms->get_OmegaNom()));
105 ui->m_OmegaStep->setValue(
rad2deg(parms->get_OmegaStep()));
107 ui->m_Chi->setText(parms->get_Chi());
108 ui->m_ChiCorrection->setValue(
rad2deg(parms->get_ChiCorrection()));
109 ui->m_ChiNom->setValue(
rad2deg(parms->get_ChiNom()));
110 ui->m_ChiStep->setValue(
rad2deg(parms->get_ChiStep()));
112 ui->m_Phi->setText(parms->get_Phi());
113 ui->m_PhiCorrection->setValue(
rad2deg(parms->get_PhiCorrection()));
114 ui->m_PhiNom->setValue(
rad2deg(parms->get_PhiNom()));
115 ui->m_PhiStep->setValue(
rad2deg(parms->get_PhiStep()));
119 ui->m_GridOriginX->setValue(gridOrigin.
x());
120 ui->m_GridOriginY->setValue(gridOrigin.
y());
121 ui->m_GridOriginZ->setValue(gridOrigin.
z());
125 ui->m_GridBasis00->setValue(gridBasis(0,0));
126 ui->m_GridBasis01->setValue(gridBasis(0,1));
127 ui->m_GridBasis02->setValue(gridBasis(0,2));
128 ui->m_GridBasis10->setValue(gridBasis(1,0));
129 ui->m_GridBasis11->setValue(gridBasis(1,1));
130 ui->m_GridBasis12->setValue(gridBasis(1,2));
131 ui->m_GridBasis20->setValue(gridBasis(2,0));
132 ui->m_GridBasis21->setValue(gridBasis(2,1));
133 ui->m_GridBasis22->setValue(gridBasis(2,2));
137 ui->m_GridDimX->setValue(gridDim.
x());
138 ui->m_GridDimY->setValue(gridDim.
y());
139 ui->m_GridDimZ->setValue(gridDim.
z());
143 ui->m_GridOffsetX->setValue(gridOffset.
x());
144 ui->m_GridOffsetY->setValue(gridOffset.
y());
145 ui->m_GridOffsetZ->setValue(gridOffset.
z());
158 cell.
a() =
ui->m_UnitCellA->value();
159 cell.
b() =
ui->m_UnitCellB->value();
160 cell.
c() =
ui->m_UnitCellC->value();
169 ubMat(0,0) =
ui->m_UBMat00->value();
170 ubMat(0,1) =
ui->m_UBMat01->value();
171 ubMat(0,2) =
ui->m_UBMat02->value();
172 ubMat(1,0) =
ui->m_UBMat10->value();
173 ubMat(1,1) =
ui->m_UBMat11->value();
174 ubMat(1,2) =
ui->m_UBMat12->value();
175 ubMat(2,0) =
ui->m_UBMat20->value();
176 ubMat(2,1) =
ui->m_UBMat21->value();
177 ubMat(2,2) =
ui->m_UBMat22->value();
183 oMat(0,0) =
ui->m_OMat00->value();
184 oMat(0,1) =
ui->m_OMat01->value();
185 oMat(0,2) =
ui->m_OMat02->value();
186 oMat(1,0) =
ui->m_OMat10->value();
187 oMat(1,1) =
ui->m_OMat11->value();
188 oMat(1,2) =
ui->m_OMat12->value();
189 oMat(2,0) =
ui->m_OMat20->value();
190 oMat(2,1) =
ui->m_OMat21->value();
191 oMat(2,2) =
ui->m_OMat22->value();
197 oVec(0) =
ui->m_OVec0->value();
198 oVec(1) =
ui->m_OVec1->value();
199 oVec(2) =
ui->m_OVec2->value();
208 xt.
x() =
ui->m_XTransX->value();
209 xt.
y() =
ui->m_XTransY->value();
210 xt.
z() =
ui->m_XTransZ->value();
219 parms->set_TwoThetaCorrection(
deg2rad(
ui->m_TwoThetaCorrection->value()));
220 parms->set_TwoThetaNom(
deg2rad(
ui->m_TwoThetaNom->value()));
221 parms->set_TwoThetaStep(
deg2rad(
ui->m_TwoThetaStep->value()));
224 parms->set_OmegaCorrection(
deg2rad(
ui->m_OmegaCorrection->value()));
225 parms->set_OmegaNom(
deg2rad(
ui->m_OmegaNom->value()));
226 parms->set_OmegaStep(
deg2rad(
ui->m_OmegaStep->value()));
229 parms->set_ChiCorrection(
deg2rad(
ui->m_ChiCorrection->value()));
230 parms->set_ChiNom(
deg2rad(
ui->m_ChiNom->value()));
231 parms->set_ChiStep(
deg2rad(
ui->m_ChiStep->value()));
234 parms->set_PhiCorrection(
deg2rad(
ui->m_PhiCorrection->value()));
235 parms->set_PhiNom(
deg2rad(
ui->m_PhiNom->value()));
236 parms->set_PhiStep(
deg2rad(
ui->m_PhiStep->value()));
241 gridOrigin.
x() =
ui->m_GridOriginX->value();
242 gridOrigin.
y() =
ui->m_GridOriginY->value();
243 gridOrigin.
z() =
ui->m_GridOriginZ->value();
249 gridBasis(0,0) =
ui->m_GridBasis00->value();
250 gridBasis(0,1) =
ui->m_GridBasis01->value();
251 gridBasis(0,2) =
ui->m_GridBasis02->value();
252 gridBasis(1,0) =
ui->m_GridBasis10->value();
253 gridBasis(1,1) =
ui->m_GridBasis11->value();
254 gridBasis(1,2) =
ui->m_GridBasis12->value();
255 gridBasis(2,0) =
ui->m_GridBasis20->value();
256 gridBasis(2,1) =
ui->m_GridBasis21->value();
257 gridBasis(2,2) =
ui->m_GridBasis22->value();
263 gridDim.
x() =
ui->m_GridDimX->value();
264 gridDim.
y() =
ui->m_GridDimY->value();
265 gridDim.
z() =
ui->m_GridDimZ->value();
271 gridOffset.
x() =
ui->m_GridOffsetX->value();
272 gridOffset.
y() =
ui->m_GridOffsetY->value();
273 gridOffset.
z() =
ui->m_GridOffsetZ->value();
280 return rad*180.0/M_PI;
285 return deg*M_PI/180.0;
CctwDoubleMatrix3x3 gridBasis
CctwChunkedData * m_InputData
void setUBMat(CctwDoubleMatrix3x3 ub)
CctwDoubleVector3D gridOrigin
void setOMat(CctwDoubleMatrix3x3 om)
void setOrientErrorDetYaw(double x)
void setTwoTheta(const QString tth)
void setGridOrigin(CctwDoubleVector3D org)
void setDet0y(double d0y)
CctwCrystalCoordinateParameters * m_Parameters
CctwDoubleVector3D gridOffset
void setDistance(double d)
void setOrientErrorDetPitch(double x)
CctwIntVector3D dimensions
void setOmega(const QString omg)
void setOrientErrorDetRoll(double x)
void setGridBasis(CctwDoubleMatrix3x3 bas)
CctwDoubleMatrix3x3 ubMat
double orientErrorDetRoll
void setUnitCell(CctwUnitCell uc)
CctwDoubleVector3D gridDim
double orientErrorGonPitch
void setDet0x(double d0x)
void setXTrans(CctwDoubleVector3D xt)
void setPhi(const QString phi)
double orientErrorDetPitch
void setGridOffset(CctwDoubleVector3D off)
void setPixelSize(double sz)
void setWavelength(double wv)
void setGridDim(CctwDoubleVector3D dim)
CctwDoubleVector3D xTrans
void setOrientErrorGonPitch(double x)
void setOVec(CctwDoubleVector3D ov)
void setChi(const QString chi)