In [95]:
# Setup ipython environment
%load_ext autoreload
%autoreload 2
%matplotlib inline
# The Important Things
from nrutils import scsearch,gwylm
from matplotlib.pyplot import *
from kerr.models import mmrdns
from numpy import array
# Setup plotting backend
import matplotlib as mpl
mpl.rcParams['lines.linewidth'] = 0.8
mpl.rcParams['font.family'] = 'serif'
mpl.rcParams['font.size'] = 12
mpl.rcParams['axes.labelsize'] = 20
In [79]:
A = scsearch(keyword=['athena','hrq'],q=1.0,verbose=True)
In [80]:
# Here we load only the l=m=2 spherical multipole moment
y = gwylm( A[0], lm=[2,2], verbose=True )
In [81]:
# Plot the strain waveform
y.hlm[0].plot(show=True);
In [110]:
g = y.ringdown(T0=5,T1=30) # Here, T0 is where we will define ringdown to start in terms of M after the peak luminosity; in the same sense, T1 is where the waveform will terminate
In [111]:
# Plot the strain and psi4 waveforms. NOTE that Ringdown in strain is of lower quality
g.plot()
Out[111]:
In [112]:
ll,mm,eta = 2,2,mmrdns.q2eta(A[0].m1/A[0].m2)
h = mmrdns.meval_spherical_mode(ll,mm,eta,kind='strain',gwfout=True)(g.hlm[0].t)
In [113]:
h.plot()
Out[113]:
In [114]:
lmn = [ (2,2,0), (2,2,1) ]
hlm = []
for k in lmn:
hlm.append( mmrdns.meval_spherical_mode(ll,mm,eta,kind='strain',mode=k,gwfout=True)(g.hlm[0].t) )
In [117]:
figure( figsize=2*array([5,3]) )
# gca().set_yscale("log", nonposy='clip')
ylim( [0, 0.25] )
# xlim( [min(hk.t),max(hk.t)] )
plot( g.hlm[0].t, g.hlm[0].amp, color=0.9*array([1,1,1]), linewidth=4, label='NR-MAYA' )
plot( g.hlm[0].t, g.hlm[0].plus, color=0.9*array([1,1,1]), linewidth=4 )
plot( g.hlm[0].t, g.hlm[0].cross, color=0.9*array([1,1,1]), linewidth=4 )
plot( h.t, h.amp, '--k', label='MMRDNS: (2,2,0), (2,2,1)' )
plot( hlm[0].t, hlm[0].amp, alpha=0.8, label='Only (2,2,0)' )
#
xlabel(r'$(t-t_{PeakLum.})/M$')
ylabel(r'$\frac{r}{M}\,h_{22}(t)$')
title(g.label.upper())
legend(frameon=False)
#
savefig('mmrdns_strain_comparison_%s_ll%imm%i.pdf'%(g.label.replace('-','_'),ll,mm))
In [ ]: