def _bem_specify_coils(bem, coils, coord_frame, mults, n_jobs):
 (coils, coord_frame) = _check_coil_frame(coils, coord_frame, bem)
 (rmags, cosmags, ws, bins) = _concatenate_coils(coils)
 lens = np.cumsum(np.r_[(0, [len(s['rr']) for s in bem['surfs']])])
 sol = np.zeros(((bins[(-1)] + 1), bem['solution'].shape[1]))
 lims = np.concatenate([np.arange(0, sol.shape[0], 100), [sol.shape[0]]])
 for (o1, o2, surf, mult) in zip(lens[:(-1)], lens[1:], bem['surfs'], bem['field_mult']):
  coeff = _lin_field_coeff(surf, mult, rmags, cosmags, ws, bins, n_jobs)
  for (start, stop) in zip(lims[:(-1)], lims[1:]):
   sol[start:stop] += np.dot(coeff[start:stop], bem['solution'][o1:o2])
 sol *= mults
 return sol

def _bem_specify_coils ( bem , coils , coord_frame , mults , n_jobs ) : ( coils , coord_frame ) = _check_coil_frame ( coils , coord_frame , bem ) ( rmags , cosmags , ws , bins ) = _concatenate_coils ( coils ) lens = np . cumsum ( np . r_ [ ( 0 , [ len ( s [ 'rr' ] ) for s in bem [ 'surfs' ] ] ) ] ) sol = np . zeros ( ( ( bins [ ( - 1 ) ] + 1 ) , bem [ 'solution' ] . shape [ 1 ] ) ) lims = np . concatenate ( [ np . arange ( 0 , sol . shape [ 0 ] , 100 ) , [ sol . shape [ 0 ] ] ] ) for ( o1 , o2 , surf , mult ) in zip ( lens [ : ( - 1 ) ] , lens [ 1 : ] , bem [ 'surfs' ] , bem [ 'field_mult' ] ) : coeff = _lin_field_coeff ( surf , mult , rmags , cosmags , ws , bins , n_jobs ) for ( start , stop ) in zip ( lims [ : ( - 1 ) ] , lims [ 1 : ] ) : sol [ start : stop ] += np . dot ( coeff [ start : stop ] , bem [ 'solution' ] [ o1 : o2 ] ) sol *= mults return sol
set up for computing the solution at a set of meg coils .