def save_file(self, path=None, filters='<STR_LIT>', force_extension=None, force_overwrite=False, header_only=False, delimiter='<STR_LIT>', binary=None):
<EOL>if len(self)==<NUM_LIT:0>: header_only=True<EOL>if path in [None]: path = _s.dialogs.save(filters, default_directory=self.directory)<EOL>if path in ["<STR_LIT>", None]:<EOL><INDENT>print("<STR_LIT>")<EOL>return False<EOL><DEDENT>if  not force_extension == None:<EOL><INDENT>force_extension = force_extension.replace('<STR_LIT:*>','<STR_LIT>').replace('<STR_LIT:.>','<STR_LIT>')<EOL>if not _os.path.splitext(path)[-<NUM_LIT:1>][<NUM_LIT:1>:] == force_extension:<EOL><INDENT>path = path + '<STR_LIT:.>' + force_extension<EOL><DEDENT><DEDENT>self.path=path<EOL>if _os.path.exists(path) and not force_overwrite:<EOL><INDENT>_os.rename(path,path+"<STR_LIT>")<EOL><DEDENT>if delimiter == "<STR_LIT>":<EOL><INDENT>if self.delimiter is None: delimiter = "<STR_LIT:\t>"<EOL>else:                      delimiter = self.delimiter<EOL><DEDENT>temporary_path = _os.path.join(_s.settings.path_home, "<STR_LIT>"+str(int(<NUM_LIT>*_time.time()))+'<STR_LIT:->'+str(int(<NUM_LIT>*_n.random.rand(<NUM_LIT:1>))))<EOL>f = open(temporary_path, '<STR_LIT:w>')<EOL>if binary in [False, '<STR_LIT:text>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>self.pop_header('<STR_LIT>', True)<EOL>binary = None<EOL><DEDENT>if not binary in [None, False, '<STR_LIT:text>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>']: <EOL><INDENT>self.h(SPINMOB_BINARY=binary)<EOL><DEDENT>if '<STR_LIT>' in self.hkeys:<EOL><INDENT>binary = self.pop_header('<STR_LIT>')<EOL>if binary in ['<STR_LIT:True>', True, <NUM_LIT:1>]: binary = '<STR_LIT>'<EOL>f.write('<STR_LIT>' + delimiter + binary + '<STR_LIT:\n>')<EOL><DEDENT>for k in self.hkeys: f.write(k + delimiter + repr(self.headers[k]) + "<STR_LIT:\n>")<EOL>f.write('<STR_LIT:\n>')<EOL>if not header_only: <EOL><INDENT>if binary in [None, '<STR_LIT:None>', False, '<STR_LIT:False>']:<EOL><INDENT>elements = []<EOL>for ckey in self.ckeys: <EOL><INDENT>elements.append(str(ckey).replace(delimiter,'<STR_LIT:_>'))<EOL><DEDENT>f.write(delimiter.join(elements) + "<STR_LIT:\n>")<EOL>for n in range(<NUM_LIT:0>, len(self[<NUM_LIT:0>])):<EOL><INDENT>elements = []<EOL>for m in range(<NUM_LIT:0>, len(self.ckeys)):<EOL><INDENT>if n < len(self[m]):<EOL><INDENT>elements.append(str(self[m][n]))<EOL><DEDENT>else:<EOL><INDENT>elements.append('<STR_LIT:_>')<EOL><DEDENT><DEDENT>f.write(delimiter.join(elements) + "<STR_LIT:\n>")<EOL><DEDENT><DEDENT>else:<EOL><INDENT>f.write('<STR_LIT>')<EOL>for n in range(len(self.ckeys)):<EOL><INDENT>data_string = _n.array(self[n]).astype(binary).tostring()<EOL>f.write(str(self.ckeys[n]).replace(delimiter,'<STR_LIT:_>') <EOL>+ delimiter + str(len(self[n])) + '<STR_LIT:\n>')<EOL>f.close()<EOL>f = open(temporary_path, '<STR_LIT>')<EOL>f.write(data_string)<EOL>f.close()<EOL>f = open(temporary_path, '<STR_LIT:a>')<EOL>f.write('<STR_LIT:\n>')<EOL><DEDENT><DEDENT><DEDENT>f.close()<EOL>_shutil.move(temporary_path, path)<EOL>return self<EOL>
This will save all the header info and columns to an ascii file with
the specified path.

Parameters
----------
path=None
    Path for saving the data. If None, this will bring up
    a save file dialog.
filters='*.dat'         
    File filter for the file dialog (for path=None)
force_extension=None
    If set to a string, e.g., 'txt', it will enforce that the chosen
    filename will have this extension.
force_overwrite=False   
    Normally, if the file * exists, this will copy that
    to *.backup. If the backup already exists, this
    function will abort. Setting this to True will
    force overwriting the backup file.
header_only=False       
    Only output the header?
delimiter='use current' 
    This will set the delimiter of the output file
    'use current' means use self.delimiter
binary=None
    Set to one of the allowed numpy dtypes, e.g., float32, float64, 
    complex64, int32, etc. Setting binary=True defaults to float64.
    Note if the header contains the key SPINMOB_BINARY and binary=None,
    it will save as binary using the header specification.