Commit 32764733 authored by Daniel Johnson's avatar Daniel Johnson

Add phase plot to monitor script

parent e1d6a466
#!/bin/bash
folder=$1
for folder in "$@"
do
run=${folder##*/}
./power.py $folder
./plot_monitor.py $run
done
run=${folder##*/}
./power.py $folder
./plot_monitor.py $run
......@@ -7,17 +7,27 @@ import sys
run_name = sys.argv[1]
python_strain = np.loadtxt("./Extrapolated_Strain/"+run_name+"/"+run_name+"_strain_at_500.dat")
python_strain = np.loadtxt("./Extrapolated_Strain/"+run_name+"/"+run_name+"_radially_extrapolated_strain.dat")
python_phase = np.loadtxt("./Extrapolated_Strain/"+run_name+"/"+run_name+"_radially_extrapolated_phase.dat")
py_t = python_strain[:, 0]
py_hplus = python_strain[:, 1]
py_phase = python_phase[:, 1]
run_name_without_resolution = run_name.split("_")[0]
matplotlib.rcParams.update({'font.size': 12})
matplotlib.rcParams.update({'font.family': 'serif'})
plt.title(run_name_without_resolution)
plt.plot(py_t, py_hplus)
plt.xlim((0,None))
plt.ylabel('${\mathfrak{R}} [h(t)]$')
plt.xlabel('Time [M]')
plt.show()
plt.title(run_name_without_resolution)
plt.plot(py_t, py_phase)
plt.xlim((0,None))
plt.ylabel('$\phi$')
plt.xlabel('Time [M]')
plt.show()
......@@ -392,3 +392,5 @@ for sim_path in paths:
radially_extrapolated_h_cross = np.append(radially_extrapolated_h_cross, radially_extrapolated_amp[i] * math.sin(radially_extrapolated_phase[i]))
np.savetxt("./Extrapolated_Strain/"+sim+"/"+sim+"_radially_extrapolated_strain.dat", np.column_stack((t, radially_extrapolated_h_plus, radially_extrapolated_h_cross)))
np.savetxt("./Extrapolated_Strain/"+sim+"/"+sim+"_radially_extrapolated_amplitude.dat", np.column_stack((t, radially_extrapolated_amp)))
np.savetxt("./Extrapolated_Strain/"+sim+"/"+sim+"_radially_extrapolated_phase.dat", np.column_stack((t, radially_extrapolated_phase)))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment