Differences between the observed and modeled values:
r_i = wrap_angle( angle(solution) - angle(constructed) )-
angle(solution)is the phase of the calibration solution (input data) -
angle(constructed)is the phase of the model fit, -
wrap_angleensures the phase residuals remain within$[- \pi, \pi]$ .