Ratarmount support
This commit is contained in:
@@ -282,9 +282,14 @@ 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_folder = f"{self.path_in}/{run}/info/info_{num:05}.txt"
|
||||
if os.path.exists(info_filename_output):
|
||||
info = read_ramses_info_file(info_filename_output)
|
||||
elif os.path.exists(info_filename_tarmount_output):
|
||||
info = read_ramses_info_file(info_filename_tarmount_output)
|
||||
elif self.allow_nodata:
|
||||
info = read_ramses_info_file(info_filename_folder)
|
||||
else:
|
||||
@@ -479,7 +484,10 @@ class RunSelector:
|
||||
paths = []
|
||||
for run in self.nums:
|
||||
for num in self.nums[run]:
|
||||
paths.append(f"{prefix}/{run}/output_{num:05}\n")
|
||||
if os.path.exists("{prefix}/{run}/output_{num:05}/output_{num:05}\n"):
|
||||
paths.append(f"{prefix}/{run}/output_{num:05}/output_{num:05}\n")
|
||||
else:
|
||||
paths.append(f"{prefix}/{run}/output_{num:05}\n")
|
||||
f = open(os.path.expanduser(filename), "w")
|
||||
f.writelines(paths)
|
||||
f.close()
|
||||
|
||||
Reference in New Issue
Block a user