def test_hsp_elp():
 raw_txt = read_raw_kit(sqd_path, mrk_path, elp_txt_path, hsp_txt_path)
 raw_elp = read_raw_kit(sqd_path, mrk_path, elp_path, hsp_path)
 pts_txt = np.array([dig_point['r'] for dig_point in raw_txt.info['dig']])
 pts_elp = np.array([dig_point['r'] for dig_point in raw_elp.info['dig']])
 assert_array_almost_equal(pts_elp, pts_txt, decimal=5)
 trans_txt = raw_txt.info['dev_head_t']['trans']
 trans_elp = raw_elp.info['dev_head_t']['trans']
 assert_array_almost_equal(trans_elp, trans_txt, decimal=5)
 pts_txt_in_dev = apply_trans(linalg.inv(trans_txt), pts_txt)
 pts_elp_in_dev = apply_trans(linalg.inv(trans_elp), pts_elp)
 assert_array_almost_equal(pts_elp_in_dev, pts_txt_in_dev, decimal=5)

def test_hsp_elp ( ) : raw_txt = read_raw_kit ( sqd_path , mrk_path , elp_txt_path , hsp_txt_path ) raw_elp = read_raw_kit ( sqd_path , mrk_path , elp_path , hsp_path ) pts_txt = np . array ( [ dig_point [ 'r' ] for dig_point in raw_txt . info [ 'dig' ] ] ) pts_elp = np . array ( [ dig_point [ 'r' ] for dig_point in raw_elp . info [ 'dig' ] ] ) assert_array_almost_equal ( pts_elp , pts_txt , decimal = 5 ) trans_txt = raw_txt . info [ 'dev_head_t' ] [ 'trans' ] trans_elp = raw_elp . info [ 'dev_head_t' ] [ 'trans' ] assert_array_almost_equal ( trans_elp , trans_txt , decimal = 5 ) pts_txt_in_dev = apply_trans ( linalg . inv ( trans_txt ) , pts_txt ) pts_elp_in_dev = apply_trans ( linalg . inv ( trans_elp ) , pts_elp ) assert_array_almost_equal ( pts_elp_in_dev , pts_txt_in_dev , decimal = 5 )
test kit usage of * .