def _loc_to_coil_trans(loc):
 loc = loc.astype(np.float64)
 coil_trans = np.concatenate([loc.reshape(4, 3).T[:, [1, 2, 3, 0]], np.array([0, 0, 0, 1]).reshape(1, 4)])
 return coil_trans

def _loc_to_coil_trans ( loc ) : loc = loc . astype ( np . float64 ) coil_trans = np . concatenate ( [ loc . reshape ( 4 , 3 ) . T [ : , [ 1 , 2 , 3 , 0 ] ] , np . array ( [ 0 , 0 , 0 , 1 ] ) . reshape ( 1 , 4 ) ] ) return coil_trans
convert loc vector to coil_trans .