Ratarmount support

This commit is contained in:
Noe Brucy
2022-11-24 16:44:44 +01:00
parent facb37d753
commit df84e6c2d5
3 changed files with 22 additions and 4 deletions
+8 -1
View File
@@ -412,8 +412,13 @@ class SnapshotProcessor(HDF5Container):
self.def_rules()
def init_pymses(self):
# If ratarmount was used
if os.path.exists(f"{self.path}/output_{self.num:05}/output_{self.num:05}"):
path = f"{self.path}/output_{self.num:05}"
else:
path = self.path
self._ro = pymses.RamsesOutput(
self.path,
path,
self.num,
order=self.params.pymses.order,
verbose=self.params.pymses.verbose,
@@ -1399,6 +1404,8 @@ class SnapshotProcessor(HDF5Container):
def _sinks(self):
csv_name = f"{self.path}/output_{self.num:05}/sink_{self.num:05}.csv"
if not os.path.exists(csv_name): # If ratarmount was used
csv_name = f"{self.path}/output_{self.num:05}/output_{self.num:05}/sink_{self.num:05}.csv"
f = open(csv_name)
first_line = f.readline()