def _read_comp_coeff(fid, d):
 d['ncomp'] = _read_int2(fid)
 d['comp'] = list()
 for k in range(d['ncomp']):
  comp = dict()
  d['comp'].append(comp)
  comp['sensor_name'] = _read_string(fid, 32)
  comp['coeff_type'] = _read_int(fid)
  _read_int(fid)
  comp['ncoeff'] = _read_int2(fid)
  comp['coeffs'] = np.zeros(comp['ncoeff'])
  comp['sensors'] = [_read_string(fid, CTF.CTFV_SENSOR_LABEL) for p in range(comp['ncoeff'])]
  unused = (CTF.CTFV_MAX_BALANCING - comp['ncoeff'])
  comp['sensors'] += ([''] * unused)
  fid.seek((unused * CTF.CTFV_SENSOR_LABEL), 1)
  comp['coeffs'][:comp['ncoeff']] = _read_double(fid, comp['ncoeff'])
  fid.seek((unused * 8), 1)
  comp['scanno'] = d['ch_names'].index(comp['sensor_name'])

def _read_comp_coeff ( fid , d ) : d [ 'ncomp' ] = _read_int2 ( fid ) d [ 'comp' ] = list ( ) for k in range ( d [ 'ncomp' ] ) : comp = dict ( ) d [ 'comp' ] . append ( comp ) comp [ 'sensor_name' ] = _read_string ( fid , 32 ) comp [ 'coeff_type' ] = _read_int ( fid ) _read_int ( fid ) comp [ 'ncoeff' ] = _read_int2 ( fid ) comp [ 'coeffs' ] = np . zeros ( comp [ 'ncoeff' ] ) comp [ 'sensors' ] = [ _read_string ( fid , CTF . CTFV_SENSOR_LABEL ) for p in range ( comp [ 'ncoeff' ] ) ] unused = ( CTF . CTFV_MAX_BALANCING - comp [ 'ncoeff' ] ) comp [ 'sensors' ] += ( [ '' ] * unused ) fid . seek ( ( unused * CTF . CTFV_SENSOR_LABEL ) , 1 ) comp [ 'coeffs' ] [ : comp [ 'ncoeff' ] ] = _read_double ( fid , comp [ 'ncoeff' ] ) fid . seek ( ( unused * 8 ) , 1 ) comp [ 'scanno' ] = d [ 'ch_names' ] . index ( comp [ 'sensor_name' ] )
read compensation coefficients .