6 # ifdef LINSOLVERS_RETAIN_MEMORY
8 # pragma message("LINSOLVERS_RETAIN_MEMORY is not safe in a multithreaded environment and should be turned off!")
10 # warning LINSOLVERS_RETAIN_MEMORY is not safe in a multithreaded environment and should be turned off!
16 m_RingIndex(ringIndex),
58 double cosaz = cos(az);
59 double sinaz = sin(az);
61 for (
int i=0; i<nx; i++) {
64 double ptaz = atan2(pt.
y() - cy, pt.
x() - cx) - az;
66 double x = cx + a*cos(ptaz);
67 double y = cy + b*sin(ptaz);
69 double xp = x*cosaz - y*sinaz;
70 double yp = x*sinaz + y*cosaz;
72 double dx = xp - pt.
x();
73 double dy = yp - pt.
y();
75 xv[i] = sqrt(dx*dx + dy*dy);
88 for (
int i=0; i<npts; i++) {
91 double dx = pt.
x() -
m_X0;
92 double dy = pt.
y() -
m_Y0;
94 rsum += sqrt(dx*dx + dy*dy);
98 double info[LM_INFO_SZ];
102 parms[2] = rsum/npts;
103 parms[3] = rsum/npts;
107 parms, NULL, 5, npts,
109 NULL, info, NULL, NULL,
this);
int countPowderRingPoints() const
static void staticEvaluate(double *parm, double *xv, int np, int nx, void *adata)
QxrdCenterFinder * m_CenterFinder
QxrdPowderPoint powderRingPoint(int i) const
void evaluate(double *parm, double *xv, int np, int nx)