[Commits] [svn:einsteintoolkit] Paper_EinsteinToolkit_2010/ (Rev. 138)

knarf at cct.lsu.edu knarf at cct.lsu.edu
Sun Oct 2 23:08:25 CDT 2011


User: knarf
Date: 2011/10/02 11:08 PM

Added:
 /examples/tov/
  ham_conv.pdf, ham_conv.py

Modified:
 /examples/tov/
  mode_spectrum.pdf

Log:
 script and plot for convergence factor of ham(x=0)

Directory Changes:

Directory: /svn:executable/
===========================

   + *
Directory: /svn:mime-type/
==========================

   + application/pdf

File Changes:

Directory: /examples/tov/
=========================

File [added]: ham_conv.pdf
Delta lines: +0 -0
===================================================================
(Binary files differ)



Property changes on: examples/tov/ham_conv.pdf
___________________________________________________________________

File [added]: ham_conv.py
Delta lines: +49 -0
===================================================================
--- examples/tov/ham_conv.py	                        (rev 0)
+++ examples/tov/ham_conv.py	2011-10-03 04:08:25 UTC (rev 138)
@@ -0,0 +1,49 @@
+#!/usr/bin/python
+
+# Plot evolution of convergence factor of hamiltonian constraint violation at x=0
+from plot_defaults import *
+import math
+
+# stuff
+xlim = (0,1400)
+ylim = (1.1,1.6)
+
+# load data
+Ft, F4 = np.loadtxt("tov_4/ml_bssn::ml_ham.x.asc.x0.bz2", comments="#", usecols=(8,12), unpack=True)
+Ft, F2 = np.loadtxt("tov_2/ml_bssn::ml_ham.x.asc.x0.bz2", comments="#", usecols=(8,12), unpack=True)
+
+for i in range(len(F2)):
+  F2[i] = math.log(abs(F4[i]/F2[i]),2)
+
+# Plot basics
+fig = plt.figure(figsize=(6, 3))
+fig.subplots_adjust(top=0.85, bottom=0.16, left=0.11,right=0.97)
+ax = fig.add_subplot(1,1,1)
+
+# plot
+ax.plot(Ft, F2, linestyle='-', color='black')
+
+# plot properties
+ax.set_xlim(xlim)
+ax.set_ylim(ylim) 
+
+#plt.title('PSD', fontsize=fontsize)
+
+ax.set_xlabel(r't [M]')
+ax.xaxis.set_major_locator(mticker.MaxNLocator(7))
+ax.xaxis.set_minor_locator(mticker.MaxNLocator(14))
+ax.xaxis.grid(False)
+ax2 = ax.twiny()
+ax2.set_xlabel(r't [ms]')
+ax2.set_xlim((ax.get_xlim()[0]/M_to_ms, ax.get_xlim()[1]/M_to_ms))
+ax2.xaxis.set_major_locator(mticker.MaxNLocator(7))
+ax2.xaxis.set_minor_locator(mticker.MaxNLocator(14))
+ax.set_ylabel(r'$\left|H\left(x=0\right)\right|$')
+ax.yaxis.set_major_locator(mticker.MaxNLocator(3))
+ax.yaxis.set_minor_locator(mticker.MaxNLocator(6))
+ax.yaxis.grid(False)
+set_tick_sizes(ax, 8, 4)
+
+#plt.show()
+plt.savefig('ham_conv.pdf')
+



Property changes on: examples/tov/ham_conv.py
___________________________________________________________________

File [modified]: mode_spectrum.pdf
Delta lines: +0 -0
===================================================================
(Binary files differ)



More information about the Commits mailing list