Skip to content
Snippets Groups Projects
Commit ef491687 authored by 数学の武士's avatar 数学の武士
Browse files

Hotfiz plt reader

parent d92096d8
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@ class ProcData:
file_data = file.read().split('\n')
file.close()
names = [variable_name.replace(" ", "").replace('"' , "") for variable_name in file_data[1].split('=')[1].split(',')]
names = [variable_name.replace('"' , "") for variable_name in file_data[1].split('=')[1].split(',')]
self.variable_names = np.array(names, dtype=object)
def __get_variable_names_bin(self):
......@@ -100,7 +100,7 @@ class ProcData:
J = int(file_data[2].split(',')[1].split('=')[1])
K = int(file_data[2].split(',')[2].split('=')[1])
file_data = np.loadtxt(self.filename, dtype = float, delimiter=' ', skiprows=3, unpack=False, ndmin=2, encoding='bytes')
file_data = np.loadtxt(self.filename, dtype = float, skiprows=3, unpack=False, ndmin=2, encoding='utf-8')
file_data = file_data.T
if self.var == None:
......@@ -266,6 +266,8 @@ class ProcData:
self.var = column_names
self.mval = mval
# print(ndim, self.filename)
if filename_extension == '.plt':
self.__read_plt(ndim)
elif filename_extension == '.nsx':
......
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