'Find rotation and MRI scaling based on LPA and RPA.'

def fit_scale_auricular_points(self):

    src_fid = np.vstack((self.hsp.lpa, self.hsp.rpa))
    src_fid -= self.hsp.nasion
    tgt_fid = np.vstack((self.mri.lpa, self.mri.rpa))
    tgt_fid -= self.mri.nasion
    tgt_fid -= [self.trans_x, self.trans_y, self.trans_z]
    x0 = (self.rot_x, self.rot_y, self.rot_z, (1.0 / self.scale_x))
    x = fit_matched_points(src_fid, tgt_fid, rotate=True, translate=False, scale=1, x0=x0, out='params')
    self.scale_x = (1.0 / x[3])
    (self.rot_x, self.rot_y, self.rot_z) = x[:3]
