Skip to content
Snippets Groups Projects
Commit 2c4c4929 authored by Yngve Levinsen's avatar Yngve Levinsen
Browse files

add v11 Density_Env,

correcting the amount of data per step in v11 Density_PAR?
parent 17cd13ff
No related branches found
No related tags found
No related merge requests found
......@@ -745,8 +745,10 @@ class density_file:
numpy.fromfile(self.fin, dtype=numpy.int16, count=300 // 2)
elif self.version == 10:
numpy.fromfile(self.fin, dtype=numpy.int16, count=356 // 2)
elif self.version == 11:
numpy.fromfile(self.fin, dtype=numpy.int16, count=364 // 2)
else:
raise TypeError("It is not possible to read this format..")
raise TypeError(f"It is not possible to read {self.filename}")
elif self.Nrun > 1:
# WARN not 100% sure if this is correct..
if self.version <= 9:
......@@ -758,7 +760,7 @@ class density_file:
self.fin, dtype=numpy.int16, count=((20796 + self.Nrun * 12) // 2)
)
else:
raise TypeError("It is not possible to read this format..")
raise TypeError(f"It is not possible to read {self.filename}")
elif self.version == 8:
numpy.fromfile(self.fin, dtype=numpy.int16, count=12344 // 2)
elif self.version == 9:
......@@ -766,9 +768,9 @@ class density_file:
elif self.version == 10:
numpy.fromfile(self.fin, dtype=numpy.int16, count=12408 // 2)
elif self.version == 11:
numpy.fromfile(self.fin, dtype=numpy.int16, count=12416 // 2)
numpy.fromfile(self.fin, dtype=numpy.int16, count=8816 // 2)
else:
raise TypeError("It is not possible to read this format..")
raise TypeError(f"It is not possible to read {self.filename}")
def _get_7dim_array(array):
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment