@verbose
def write_source_spaces(fname, src, verbose=None):
 check_fname(fname, 'source space', ('-src.fif', '-src.fif.gz'))
 fid = start_file(fname)
 start_block(fid, FIFF.FIFFB_MNE)
 if src.info:
  start_block(fid, FIFF.FIFFB_MNE_ENV)
  write_id(fid, FIFF.FIFF_BLOCK_ID)
  data = src.info.get('working_dir', None)
  if data:
   write_string(fid, FIFF.FIFF_MNE_ENV_WORKING_DIR, data)
  data = src.info.get('command_line', None)
  if data:
   write_string(fid, FIFF.FIFF_MNE_ENV_COMMAND_LINE, data)
  end_block(fid, FIFF.FIFFB_MNE_ENV)
 _write_source_spaces_to_fid(fid, src, verbose)
 end_block(fid, FIFF.FIFFB_MNE)
 end_file(fid)

@ verbose def write_source_spaces ( fname , src , verbose = None ) : check_fname ( fname , 'source space' , ( '-src.fif' , '-src.fif.gz' ) ) fid = start_file ( fname ) start_block ( fid , FIFF . FIFFB_MNE ) if src . info : start_block ( fid , FIFF . FIFFB_MNE_ENV ) write_id ( fid , FIFF . FIFF_BLOCK_ID ) data = src . info . get ( 'working_dir' , None ) if data : write_string ( fid , FIFF . FIFF_MNE_ENV_WORKING_DIR , data ) data = src . info . get ( 'command_line' , None ) if data : write_string ( fid , FIFF . FIFF_MNE_ENV_COMMAND_LINE , data ) end_block ( fid , FIFF . FIFFB_MNE_ENV ) _write_source_spaces_to_fid ( fid , src , verbose ) end_block ( fid , FIFF . FIFFB_MNE ) end_file ( fid )
write source spaces to a file .