[refactoring] and solve path_out bug

This commit is contained in:
Noe Brucy
2021-07-06 18:06:19 +02:00
parent a4d2be22d2
commit 3fe7f1ca0e
4 changed files with 21 additions and 21 deletions
+5 -5
View File
@@ -22,8 +22,8 @@ class StudyProcessor(Aggregator, HDF5Container):
def __init__(
self,
path,
in_runs,
in_nums,
runs,
nums,
path_out=None,
params=default_params(),
selector=None,
@@ -43,12 +43,12 @@ class StudyProcessor(Aggregator, HDF5Container):
else:
tag_name = ""
self.filename = path_out + "/comp" + tag_name + ".h5"
self.filename = self.path_out + "/comp" + tag_name + ".h5"
# Select runs
if selector is None:
selector = RunSelector(
path, in_runs, in_nums, self.params.input.nml_filename, **kwargs
path, runs, nums, self.params.input.nml_filename, **kwargs
)
# Save infos
@@ -62,7 +62,7 @@ class StudyProcessor(Aggregator, HDF5Container):
for run in self.runs:
path_run = path + "/" + run
path_out_run = path_out + "/" + run
path_out_run = self.path_out + "/" + run
self.snaps[run] = {}
for num in self.nums[run]: