def _load_tristan_coil_locs(coil_loc_path):
 channel_info = dict()
 with open(coil_loc_path, 'r') as fid:
  fid.readline()
  fid.readline()
  for line in fid:
   line = line.strip()
   vals = line.split(',')
   channel_info[vals[0]] = dict()
   if vals[6]:
    channel_info[vals[0]]['inner_coil'] = np.array(vals[2:5], np.float)
    channel_info[vals[0]]['outer_coil'] = np.array(vals[5:8], np.float)
   else:
    channel_info[vals[0]]['inner_coil'] = np.zeros(3)
    channel_info[vals[0]]['outer_coil'] = np.zeros(3)
 return channel_info

def _load_tristan_coil_locs ( coil_loc_path ) : channel_info = dict ( ) with open ( coil_loc_path , 'r' ) as fid : fid . readline ( ) fid . readline ( ) for line in fid : line = line . strip ( ) vals = line . split ( ',' ) channel_info [ vals [ 0 ] ] = dict ( ) if vals [ 6 ] : channel_info [ vals [ 0 ] ] [ 'inner_coil' ] = np . array ( vals [ 2 : 5 ] , np . float ) channel_info [ vals [ 0 ] ] [ 'outer_coil' ] = np . array ( vals [ 5 : 8 ] , np . float ) else : channel_info [ vals [ 0 ] ] [ 'inner_coil' ] = np . zeros ( 3 ) channel_info [ vals [ 0 ] ] [ 'outer_coil' ] = np . zeros ( 3 ) return channel_info
load the coil locations from tristan cad drawings .