ytree.data_structures.load.load¶
-
ytree.data_structures.load.
load
(filename, method=None, **kwargs)[source]¶ Load an Arbor, determine the type automatically.
Parameters: - filename (string) – Input filename.
- method (optional, string) – The type of Arbor to be loaded. Existing types are: ConsistentTrees, Rockstar, TreeFarm, YTree. If not given, the type will be determined based on characteristics of the input file.
- kwargs (optional, dict) – Additional keyword arguments are passed to _is_valid and the determined type.
Returns: Return type: Examples
>>> import ytree >>> # saved Arbor (ytree format) >>> a = ytree.load("arbor/arbor.h5") >>> # Amiga Halo Finder >>> a = ytree.load("ahf_halos/snap_N64L16_000.parameter", ... hubble_constant=0.7) >>> # consistent-trees >>> a = ytree.load("tiny_ctrees/locations.dat") >>> a = ytree.load("consistent_trees/tree_0_0_0.dat") >>> a = ytree.load("ctrees_hlists/hlists/hlist_0.12521.list") >>> # consistent-trees-hdf5 >>> a = ytree.load("consistent_trees_hdf5/soa/forest.h5") >>> # LHaloTree >>> a = ytree.load("my_halos/trees_063.0") >>> # LHaloTree-hdf5 >>> a = ytree.load("TNG50-4-Dark/trees_sf1_099.0.hdf5", ... box_size=35, hubble_constant=0.6774, ... omega_matter=0.3089, omega_lambda=0.6911) >>> # Moria >>> a = ytree.load("moria/moria_tree_testsim050.hdf5") >>> # Rockstar >>> a = ytree.load("rockstar_halos/out_0.list") >>> # treefarm >>> a = ytree.load("my_halos/fof_subhalo_tab_025.0.h5") >>> # TreeFrog >>> a = ytree.load("treefrog/VELOCIraptor.tree.t4.0-131.walkabletree.sage.forestID.foreststats.hdf5")