diff --git a/plotter.py b/plotter.py index 3f5adeb..6e403c2 100644 --- a/plotter.py +++ b/plotter.py @@ -456,7 +456,7 @@ class Plotter(Aggregator, BaseProcessor): return r"{} = {}".format(prop_label, prop_value_str) def get_label_file(run): - label_filename = f"{self.path}/{run}/{self.pp_params.input.label_filename}" + label_filename = f"{self.path}/{run}/{self.params.input.label_filename}" if os.path.exists(label_filename): with open(label_filename, "r") as label_file: label = label_file.readline()[:-1] diff --git a/run_selector.py b/run_selector.py index 708848d..b552a19 100644 --- a/run_selector.py +++ b/run_selector.py @@ -258,6 +258,8 @@ class RunSelector: ) if in_runs is not None: + if isinstance(in_runs, str): + in_runs = [in_runs] runs = list(filter(lambda n: n in runs, in_runs)) if do_tests: diff --git a/snapshotprocessor.py b/snapshotprocessor.py index dfe24f9..1f38b7e 100644 --- a/snapshotprocessor.py +++ b/snapshotprocessor.py @@ -349,7 +349,7 @@ class SnapshotProcessor(HDF5Container): ) self.info = selector.info[self.run][self.num] - self.namelist = selector.namelist[self.run][self.num] + self.namelist = selector.namelist[self.run] self.lbox = self.info["boxlen"] # Get time @@ -1024,7 +1024,7 @@ class SnapshotProcessor(HDF5Container): omega = self.get_value("/maps/omega_mwavg_z", unit=U.s ** -1) space_coeff = self.info["unit_length"].express(U.m) - map_size = self.pp_params.pymses.map_size + map_size = self.params.pymses.map_size if coarsen_factor > 1: map_size = map_size // coarsen_factor diff --git a/studyprocessor.py b/studyprocessor.py index 1f67623..ea558d7 100644 --- a/studyprocessor.py +++ b/studyprocessor.py @@ -69,6 +69,7 @@ class StudyProcessor(Aggregator, HDF5Container): self.snaps[run][num] = SnapshotProcessor( path_run, num, + selector=selector, path_out=path_out_run, params=self.params, unit_time=unit_time, @@ -669,7 +670,7 @@ class StudyProcessor(Aggregator, HDF5Container): "time_rho_prof": Rule( self, partial( - self._time_series, partial(self.get_pp_value, "/profile/rho_prof") + self._time_series, partial(self.get_snap_value, "/profile/rho_prof") ), group="/series", dependencies={"time": None, "rho_prof": "__parent__"}, @@ -677,7 +678,7 @@ class StudyProcessor(Aggregator, HDF5Container): "time_coldens_pdf": Rule( self, partial( - self._time_series, partial(self.get_pp_value, "/hist/pdf_coldens") + self._time_series, partial(self.get_snap_value, "/hist/pdf_coldens") ), group="/series", dependencies={"time": None, "pdf_coldens": "__parent__"},