save
- pyarts.xml.save(var, filename, precision='.7e', format='ascii', comment=None, parents=False)[source]
Save a variable to an ARTS XML file.
- Parameters:
var – ARTS variable to be stored.
filename (str) – Name of output XML file. If the name ends in .gz, the file is compressed on the fly.
precision (str) – Format for output precision.
format (str) – Output format: ‘ascii’ (default) or ‘binary’.
comment (str) – Comment string included in a tag above data.
parents (bool) – Create missing parent directories.
Note
Python’s gzip module is extremely slow in writing. Consider compressing files manually after writing them normally.
Example
>>> x = pyarts.arts.Vector([1.,2.,3.]) >>> pyarts.xml.save(x, 'myvector.xml')