def _read_dig_fif(fid, meas_info):
 isotrak = dir_tree_find(meas_info, FIFF.FIFFB_ISOTRAK)
 dig = None
 if (len(isotrak) == 0):
  logger.info('Isotrak not found')
 elif (len(isotrak) > 1):
  warn('Multiple Isotrak found')
 else:
  isotrak = isotrak[0]
  dig = []
  for k in range(isotrak['nent']):
   kind = isotrak['directory'][k].kind
   pos = isotrak['directory'][k].pos
   if (kind == FIFF.FIFF_DIG_POINT):
    tag = read_tag(fid, pos)
    dig.append(tag.data)
    dig[(-1)]['coord_frame'] = FIFF.FIFFV_COORD_HEAD
 return dig

def _read_dig_fif ( fid , meas_info ) : isotrak = dir_tree_find ( meas_info , FIFF . FIFFB_ISOTRAK ) dig = None if ( len ( isotrak ) == 0 ) : logger . info ( 'Isotrak not found' ) elif ( len ( isotrak ) > 1 ) : warn ( 'Multiple Isotrak found' ) else : isotrak = isotrak [ 0 ] dig = [ ] for k in range ( isotrak [ 'nent' ] ) : kind = isotrak [ 'directory' ] [ k ] . kind pos = isotrak [ 'directory' ] [ k ] . pos if ( kind == FIFF . FIFF_DIG_POINT ) : tag = read_tag ( fid , pos ) dig . append ( tag . data ) dig [ ( - 1 ) ] [ 'coord_frame' ] = FIFF . FIFFV_COORD_HEAD return dig
helper to read digitizer data from a fiff file .