def write_dig_points(fid, dig, block=False, coord_frame=None):
 if (dig is not None):
  data_size = (5 * 4)
  if block:
   start_block(fid, FIFF.FIFFB_ISOTRAK)
  if (coord_frame is not None):
   write_int(fid, FIFF.FIFF_MNE_COORD_FRAME, coord_frame)
  for d in dig:
   fid.write(np.array(FIFF.FIFF_DIG_POINT, '>i4').tostring())
   fid.write(np.array(FIFF.FIFFT_DIG_POINT_STRUCT, '>i4').tostring())
   fid.write(np.array(data_size, dtype='>i4').tostring())
   fid.write(np.array(FIFF.FIFFV_NEXT_SEQ, '>i4').tostring())
   fid.write(np.array(d['kind'], '>i4').tostring())
   fid.write(np.array(d['ident'], '>i4').tostring())
   fid.write(np.array(d['r'][:3], '>f4').tostring())
  if block:
   end_block(fid, FIFF.FIFFB_ISOTRAK)

def write_dig_points ( fid , dig , block = False , coord_frame = None ) : if ( dig is not None ) : data_size = ( 5 * 4 ) if block : start_block ( fid , FIFF . FIFFB_ISOTRAK ) if ( coord_frame is not None ) : write_int ( fid , FIFF . FIFF_MNE_COORD_FRAME , coord_frame ) for d in dig : fid . write ( np . array ( FIFF . FIFF_DIG_POINT , '>i4' ) . tostring ( ) ) fid . write ( np . array ( FIFF . FIFFT_DIG_POINT_STRUCT , '>i4' ) . tostring ( ) ) fid . write ( np . array ( data_size , dtype = '>i4' ) . tostring ( ) ) fid . write ( np . array ( FIFF . FIFFV_NEXT_SEQ , '>i4' ) . tostring ( ) ) fid . write ( np . array ( d [ 'kind' ] , '>i4' ) . tostring ( ) ) fid . write ( np . array ( d [ 'ident' ] , '>i4' ) . tostring ( ) ) fid . write ( np . array ( d [ 'r' ] [ : 3 ] , '>f4' ) . tostring ( ) ) if block : end_block ( fid , FIFF . FIFFB_ISOTRAK )
write a set of digitizer data points into a fif file .