#include <qxrdcalibrant.h>
Definition at line 17 of file qxrdcalibrant.h.
Enumerator |
---|
Hexagonal |
|
RHexagonal |
|
SimpleCubic |
|
BodyCenteredCubic |
|
FaceCenteredCubic |
|
DiamondCubic |
|
Definition at line 34 of file qxrdcalibrant.h.
Definition at line 12 of file qxrdcalibrant.cpp.
15 m_IsUsed(saver,
this,
"isUsed", 0,
"Is Calibrant used?"),
16 m_Flags(saver,
this,
"flags", 0,
"Calibrant flags"),
17 m_Description(saver,
this,
"description",
"Description",
"Calibrant Description"),
18 m_Symmetry(saver,
this,
"symmetry", 0,
"Calibrant Symmetry"),
19 m_A(saver,
this,
"a", 1,
"calibrant a-axis"),
20 m_B(saver,
this,
"b", 1,
"calibrant b-axis"),
21 m_C(saver,
this,
"c", 1,
"calibrant c-axis"),
22 m_Alpha(saver,
this,
"alpha", 90,
"calibrant alpha angle (deg)"),
23 m_Beta(saver,
this,
"beta", 90,
"calibrant beta angle (deg)"),
24 m_Gamma(saver,
this,
"gamma", 90,
"calibrant gamma angle (deg)"),
QxrdCalibrantLibraryWPtr m_CalibrantLibrary
QcepObject(QString name, QcepObject *parent)
QxrdExperimentWPtr m_Experiment
QWeakPointer< QcepSettingsSaver > QcepSettingsSaverWPtr
QxrdCalibrant::~QxrdCalibrant |
( |
| ) |
|
Definition at line 101 of file qxrdcalibrant.cpp.
References a, BodyCenteredCubic, DEBUG_CALIBRANT, DiamondCubic, FaceCenteredCubic, QxrdCalibrantQuadInt::h(), QxrdCalibrantQuadInt::k(), QxrdCalibrantQuadInt::l(), QxrdCalibrantQuadInt::n(), QcepObject::printMessage(), qcepDebug(), and SimpleCubic.
Referenced by dSpacings().
103 int s = get_Symmetry();
105 double lambda = (energy>100 ? 12398.4187/energy : energy);
107 int mmax = 2.0*a/lambda + 1;
113 QVector<QxrdCalibrantQuadInt> ex(mmax*mmax);
115 for (
int h=1; h<=mmax; h++) {
116 for (
int k=0; k<=h; k++) {
117 for (
int l=0; l<=k; l++) {
129 ok = ((h + k + l) % 2) == 0;
134 int n = h%2 + k%2 + l%2;
135 ok = (n==0) || (n==3);
141 int nn = h%2 + k%2 + l%2;
143 if (nn==0 || nn==3) {
157 if (ex[r].n() == 0) {
170 for (
int i=1; i<mmax*mmax; i++) {
173 double d = a/sqrt(i);
174 double tth = 2.0*asin(lambda/(2.0*d))*180.0/M_PI;
180 printMessage(tr(
"%1(%2): [%3,%4,%5], d:%6, tth:%7").arg(i).arg(e.
n()).arg(e.
h()).arg(e.
k()).arg(e.
l()).arg(d).arg(tth));
qint64 qcepDebug(int cond)
virtual void printMessage(QString msg, QDateTime dt=QDateTime::currentDateTime()) const
Definition at line 194 of file qxrdcalibrant.cpp.
References a, c, Hexagonal, QxrdCalibrantDSpacings::insertUnique(), lessThan(), and RHexagonal.
Referenced by dSpacings().
196 int s = get_Symmetry();
200 double lambda = (energy>100 ? 12398.4187/energy : energy);
202 int hkmax = 2.0*a/lambda + 1;
203 int lmax = 2.0*c/lambda + 1;
216 for (
int l=lmin; l<=lmax+1; l++) {
217 for (
int k=0; k<=hkmax+1; k++) {
224 for (
int h=hmin; h<=hkmax+1; h++) {
230 ok = ((-h+k+l)%3 == 0);
238 double d = 1.0/sqrt((4.0/3.0)*(h*h + h*k + k*k)/(a*a) + (l*l)/(c*c));
239 double tth = 2.0*asin(lambda/(2.0*d))*180.0/M_PI;
250 qSort(pts.begin(), pts.end(),
lessThan);
void insertUnique(int index, int h, int k, int l, double d, double tth)
bool lessThan(const QxrdCalibrantDSpacing &d1, const QxrdCalibrantDSpacing &d2)
void QxrdCalibrant::fromScriptValue |
( |
const QScriptValue & |
obj, |
|
|
QxrdCalibrantWPtr & |
cal |
|
) |
| |
|
static |
Definition at line 46 of file qxrdcalibrant.cpp.
48 QObject *qobj = obj.toQObject();
QSharedPointer< QxrdCalibrant > QxrdCalibrantPtr
bool QxrdCalibrant::isLocked |
( |
| ) |
|
QScriptValue QxrdCalibrant::toScriptValue |
( |
QScriptEngine * |
engine, |
|
|
const QxrdCalibrantWPtr & |
cal |
|
) |
| |
|
static |
QMutex QxrdCalibrant::m_Mutex |
|
mutableprivate |
double QxrdCalibrant::alpha |
|
readwrite |
double QxrdCalibrant::beta |
|
readwrite |
QString QxrdCalibrant::description |
|
readwrite |
double QxrdCalibrant::gamma |
|
readwrite |
int QxrdCalibrant::isUsed |
|
readwrite |
int QxrdCalibrant::symmetry |
|
readwrite |
The documentation for this class was generated from the following files: