fix_trajectory.py
Go to the documentation of this file.
1 # Author: M. Reichert
2 # Date : 21.03.2023
3 import numpy as np
4 
5 
6 # The trajectory downloaded from https://zenodo.org/record/6474694
7 # DOI: 10.5281/zenodo.6474694 , Version 1.1.1
8 # includes the same time with multiple thermodynamic entries.
9 # This non-monotonic time is not supported by the code and gets
10 # fixed with the following script:
11 path = "trajectory_ONe1p25nova"
12 time,temp,dens = np.loadtxt(path, skiprows=7,unpack=True)
13 mask = time[1:]-time[:-1] != 0
14 mask = np.append(mask, True)
15 out = np.array([time[mask],temp[mask],dens[mask]]).T
16 np.savetxt('trajectory_ONe1p25nova_mon_time', out, header="time [yrs] temperature [GK] density [g/cm^3]", fmt="%.16e %.6e %.6e")