black without mortimer
This commit is contained in:
+10
-9
@@ -283,7 +283,9 @@ class RunSelector:
|
||||
def load_info(self, run, num):
|
||||
info_filename_output = f"{self.path_in}/{run}/output_{num:05}/info_{num:05}.txt"
|
||||
# Path of the filename if ratarmount was used
|
||||
info_filename_tarmount_output = f"{self.path_in}/{run}/output_{num:05}/output_{num:05}/info_{num:05}.txt"
|
||||
info_filename_tarmount_output = (
|
||||
f"{self.path_in}/{run}/output_{num:05}/output_{num:05}/info_{num:05}.txt"
|
||||
)
|
||||
|
||||
info_filename_folder = f"{self.path_in}/{run}/info/info_{num:05}.txt"
|
||||
if os.path.exists(info_filename_output):
|
||||
@@ -348,15 +350,17 @@ class RunSelector:
|
||||
return self.info[run][num]["time"]
|
||||
|
||||
elif isinstance(unit_time, str):
|
||||
|
||||
|
||||
factor = self.get_nml_value(unit_time, run)
|
||||
|
||||
def get_time(num):
|
||||
time_code = self.info[run][num]["time"]
|
||||
time_code = self.info[run][num]["time"]
|
||||
return time_code / factor
|
||||
|
||||
else:
|
||||
|
||||
def get_time(num):
|
||||
time_code = self.info[run][num]["time"]
|
||||
time_code = self.info[run][num]["time"]
|
||||
return time_code * self.info[run][num]["unit_time"].express(unit_time)
|
||||
|
||||
# -- A function to search a given time using dichotomy
|
||||
@@ -477,7 +481,7 @@ class RunSelector:
|
||||
return nums
|
||||
|
||||
def write_paths(self, prefix=None, filename="~/list_file"):
|
||||
"""
|
||||
"""
|
||||
Write the paths of the selected runs on a file
|
||||
|
||||
Args:
|
||||
@@ -485,7 +489,7 @@ class RunSelector:
|
||||
filename (str, optional): F. Defaults to "~/list_file".
|
||||
"""
|
||||
if prefix is None:
|
||||
prefix = self.path_in
|
||||
prefix = self.path_in
|
||||
paths = []
|
||||
for run in self.nums:
|
||||
for num in self.nums[run]:
|
||||
@@ -496,6 +500,3 @@ class RunSelector:
|
||||
f = open(os.path.expanduser(filename), "w")
|
||||
f.writelines(paths)
|
||||
f.close()
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user