ytree.data_structures.arbor.Arbor.add_analysis_field¶
-
Arbor.
add_analysis_field
(name, units)[source]¶ Add an empty field to be filled by analysis operations.
Parameters: - name (string) – Field name.
- units (string) – Field units.
Examples
>>> import ytree >>> a = ytree.load("tree_0_0_0.dat") >>> a.add_analysis_field("robots", "Msun * kpc") >>> # Set field for some halo. >>> a[0]["tree"][7]["robots"] = 1979.816