def _compute_mne_loc(coil_loc):
 loc = np.zeros(12)
 if ((np.linalg.norm(coil_loc['inner_coil']) == 0) and (np.linalg.norm(coil_loc['outer_coil']) == 0)):
  return loc
 loc[0:3] = (coil_loc['inner_coil'] / 39.370078)
 z_axis = (coil_loc['outer_coil'] - coil_loc['inner_coil'])
 R = rotation3d_align_z_axis(z_axis)
 loc[3:13] = R.T.reshape(9)
 return loc

def _compute_mne_loc ( coil_loc ) : loc = np . zeros ( 12 ) if ( ( np . linalg . norm ( coil_loc [ 'inner_coil' ] ) == 0 ) and ( np . linalg . norm ( coil_loc [ 'outer_coil' ] ) == 0 ) ) : return loc loc [ 0 : 3 ] = ( coil_loc [ 'inner_coil' ] / 39.370078 ) z_axis = ( coil_loc [ 'outer_coil' ] - coil_loc [ 'inner_coil' ] ) R = rotation3d_align_z_axis ( z_axis ) loc [ 3 : 13 ] = R . T . reshape ( 9 ) return loc
convert a set of coils to an mne struct .