wreader.py
Go to the documentation of this file.
1 # Author: M. Reichert
2 # Date: 04.07.2024
3 import numpy as np
4 from tqdm import tqdm
5 from src_files.nucleus_multiple_class import nucleus_multiple
6 import h5py
7 import os
8 
9 
10 
11 class wreader(object):
12  """
13  Minimalistic class to lazily read WinNet data.
14  """
15 
16  def __init__(self, path, silent=False):
17  """
18  Initialize the class
19  - path: Path to the WinNet data
20  """
21  # The path to the WinNet run
22  self.path = path
23 
24  # Silent mode
25  self.silent = silent
26 
27  # The path to the hdf5 file
28  self.filename = os.path.join(path, "WinNet_data.h5")
29 
30  # The path to the snapshots in case of ascii mode
31  self.__snapshot_path = os.path.join(path, "snaps")
32 
33 
34 
35  @property
36  def is_crashed(self):
37  """
38  Check if the run has crashed
39  """
40  if not hasattr(self,"_wreader__is_crashed"):
41  self.__read_is_crashed()
42  return self.__is_crashed
43 
44 
45  def __read_is_crashed(self):
46  """
47  Read if the run has crashed
48  """
49  # Check existence finab
50  mode = self.check_existence('finab')
51  if mode==0:
52  self.__is_crashed = True
53  else:
54  self.__is_crashed = False
55 
56 
57 
58  @property
59  def A(self):
60  """
61  Mass number
62  """
63  if not hasattr(self,"_wreader__A"):
64  self.__read_A_Z_N()
65  return self.__A
66 
67  def __read_A_Z_N(self):
68  """
69  Read the mass number A
70  """
71  # Check if Ascii (mode = 2), hdf5 (mode = 1), or not present (mode = 0)
72  mode = self.check_existence('snapshot')
73 
74  if mode == 2:
75  self.__N, self.__Z = np.loadtxt(os.path.join(self.__snapshot_path, "snapsh_0001.dat"),unpack=True, usecols=(0,1),
76  skiprows=3,dtype=int)
77  self.__A = self.__N + self.__Z
78  elif mode == 1:
79  with h5py.File(self.filename, 'r') as hf:
80  self.__A = hf['snapshots/A'][:]
81  self.__Z = hf['snapshots/Z'][:]
82  self.__N = hf['snapshots/N'][:]
83  elif mode == 0:
84  error_msg = 'Failed to read A, Z, and N in "'+str(self.path)+'". '+\
85  'Snapshots not present as Ascii nor as Hdf5!'
86  raise ValueError(error_msg)
87 
88  @property
89  def Z(self):
90  """
91  Atomic number
92  """
93  if not hasattr(self,"_wreader__Z"):
94  self.__read_A_Z_N()
95  return self.__Z
96 
97  @property
98  def N(self):
99  """
100  Neutron number
101  """
102  if not hasattr(self,"_wreader__N"):
103  self.__read_A_Z_N()
104  return self.__N
105 
106 
107  def __read_snapshots(self):
108  """
109  Read the snapshots
110  """
111  # Check if Ascii (mode = 2), hdf5 (mode = 1), or not present (mode = 0)
112  mode = self.check_existence('snapshot')
113 
114  if mode == 2:
115  # Get list of files (no directories)
116  snapshot_files = [f for f in os.listdir(self.__snapshot_path) if os.path.isfile(os.path.join(self.__snapshot_path, f))]
117  # Now only take files that start with a 'snapsh_'
118  snapshot_files = [f for f in snapshot_files if f.startswith('snapsh_')]
119  self.__snapshots_time = np.zeros(len(snapshot_files))
120  self.__snapshots_Y = np.zeros((len(snapshot_files), len(self.A)))
121  self.__snapshots_X = np.zeros((len(snapshot_files), len(self.A)))
122  for i, f in enumerate(tqdm(snapshot_files, desc='Reading snapshots', disable=self.silent)):
123  fname = 'snapsh_' + str(i+1).zfill(4) + '.dat'
124  with open(os.path.join(self.__snapshot_path, fname), 'r') as file:
125  lines = file.readlines()
126  self.__snapshots_time[i] = float(lines[1].split()[0])
127  for j, line in enumerate(lines[3:]):
128  self.__snapshots_Y[i, j] = float(line.split()[2])
129  self.__snapshots_X[i, j] = float(line.split()[3])
130  elif mode == 1:
131  with h5py.File(self.filename, 'r') as hf:
132  self.__snapshots_time = hf['snapshots/time'][:]
133  self.__snapshots_Y = hf['snapshots/Y'][:]
134  self.__snapshots_X = self.__snapshots_Y*self.A
135  elif mode == 0:
136  error_msg = 'Failed to read timescales in "'+str(self.path)+'". '+\
137  'Not present as Ascii nor as Hdf5!'
138  raise ValueError(error_msg)
139 
140 
141 
142  def check_existence(self, entry):
143  """
144  Check whether an entry is in the hdf5 format (return 1),
145  or in the ascii format (return 2), or does not exist (return 0)
146  """
147  if (entry == 'mainout'):
148  value = self.__check_files('mainout.dat','mainout')
149  elif (entry == 'timescales'):
150  value = self.__check_files('timescales.dat','timescales')
151  elif (entry == 'energy'):
152  value = self.__check_files('generated_energy.dat','energy')
153  elif (entry == 'tracked_nuclei'):
154  value = self.__check_files('tracked_nuclei.dat','tracked_nuclei')
155  elif (entry == 'snapshot'):
156  value = self.__check_files('snaps/snapsh_0001.dat','snapshots')
157  elif (entry == 'flows'):
158  value = self.__check_files('flow/flow_0001.dat','flows')
159  elif (entry == "nuloss"):
160  value = self.__check_files('nu_loss_gain.dat','nu_loss_gain')
161  elif (entry == 'finab'):
162  value = self.__check_files('finab.dat','finab')
163  elif (entry == 'finabsum'):
164  value = self.__check_files('finabsum.dat','finab')
165  elif (entry == 'finabelem'):
166  value = self.__check_files('finabelem.dat','finab')
167  else:
168  error_msg = 'Checked for unknown entry "'+str(entry)+'". '
169  raise ValueError(error_msg)
170 
171  return value
172 
173 
174  def __check_files(self, ascii_file_path, hdf5_key):
175  '''
176  Check if something exists in hdf5 or ascii
177  '''
178  value = 0
179  if not os.path.exists(self.filename):
180  if not os.path.exists(os.path.join(self.path, ascii_file_path)):
181  value = 0
182  else:
183  value = 2
184  else:
185  try:
186  with h5py.File(self.filename, 'r') as hf:
187  if hdf5_key in hf.keys():
188  value = 1
189  elif os.path.exists(os.path.join(self.path, ascii_file_path)):
190  value = 2
191  else:
192  value = 0
193  except OSError:
194  # Not able to read the file
195  value = 0
196 
197  return value
198 
199  @property
200  def nr_of_snaps(self):
201  """
202  Number of snapshots
203  """
204  if not hasattr(self,"_wreader__nr_of_snaps"):
205  self.__read_nr_of_snaps()
206  return self.__nr_of_snaps
207 
209  """
210  Read the number of snapshots
211  """
212  # Check if Ascii (mode = 2), hdf5 (mode = 1), or not present (mode = 0)
213  mode = self.check_existence('snapshot')
214 
215  if mode == 2:
216  snapshot_files = [f for f in os.listdir(self.__snapshot_path) if os.path.isfile(os.path.join(self.__snapshot_path, f))]
217  snapshot_files = [f for f in snapshot_files if f.startswith('snapsh_')]
218  self.__nr_of_snaps = len(snapshot_files)
219  elif mode == 1:
220  with h5py.File(self.filename, 'r') as hf:
221  self.__nr_of_snaps = len(hf['snapshots/time'][:])
222  elif mode == 0:
223  error_msg = 'Failed to read nr of snapshots in "'+str(self.path)+'". '+\
224  'Not present as Ascii nor as Hdf5!'
225  raise ValueError(error_msg)
226 
227  @property
228  def tracked_nuclei(self):
229  """
230  Get the tracked nuclei
231  """
232  if not hasattr(self,"_wreader__tracked_nuclei"):
233  self.__read_tracked_nuclei()
234  return self.__tracked_nuclei
235 
237  """
238  Read the tracked nuclei
239  """
240  # Check if Ascii (mode = 2), hdf5 (mode = 1), or not present (mode = 0)
241  mode = self.check_existence('tracked_nuclei')
242  self.__tracked_nuclei = {}
243 
244  if mode == 2:
245  # self.__tracked_nuclei = np.loadtxt(os.path.join(self.path, "tracked_nuclei.dat"), unpack=True)
246  path = os.path.join(self.path, "tracked_nuclei.dat")
247  with open(path, 'r') as f:
248  first_line = f.readline()
249 
250  first_line = first_line.replace('Y(','')
251  first_line = first_line.replace(')','')
252  first_line = first_line.replace('#','')
253  track_nuclei_names = first_line.split()[1:] # Since the first entry is "time"
254  track_nuclei_data = np.loadtxt(path, skiprows=1)
255  nm = nucleus_multiple(names=track_nuclei_names)
256  Z = nm.Z
257  N = nm.N
258  A = nm.A
259  Xnuclei = track_nuclei_data[:,1:]*A
260  self.__tracked_nuclei['time'] = track_nuclei_data[:,0]
261  self.__tracked_nuclei['Z'] = Z
262  self.__tracked_nuclei['N'] = N
263  self.__tracked_nuclei['A'] = A
264  self.__tracked_nuclei['names'] = track_nuclei_names
265  elnames = nm.elnames
266  self.__tracked_nuclei['latex_names'] = [r"$^{"+str(A[i])+r"}$"+elnames[i].title() for i in range(len(A))]
267  for i, name in enumerate(track_nuclei_names):
268  self.__tracked_nuclei[name] = Xnuclei[:,i]
269  elif mode == 1:
270  with h5py.File(self.filename, 'r') as hf:
271  self.__tracked_nuclei['Z'] = hf['tracked_nuclei/Z'][:]
272  self.__tracked_nuclei['N'] = hf['tracked_nuclei/N'][:]
273  self.__tracked_nuclei['A'] = hf['tracked_nuclei/A'][:]
274  self.__tracked_nuclei['time'] = hf['tracked_nuclei/time'][:]
275  Xnuclei = hf['tracked_nuclei/Y'][:,:] * self.__tracked_nuclei['A']
276  nm = nucleus_multiple(Z=self.__tracked_nuclei['Z'], N=self.__tracked_nuclei['N'])
277  self.__tracked_nuclei['names'] = nm.names
278  for i, name in enumerate(nm.names):
279  self.__tracked_nuclei[name] = Xnuclei[:,i]
280 
281  elnames = nm.elnames
282  A = self.__tracked_nuclei['A']
283  self.__tracked_nuclei['latex_names'] = [r"$^{"+str(A[i])+r"}$"+elnames[i].title() for i in range(len(A))]
284  elif mode == 0:
285  error_msg = 'Failed to read tracked nuclei in "'+str(self.path)+'". '+\
286  'Not present as Ascii nor as Hdf5!'
287  raise ValueError(error_msg)
288 
289  @property
290  def Y(self):
291  """
292  Get abundance at snapshot idx
293  """
294  if not hasattr(self,"_wreader__snapshots_time"):
295  self.__read_snapshots()
296  return self.__snapshots_Y
297 
298  @property
299  def X(self):
300  """
301  Get mass fraction at snapshot idx
302  """
303  if not hasattr(self,"_wreader__snapshots_time"):
304  self.__read_snapshots()
305  return self.__snapshots_X
306 
307  @property
308  def snapshot_time(self):
309  """
310  Get time at snapshot idx
311  """
312  if not hasattr(self,"_wreader__snapshots_time"):
313  self.__read_snapshots()
314  return self.__snapshots_time
315 
316  @property
317  def tau(self):
318  """
319  Get the timescale of "tau", e.g., "tau_ag"
320  """
321  if not hasattr(self,"_wreader__timescales"):
322  self.__read_timescales()
323  return self.__timescales
324 
325 
326  @property
327  def nuloss(self):
328  """
329  Get the neutrino losses and gains
330  """
331  if not hasattr(self,"_wreader__nuloss"):
332  self.__read_nuloss()
333  return self.__nuloss
334 
335 
336  def __read_nuloss(self):
337  """
338  Read the neutrino losses and gains
339  """
340  # Check if Ascii (mode = 2), hdf5 (mode = 1), or not present (mode = 0)
341  mode = self.check_existence('nuloss')
342 
343  if mode == 2:
344  columns = ["time", "temp", "dens", "rad", "nu_total", "nu_beta", "nu_nuheat", "nu_thermal"]
345  data = np.loadtxt(os.path.join(self.path, "nu_loss_gain.dat"), unpack=True)
346  self.__nuloss = {}
347  for i, col in enumerate(columns):
348  self.__nuloss[col] = data[i]
349  elif mode == 1:
350  with h5py.File(self.filename, 'r') as hf:
351  self.__nuloss = {}
352  for key in hf['nu_loss_gain'].keys():
353  self.__nuloss[key] = hf['nu_loss_gain'][key][:]
354  elif mode == 0:
355  error_msg = 'Failed to read nuloss in "'+str(self.path)+'". '+\
356  'Not present as Ascii nor as Hdf5!'
357  raise ValueError(error_msg)
358 
359 
360  def __read_timescales(self):
361  """
362  Read the timescales
363  """
364  # Check if Ascii (mode = 2), hdf5 (mode = 1), or not present (mode = 0)
365  mode = self.check_existence('timescales')
366 
367  if (mode == 2):
368  self.__timescales = {}
369  with open(os.path.join(self.path, "timescales.dat"), 'r') as f:
370  lines = f.readlines()
371  header = lines[0]
372  header = header.replace('#', '').replace('[s]', '').replace('[GK]', '')
373  key = header.split()
374  data = np.loadtxt(os.path.join(self.path, "timescales.dat"), unpack=True)
375  for i, k in enumerate(key):
376  self.__timescales[k] = data[i]
377 
378  elif (mode == 1):
379  with h5py.File(self.filename, 'r') as hf:
380  self.__timescales = {}
381  for key in hf['timescales'].keys():
382  self.__timescales[key] = hf['timescales'][key][:]
383  elif (mode == 0):
384  error_msg = 'Failed to read timescales in "'+str(self.path)+'". '+\
385  'Not present as Ascii nor as Hdf5!'
386  raise ValueError(error_msg)
387 
388 
389  @property
390  def mainout(self):
391  """
392  Get an entry from the mainout
393  """
394  if not hasattr(self,"_wreader__mainout"):
395  self.__read_mainout()
396  return self.__mainout
397 
398  def __read_mainout(self):
399  """
400  Read the mainout
401  """
402  # Check if Ascii (mode = 2), hdf5 (mode = 1), or not present (mode = 0)
403  mode = self.check_existence('mainout')
404 
405  if mode == 2:
406  columns = ['iteration', 'time', 'temp', 'dens', 'ye',
407  'rad', 'yn', 'yp', 'ya', 'ylight', 'yheavy',
408  'zbar', 'abar', 'entr']
409  data = np.loadtxt(os.path.join(self.path, "mainout.dat"), unpack=True)
410  self.__mainout = {}
411  for i, col in enumerate(columns):
412  self.__mainout[col] = data[i]
413  elif mode == 1:
414  with h5py.File(self.filename, 'r') as hf:
415  self.__mainout = {}
416  for key in hf['mainout'].keys():
417  self.__mainout[key] = hf['mainout'][key][:]
418  elif mode == 0:
419  error_msg = 'Failed to read mainout in "'+str(self.path)+'". '+\
420  'Not present as Ascii nor as Hdf5!'
421  raise ValueError(error_msg)
422 
423 
424  @property
425  def energy(self):
426  """
427  Get the energy
428  """
429  if not hasattr(self,"_wreader__energy"):
430  self.__read_energy()
431  return self.__energy
432 
433  def __read_energy(self):
434  """
435  Read the energy
436  """
437  # Check if Ascii (mode = 2), hdf5 (mode = 1), or not present (mode = 0)
438  mode = self.check_existence('energy')
439 
440  if mode == 2:
441  columns = ['time', 'engen_tot', 'S_src', 'engen_beta', 'engen_ng_gn', 'engen_pg_gp',
442  'engen_ag_ga', 'engen_np_pn', 'engen_na_an', 'engen_ap_pa', 'engen_fiss']
443  data = np.loadtxt(os.path.join(self.path, "generated_energy.dat"), unpack=True)
444  self.__energy = {}
445  for i, col in enumerate(columns):
446  self.__energy[col] = data[i]
447  elif mode == 1:
448  with h5py.File(self.filename, 'r') as hf:
449  self.__energy = {}
450  for key in hf['energy'].keys():
451  self.__energy[key] = hf['energy'][key][:]
452  elif mode == 0:
453  error_msg = 'Failed to read energy in "'+str(self.path)+'". '+\
454  'Not present as Ascii nor as Hdf5!'
455  raise ValueError(error_msg)
456 
457  @property
458  def finab(self):
459  """
460  Get the final abundances from the finab.dat file
461  """
462  if not hasattr(self,"_wreader__finab"):
463  self.__read_finab()
464  return self.__finab
465 
466  def __read_finab(self):
467  """
468  Reader of the finab
469  """
470  # Check if Ascii (mode = 2), hdf5 (mode = 1), or not present (mode = 0)
471  mode = self.check_existence('finab')
472  if mode == 2:
473  A,Z,N,Y,X = np.loadtxt(os.path.join(self.path, "finab.dat"), unpack=True)
474  elif mode == 1:
475  with h5py.File(self.filename, 'r') as hf:
476  A = hf['finab/finab/A'][:]
477  Z = hf['finab/finab/Z'][:]
478  N = A-Z
479  Y = hf['finab/finab/Y'][:]
480  X = hf['finab/finab/X'][:]
481  elif mode == 0:
482  error_msg = 'Failed to read finab in "'+str(self.path)+'". '+\
483  'Not present as Ascii nor as Hdf5!'
484  raise ValueError(error_msg)
485  self.__finab = {"A": A, "Z": Z, "N": N, "Y": Y, "X": X}
486 
487 
488  @property
489  def finabsum(self):
490  """
491  Get the final abundances from the finabsum.dat file
492  """
493  if not hasattr(self,"_wreader__finabsum"):
494  self.__read_finabsum()
495  return self.__finabsum
496 
497  def __read_finabsum(self):
498  """
499  Reader of the finabsum
500  """
501  # Check if Ascii (mode = 2), hdf5 (mode = 1), or not present (mode = 0)
502  mode = self.check_existence('finabsum')
503  if mode == 2:
504  A,Y,X = np.loadtxt(os.path.join(self.path, "finabsum.dat"), unpack=True)
505  elif mode == 1:
506  with h5py.File(self.filename, 'r') as hf:
507  A = hf['finab/finabsum/A'][:]
508  Y = hf['finab/finabsum/Y'][:]
509  X = hf['finab/finabsum/X'][:]
510  elif mode == 0:
511  error_msg = 'Failed to read finabsum in "'+str(self.path)+'". '+\
512  'Not present as Ascii nor as Hdf5!'
513  raise ValueError(error_msg)
514  self.__finabsum = {"A": A, "Y": Y, "X": X}
515 
516 
517  @property
518  def finabelem(self):
519  """
520  Get the final abundances from the finabelem.dat file
521  """
522  if not hasattr(self,"_wreader__finabelem"):
523  self.__read_finabelem()
524  return self.__finabelem
525 
526 
527  def __read_out(self):
528  """
529  Read the OUT file
530  """
531  path = os.path.join(self.path,"OUT")
532 
533  self.__out_data = {}
534 
535  if os.path.isfile(path):
536  with open(path,"r") as f:
537  lines = f.readlines()
538 
539  for ind,l in enumerate(lines[::-1]):
540  # Read iterations and time in the last lines
541  if "iterations" in l:
542  self.__out_data["num_iterations"] =int(l.split()[4])
543  elif "Elapsed time:" in l:
544  self.__out_data["elapsed_time"] = float(l.split()[3])
545  elif "Final time:" in l:
546  self.__out_data["final_time"] = float(l.split()[-1])
547  elif "Expansion velocity" in l:
548  self.__out_data["exp_velocity"] = float(l.split()[-2])
549  elif l.strip() == "============================":
550  final_stats = True
551  elif final_stats:
552  self.__out_data["final_entropy"] = float(l.split()[-1])
553  self.__out_data["final_density"] = float(l.split()[-2])
554  self.__out_data["final_temperature"] = float(l.split()[-3])
555  final_stats = False
556 
557 
558 
559  @property
560  def out_data(self):
561  """
562  Get the data from the OUT file
563  """
564  if not hasattr(self,"_wreader__out_data"):
565  self.__read_out()
566  return self.__out_data
567 
568 
569  def __read_finabelem(self):
570  """
571  Reader of the finabsum
572  """
573  # Check if Ascii (mode = 2), hdf5 (mode = 1), or not present (mode = 0)
574  mode = self.check_existence('finabelem')
575  if mode == 2:
576  Z, Y = np.loadtxt(os.path.join(self.path, "finabelem.dat"), unpack=True)
577  elif mode == 1:
578  with h5py.File(self.filename, 'r') as hf:
579  Z = hf['finab/finabelem/Z'][:]
580  Y = hf['finab/finabelem/Y'][:]
581  elif mode == 0:
582  error_msg = 'Failed to read finabelem in "'+str(self.path)+'". '+\
583  'Not present as Ascii nor as Hdf5!'
584  raise ValueError(error_msg)
585  self.__finabelem = {"Z": Z, "Y": Y}
586 
587  def flow_entry(self, iteration, flow_group='flows'):
588  """
589  Get the flow entry
590  """
591  mode = self.check_existence('flows')
592 
593  if mode == 2:
594  fname = os.path.join(self.path, "flow/flow_" + str(iteration).zfill(4) + ".dat")
595  with open(fname, 'r') as f:
596  lines = f.readlines()
597  header = lines[1]
598  time, temp, dens = np.array(header.split()).astype(float)
599 
600  # Read the whole flow
601  nin,zin,yin,nout,zout,yout,flows = np.loadtxt(fname, unpack=True, skiprows=3)
602  nin = nin.astype(int)
603  zin = zin.astype(int)
604  nout = nout.astype(int)
605  zout = zout.astype(int)
606  flow = {}
607  flow['time'] = time
608  flow['temp'] = temp
609  flow['dens'] = dens
610  flow['n_in'] = nin
611  flow['p_in'] = zin
612  flow['y_in'] = yin
613  flow['n_out'] = nout
614  flow['p_out'] = zout
615  flow['y_out'] = yout
616  flow['flow'] = flows
617  elif mode == 1:
618  with h5py.File(self.filename, 'r') as hf:
619  flow = {}
620  for key in hf[flow_group][str(iteration)].keys():
621  flow[key] = hf[flow_group][str(iteration)][key][:]
622  elif mode == 0:
623  error_msg = 'Failed to read flow in "'+str(self.path)+'". '+\
624  'Not present as Ascii nor as Hdf5!'
625  raise ValueError(error_msg)
626 
627  return flow
628 
629 
630  def __getitem__(self, key):
631  """
632  Get the value of a specific key.
633  """
634  if key == "mainout":
635  return self.mainout
636  elif key == "timescales":
637  return self.tau
638  elif key == "energy":
639  return self.energy
640  elif key == "tracked_nuclei":
641  return self.tracked_nuclei
642  elif key == "nuloss":
643  return self.nuloss
644 
645 
646 
647 if __name__ == "__main__":
648  w = wreader('/home/mreichert/data/Networks/comparison_winNet/WinNet-dev/runs/Example_MRSN_r_process_winteler')
649  w.tracked_nuclei
650  pass
src_files.wreader.wreader.__N
__N
Definition: wreader.py:82
src_files.wreader.wreader.__getitem__
def __getitem__(self, key)
Definition: wreader.py:583
src_files.wreader.wreader.__read_energy
def __read_energy(self)
Definition: wreader.py:429
src_files.wreader.wreader.__read_tracked_nuclei
def __read_tracked_nuclei(self)
Definition: wreader.py:232
src_files.wreader.wreader.__nuloss
__nuloss
Definition: wreader.py:342
src_files.wreader.wreader.nuloss
def nuloss(self)
Definition: wreader.py:323
src_files.wreader.wreader.finabelem
def finabelem(self)
Definition: wreader.py:514
src_files.wreader.wreader.__read_nr_of_snaps
def __read_nr_of_snaps(self)
Definition: wreader.py:204
src_files.wreader.wreader.__init__
def __init__(self, path, silent=False)
Definition: wreader.py:16
src_files.wreader.wreader.path
path
Definition: wreader.py:22
src_files.wreader.wreader.flow_entry
def flow_entry(self, iteration, flow_group='flows')
Definition: wreader.py:540
src_files.wreader.wreader.tracked_nuclei
def tracked_nuclei(self)
Definition: wreader.py:224
src_files.wreader.wreader.__read_finabelem
def __read_finabelem(self)
Definition: wreader.py:522
src_files.wreader.wreader.A
def A(self)
Definition: wreader.py:59
src_files.wreader.wreader.__nr_of_snaps
__nr_of_snaps
Definition: wreader.py:214
src_files.wreader.wreader.__energy
__energy
Definition: wreader.py:440
src_files.wreader.wreader.__read_mainout
def __read_mainout(self)
Definition: wreader.py:394
src_files.wreader.wreader.tau
def tau(self)
Definition: wreader.py:313
src_files.wreader.wreader.__snapshots_time
__snapshots_time
Definition: wreader.py:119
src_files.wreader.wreader.out_data
def out_data(self)
Definition: wreader.py:560
src_files.wreader.wreader.finabsum
def finabsum(self)
Definition: wreader.py:485
src_files.wreader.wreader.__tracked_nuclei
__tracked_nuclei
Definition: wreader.py:238
src_files.wreader.wreader.filename
filename
Definition: wreader.py:28
src_files.wreader.wreader.__read_is_crashed
def __read_is_crashed(self)
Definition: wreader.py:45
src_files.wreader.wreader.Y
def Y(self)
Definition: wreader.py:286
src_files.wreader.wreader.__out_data
__out_data
Definition: wreader.py:533
src_files.wreader.wreader.__snapshots_Y
__snapshots_Y
Definition: wreader.py:120
src_files.wreader.wreader.__read_snapshots
def __read_snapshots(self)
Definition: wreader.py:107
src_files.wreader.wreader.__read_finab
def __read_finab(self)
Definition: wreader.py:462
src_files.wreader.wreader.__read_A_Z_N
def __read_A_Z_N(self)
Definition: wreader.py:67
src_files.wreader.wreader.__read_timescales
def __read_timescales(self)
Definition: wreader.py:356
src_files.wreader.wreader.check_existence
def check_existence(self, entry)
Definition: wreader.py:142
src_files.wreader.wreader.__A
__A
Definition: wreader.py:77
src_files.wreader.wreader.finab
def finab(self)
Definition: wreader.py:454
src_files.wreader.wreader.__mainout
__mainout
Definition: wreader.py:406
src_files.wreader.wreader.__is_crashed
__is_crashed
Definition: wreader.py:52
src_files.wreader.wreader.silent
silent
Definition: wreader.py:25
src_files.wreader.wreader.__finab
__finab
Definition: wreader.py:481
src_files.wreader.wreader.__snapshot_path
__snapshot_path
Definition: wreader.py:31
src_files.wreader.wreader.__timescales
__timescales
Definition: wreader.py:364
src_files.wreader.wreader.mainout
def mainout(self)
Definition: wreader.py:386
src_files.wreader.wreader.N
def N(self)
Definition: wreader.py:98
src_files.nucleus_multiple_class.nucleus_multiple
Definition: nucleus_multiple_class.py:10
src_files.wreader.wreader.__read_finabsum
def __read_finabsum(self)
Definition: wreader.py:493
src_files.wreader.wreader.energy
def energy(self)
Definition: wreader.py:421
src_files.wreader.wreader.__finabelem
__finabelem
Definition: wreader.py:538
src_files.nucleus_multiple_class
Definition: nucleus_multiple_class.py:1
src_files.wreader.wreader.is_crashed
def is_crashed(self)
Definition: wreader.py:36
src_files.wreader.wreader.__snapshots_X
__snapshots_X
Definition: wreader.py:121
src_files.wreader.wreader.__check_files
def __check_files(self, ascii_file_path, hdf5_key)
Definition: wreader.py:174
src_files.wreader.wreader.__finabsum
__finabsum
Definition: wreader.py:510
src_files.wreader.wreader
Definition: wreader.py:11
src_files.wreader.wreader.nr_of_snaps
def nr_of_snaps(self)
Definition: wreader.py:196
src_files.wreader.wreader.X
def X(self)
Definition: wreader.py:295
src_files.wreader.wreader.Z
def Z(self)
Definition: wreader.py:89
src_files.wreader.wreader.__read_out
def __read_out(self)
Definition: wreader.py:527
src_files.wreader.wreader.__Z
__Z
Definition: wreader.py:75
src_files.wreader.wreader.__read_nuloss
def __read_nuloss(self)
Definition: wreader.py:332
src_files.wreader.wreader.snapshot_time
def snapshot_time(self)
Definition: wreader.py:304