def write_dig(fname, pts, coord_frame=None):
 if (coord_frame is not None):
  coord_frame = _to_const(coord_frame)
  pts_frames = set((pt.get('coord_frame', coord_frame) for pt in pts))
  bad_frames = (pts_frames - set((coord_frame,)))
  if (len(bad_frames) > 0):
   raise ValueError(('Points have coord_frame entries that are incompatible with coord_frame=%i: %s.' % (coord_frame, str(tuple(bad_frames)))))
 with start_file(fname) as fid:
  write_dig_points(fid, pts, block=True, coord_frame=coord_frame)
  end_file(fid)

def write_dig ( fname , pts , coord_frame = None ) : if ( coord_frame is not None ) : coord_frame = _to_const ( coord_frame ) pts_frames = set ( ( pt . get ( 'coord_frame' , coord_frame ) for pt in pts ) ) bad_frames = ( pts_frames - set ( ( coord_frame , ) ) ) if ( len ( bad_frames ) > 0 ) : raise ValueError ( ( 'Points have coord_frame entries that are incompatible with coord_frame=%i: %s.' % ( coord_frame , str ( tuple ( bad_frames ) ) ) ) ) with start_file ( fname ) as fid : write_dig_points ( fid , pts , block = True , coord_frame = coord_frame ) end_file ( fid )
write digitization data to a fif file .