scaling problem in CW toast jacobian computation
Forward and inverse modelling in optical tomography
Brought to you by:
apogee
I am running the forward model and computing the Jacobian with toastJacobianCW. I also created some baseline and perturbation data with ToastProject, and computed the difference data (yp-yb). The difference data I get simulating the data with ToastProject and the one I get using the Jacobian (y=JxdeltaMua) are scaled differently. Moreover, it seems that the scaling factor is constant and is equal to 1/(2*A) where:
A = (2./(1-R0) - 1 + abs(cos(theta_c)).^3)./(1-abs(cos(theta_c)).^2);
theta_c = asin(1./ref);
R0 = ((ref-1).^2)/((ref+1).^2);
Any clue on this? Is this correct? Thanks.
Could this be occurring because when an internal call to CalcJacobianCW is made the forward and adjoint fields are calculated by a solver which uses ref provided by the user, however the factor (1/f) in J_log(m,:) = (1/f) J_amp(m,:) is calculated by a projection which uses ref as stored in the mesh object (which may have been initialised without parameters).
In r527, I have fixed the problem of toastJacobianCW(v2) always using the refractive index stored with the mesh. However, this would only have affected the new Matlab interface. If a similar bug also exists in the old interface, please let me know.
Does this fix solve the original problem, or is there more to be looked at?