ytree.arbor.arbor.Arbor.save_arbor

Arbor.save_arbor(filename='arbor', fields=None, trees=None, max_file_size=524288)

Save the arbor to a file.

The saved arbor can be re-loaded as an arbor.

filename : optional, string
Output file keyword. If filename ends in “.h5”, the main header file will be just that. If not, filename will be <filename>/<basename>.h5. Default: “arbor”.
fields : optional, list of strings
The fields to be saved. If not given, all fields will be saved.
header_filename : string
The filename of the saved arbor.
>>> import ytree
>>> a = ytree.load("rockstar_halos/trees/tree_0_0_0.dat")
>>> fn = a.save_arbor()
>>> # reload it
>>> a2 = ytree.load(fn)