fix bug in baseline computation

LT1AB
CunrenLiang 2020-06-06 00:12:54 -07:00 committed by GitHub
parent 2b8fdb3acb
commit 5bc4cd6466
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -417,6 +417,10 @@ def runPreprocessor(self):
mvel = np.array(masterSV.getVelocity())
sxyz = np.array(slaveSV.getPosition())
#to fix abrupt change near zero in baseline grid. JUN-05-2020
mvelunit = mvel / np.linalg.norm(mvel)
sxyz = sxyz - np.dot ( sxyz-mxyz, mvelunit) * mvelunit
aa = np.linalg.norm(sxyz-mxyz)
costheta = (x[1]*x[1] + aa*aa - slvrng*slvrng)/(2.*x[1]*aa)