Browse Source

fixes typo in paper table and adds scripts for presentation animations

Caleb Fangmeier 7 years ago
parent
commit
9a68292c9d

BIN
build/comprehensive.pdf


+ 1 - 1
comprehensive.tex

@@ -446,7 +446,7 @@ In the first Advanced LIGO science run, which started on September 12, 2015 and
                                                       & GW150914               & GW151226               \\
     \midrule
     Primary mass        $m_1/M_{\astrosun}$     & \err{36.2}{5.2}{3.8}   & \err{14.2}{8.3}{3.7}   \\[3pt]
-    Secondary mass      $m_1/M_{\astrosun}$     & \err{29.1}{3.7}{4.4}   & \err{7.5}{2.3}{2.3}    \\[3pt]
+    Secondary mass      $m_2/M_{\astrosun}$     & \err{29.1}{3.7}{4.4}   & \err{7.5}{2.3}{2.3}    \\[3pt]
     Radiated energy     $E_{rad}/M_{\astrosun}$ & \err{3.0}{0.5}{0.4}    & \err{1.0}{0.1}{0.2}    \\[3pt]
     Luminosity distance $D_L/\si{\mega\parsec}$ & \err{420}{150}{180}    & \err{440}{180}{190}    \\[3pt]
     Source redshift     $z$                     & \err{0.09}{0.03}{0.04} & \err{0.09}{0.03}{0.04} \\[3pt]

BIN
figures/bead_bg.png


BIN
figures/bead_left.png


BIN
figures/bead_right.png


BIN
figures/sticky_bead2.jpg


BIN
figures/sticky_bead2.xcf


BIN
scripts/Combined.mp4


File diff suppressed because it is too large
+ 524291 - 0
scripts/H-H1_LOSC_16_V2-1135136334-32.txt


File diff suppressed because it is too large
+ 524291 - 0
scripts/L-L1_LOSC_16_V2-1135136334-32.txt


BIN
scripts/cookie.png


+ 49 - 0
scripts/cookies.py

@@ -0,0 +1,49 @@
+#!/usr/bin/env python3
+from PIL import Image
+from math import sin, cos, pi
+
+
+def main():
+    bg = Image.open('./stars.png')
+    cookie = Image.open('./cookie.png').resize((100, 100))
+    cookie_mask = cookie.split()[0].point(lambda i: i != 0 and 255)
+    muffin = Image.open('./muffin.png').resize((100, 100))
+    muffin_mask = muffin.split()[0].point(lambda i: i != 0 and 255)
+    doughnut = Image.open('./doughnut.png').resize((100, 100))
+    doughnut_mask = doughnut.split()[0].point(lambda i: i != 0 and 255)
+
+    snacks = [cookie, muffin, doughnut]
+    masks = [cookie_mask, muffin_mask, doughnut_mask]
+    n = 150
+
+    def combine(t):
+        A = 0.1
+        w = 6*2*pi/n
+
+        bg_copy = bg.copy()
+
+        # left_c.paste(left, box=(offset, 0))
+        # right_c.paste(right, box=(-offset, 0))
+
+        N = 10
+        radius = 400
+        center = 450, 450
+        for i in range(N+1):
+            strain_x = 1 + A*sin(w*t)
+            strain_y = 1 - A*sin(w*t)
+            theta = i*2*pi/(N+1)
+            x = int(center[0] + strain_x*radius*cos(theta))
+            y = int(center[1] + strain_y*radius*sin(theta))
+            bg_copy.paste(snacks[i % 3], mask=masks[i % 3], box=(x, y))
+
+        # bg.show()
+        return bg_copy
+
+    # combine(0)
+    frames = [combine(i) for i in range(n)]
+
+    frames[0].save('snacks.gif', save_all=True, append_images=frames[1:], duration=int(1000/30), loop=0)
+
+
+if __name__ == '__main__':
+    main()

BIN
scripts/doughnut.png


BIN
scripts/muffin.png


+ 41 - 0
scripts/sb.py

@@ -0,0 +1,41 @@
+#!/usr/bin/env python3
+from PIL import Image
+from math import sin, pi
+
+
+def main():
+    bg = Image.open('../figures/bead_bg.png')
+    left = Image.open('../figures/bead_left.png')
+    right = Image.open('../figures/bead_right.png')
+
+    size_x, size_y = bg.size
+
+    n = 50
+    def combine(t):
+        A = 20
+        w = 2*2*pi/n
+        offset = int(A*sin(w*t))
+
+        left_c = left.copy()
+        right_c = right.copy()
+
+        left_c.paste(left, box=(offset, 0))
+        right_c.paste(right, box=(-offset, 0))
+
+        left_mask = left_c.split()[0].point(lambda i: i != 0 and 255)
+        right_mask = right_c.split()[0].point(lambda i: i != 0 and 255)
+
+        bg_copy = bg.copy()
+        bg_copy.paste(left_c, mask=left_mask)
+        bg_copy.paste(right_c, mask=right_mask)
+
+        # bg_copy.show()
+        return bg_copy
+
+    frames = [combine(i) for i in range(n)]
+
+    frames[0].save('res.gif', save_all=True, append_images=frames[1:], duration=int(1000/30), loop=10)
+
+
+if __name__ == '__main__':
+    main()

+ 14 - 0
scripts/shot_noise.py

@@ -0,0 +1,14 @@
+#!/usr/bin/env python3
+import pymunk               # Import pymunk..
+
+space = pymunk.Space()      # Create a Space which contain the simulation
+space.gravity = 0, -1000     # Set its gravity
+
+body = pymunk.Body(1, 1666)  # Create a Body with mass and moment
+body.position = 50, 100      # Set the position of the body
+
+poly = pymunk.Poly.create_box(body)  # Create a box shape and attach to body
+space.add(body, poly)       # Add both body and shape to the simulation
+
+while True:                 # Infinite loop simulation
+    space.step(0.02)        # Step the simulation one step forward

BIN
scripts/stars.png


+ 33 - 0
scripts/stretch_squeeze.py

@@ -0,0 +1,33 @@
+#!/usr/bin/env python3
+from PIL import Image
+from math import sin, pi
+
+
+def main():
+    inter = Image.open('../figures/interferometer_schematic.png')
+
+    size_x, size_y = inter.size
+
+    n = 50
+
+    def combine(t):
+        A = 20
+        w = 2*2*pi/n
+        offset = int(A*sin(w*t))
+        bg = Image.new('RGBA', (1000, 1000), color=(255, 255, 255, 0))
+
+        inter2 = inter.resize((size_x-offset, size_y+offset))
+
+        bg.paste(inter2, box=(50+offset//2, 50-offset//2))
+
+        # bg.show()
+        return bg
+
+    frames = [combine(i) for i in range(n)]
+
+    frames[0].save('stretch_squeeze.gif', save_all=True, append_images=frames[1:], duration=int(1000/30), loop=0)
+    frames[0].save('stretch_squeeze_start.gif')
+
+
+if __name__ == '__main__':
+    main()