ilent2 / ott

Optical Tweezers Toolbox (Version 1)
Other
51 stars 30 forks source link

Issue with bsc_pointmatch_farfield normalisation #24

Closed ilent2 closed 6 years ago

ilent2 commented 6 years ago

https://github.com/ilent2/ott/blob/70202a19828a3c96fb82f6e3cac468a12c77811c/ott-toolbox/bsc_pointmatch_farfield.m#L175

Hi Alex, There seems to be an issue with the power normalisation for bsc_pointmatch_farfield. Around line 175, rw is calculated from tan(theta).^2, where theta is in the range ((1:ntheta)-0.5)/ntheta*pi which will sometimes be approximately pi/2. Even when it is not exactly pi/2, nearby values still cause a problem since rw is later used in exp(rw/2 + ...) which quickly becomes too large. Could you take a look at this. Cheers, Isaac

ilent2 commented 6 years ago

Nope, not a bug, made a mistake with another variable.