Tracking Index Bug

Issue #33 resolved
Former user created an issue

In the main photon loop, the tracking function is being called with the photon.time (incorrect) as opposed to photon.absoluteTime (correct). This leads to an incorrect distribution of indexes for tracking jitter (see attached plot). Fortunately, it is a one line fix.

[photonloop.cpp line 298]

// Tracking if (trackingMode) tracking(&angle, photon.time);

[photonmanipulate.cpp line 31]

int Image::tracking(Vector *angle, double time) {

double rindex, vxp, vyp;
long index;

index = find_linear(perturbation.jittertime, trackinglines, time, &rindex);
vxp = angle->x - (cos(spiderangle)*perturbation.jitterele[index] +
                  sin(spiderangle)*perturbation.jitterazi[index])*ARCSEC;
vyp = angle->y + ((-1.0)*(sin(spiderangle)*perturbation.jitterele[index]) +
                  cos(spiderangle)*perturbation.jitterazi[index])*ARCSEC;
angle->y = vyp*cos(perturbation.jitterrot[index]*ARCSEC) + (-1.0)*vxp*sin(perturbation.jitterrot[index]*ARCSEC);
angle->x = vyp*sin(perturbation.jitterrot[index]*ARCSEC) + (vxp)*cos(perturbation.jitterrot[index]*ARCSEC);
angle->z = smallAnglePupilNormalize(angle->x, angle->y);

return(0);

}

Comments (3)

  1. Log in to comment