From 0d78c7df7e3e3583e5656252d13fe202c2cfce35 Mon Sep 17 00:00:00 2001 From: Andrew-Robertson Date: Wed, 25 Sep 2024 11:50:59 -0700 Subject: [PATCH] fix(perf): only load the necessary parts of each dataset --- scripts/aux/extractSingleTree.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/aux/extractSingleTree.py b/scripts/aux/extractSingleTree.py index 859364f4be..1ac57bd698 100755 --- a/scripts/aux/extractSingleTree.py +++ b/scripts/aux/extractSingleTree.py @@ -62,8 +62,8 @@ def restricted_integer(x): if name == "particleIndexStart" or name == "particleIndexCount": continue print(" "+name) - dataset = fromFile[halosName][name][:] - toFile["forestHalos"].create_dataset(name,data=dataset[start[0]:end[0],...]) + dataset = fromFile[halosName][name][start[0]:end[0],...] + toFile["forestHalos"].create_dataset(name,data=dataset) print("...done") # Create the forestIndex group.