[Commits] [svn:einsteintoolkit] www/ (Rev. 1514)

barry.wardell at gmail.com barry.wardell at gmail.com
Sun Jun 5 17:03:44 CDT 2016


User: barry.wardell
Date: 2016/06/05 05:03 PM

Added:
 /about/gallery/gw150914/
  Makefile, configure, trajectories.m, waveform.m

Log:
 gw150915: Add scripts and Makefile for plots

Directory Changes:

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

   + *

File Changes:

Directory: /about/gallery/gw150914/
===================================

File [added]: Makefile
Delta lines: +12 -0
===================================================================
--- about/gallery/gw150914/Makefile	                        (rev 0)
+++ about/gallery/gw150914/Makefile	2016-06-05 22:03:44 UTC (rev 1514)
@@ -0,0 +1,12 @@
+
+PLOTS = $(patsubst %.m,%.png,$(wildcard *.m))
+
+-include make.conf
+
+all: $(PLOTS)
+
+$(PLOTS): %.png : %.m
+	MathematicaScript -script $< --simulations-directory $(SIMULATIONS_DIRECTORY)
+
+clean:
+	rm -f $(PLOTS)

File [added]: configure
Delta lines: +10 -0
===================================================================
--- about/gallery/gw150914/configure	                        (rev 0)
+++ about/gallery/gw150914/configure	2016-06-05 22:03:44 UTC (rev 1514)
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+set -u
+set -e
+
+printf "Enter path to simulation directory: "
+read simdir
+echo "SIMULATIONS_DIRECTORY = $simdir" > make.conf
+
+echo "Wrote make.conf"



Property changes on: about/gallery/gw150914/configure
___________________________________________________________________

File [added]: trajectories.m
Delta lines: +28 -0
===================================================================
--- about/gallery/gw150914/trajectories.m	                        (rev 0)
+++ about/gallery/gw150914/trajectories.m	2016-06-05 22:03:44 UTC (rev 1514)
@@ -0,0 +1,28 @@
+
+<< SimulationTools`;
+
+simDir = Replace[$ScriptCommandLine,
+  {{___,"--simulations-directory", val_,___} :> val,
+    _ :> None}];
+
+$SimulationPath = Prepend[$SimulationPath, simDir];
+
+outDir = Directory[];
+
+sim = "GW150914_28";
+
+trajs = ReadBHTrajectories[sim];
+relTrajs = trajs[[1]] - trajs[[2]];
+
+trajPlot = 
+  Framed[ListLinePlot[relTrajs,
+    PlotTheme -> "Detailed", 
+    AspectRatio -> Automatic, LabelStyle -> "Medium", 
+    FrameLabel -> {"(\!\(\*SubscriptBox[\(x\), \(1\)]\)-\!\(\*SubscriptBox[\(x\
+      \), \(2\)]\))/M", 
+      "(\!\(\*SubscriptBox[\(y\), \(1\)]\)-\!\(\*SubscriptBox[\(y\), \
+        \(2\)]\))/M"}, ImageMargins -> 20, Background -> White, ImageSize -> 200, 
+    PlotRange -> {{-1, 1}, {-1, 1}} 12, 
+    PlotStyle -> Directive[Black, AbsoluteThickness[1]]], FrameMargins -> None];
+
+Export[FileNameJoin[{outDir, "trajectories.png"}], Magnify[trajPlot,2]];

File [added]: waveform.m
Delta lines: +29 -0
===================================================================
--- about/gallery/gw150914/waveform.m	                        (rev 0)
+++ about/gallery/gw150914/waveform.m	2016-06-05 22:03:44 UTC (rev 1514)
@@ -0,0 +1,29 @@
+
+<< SimulationTools`;
+
+simDir = Replace[$ScriptCommandLine,
+  {{___,"--simulations-directory", val_,___} :> val,
+    _ :> None}];
+
+$SimulationPath = Prepend[$SimulationPath, simDir];
+
+outDir = Directory[];
+
+sim = "GW150914_28";
+
+r0 = 500;
+M = ReadADMMass[sim];
+Psi422 = Shifted[r0 ReadPsi4[sim, 2, 2, r0], -RadialToTortoise[r0, M]];
+omega0 = 0.05;
+h22 = StrainFromPsi4[Psi422, omega0];
+
+waveformPlot = 
+ Framed[ListLinePlot[{Re[h22]}, PlotTheme -> "Detailed", PlotRange -> {{0,1000},{-0.5,0.5}},
+    LabelStyle -> "Medium", 
+   FrameLabel -> {"(t-\!\(\*SuperscriptBox[\(r\), \(*\)]\))/M", 
+     "Re[\!\(\*SuperscriptBox[SubscriptBox[\(h\), \(+\)], \(2, 2\)]\)]"}, 
+   ImageMargins -> 20, Background -> White, ImageSize -> 500, 
+   AspectRatio -> 1/4, PlotStyle -> Directive[Black, AbsoluteThickness[1]]], 
+  FrameMargins -> None];
+
+Export[FileNameJoin[{outDir, "waveform.png"}], Magnify[waveformPlot,2]];



More information about the Commits mailing list