(dev) Test basic FD Mapping for phase derivative

Import useful things


In [14]:
# Setup enviroment to autoreload packages
%load_ext autoreload
%autoreload 2
# %matplotlib inline
%matplotlib auto

from matplotlib.pyplot import figure,plot,xlabel,ylabel,gca,show,close,axvline,xlim,ylim,savefig,legend,title

# Import select nrutils packages
from nrutils import scbuild,red,cyan,yellow,green,scsearch,gwylm


The autoreload extension is already loaded. To reload it, use:
  %reload_ext autoreload
Using matplotlib backend: TkAgg

In [15]:
# Look for simulations
A = scsearch(keyword='hr-series',verbose=True,unique=True)


[scsearch]>> Found keyword (='hr-series') keyword.
[scsearch]>> Found unique (=True) keyword.
[scsearch]>> Found verbose (=True) keyword.
(scsearch)>> List of keywords or string keyword found: ALL scentry objects matching will be passed. To pass ANY entries matching the keywords, input the keywords using an iterable of not of type list.
## Found 70 unique simulations:
[0001][athena] HR-series: s1-sa-q7.00	(D10_q7.00_a0.20_0.00_m320)
[0002][athena] HR-series: s1-sa-q7.00	(D10_q7.00_a0.40_0.00_m320)
[0003][athena] HR-series: ns-q7.00	(D10_q7.00_a0.00_0.00_m320)
[0004][athena] HR-series: s1-sa-q6.00	(D10_q6.00_a0.20_0.00_m200)
[0005][athena] HR-series: ns-q6.00	(D10_q6.00_a0.00_0.00_m280)
[0006][athena] HR-series: s1-sa-q6.00	(D10_q6.00_a0.60_0.00_m280)
[0007][athena] HR-series: s1-sa-q6.00	(D10_q6.00_a0.40_0.00_m280)
[0008][athena] HR-series: s1-sa-q5.00	(D10_q5.00_a0.2_0.0_m240)
[0009][athena] HR-series: s1-saa-q5.00	(D10_q5.00_a-0.6921_0.00_m240)
[0010][athena] HR-series: s1-saa-q5.00	(D10_q5.00_a-0.71_0.00_m240)
[0011][athena] HR-series: s1-saa-q5.00	(D10_q5.00_a-0.72_0.00_m240)
[0012][athena] HR-series: s1-saa-q5.00	(D10_q5.00_a-0.73_0.00_m240)
[0013][athena] HR-series: s1-saa-q5.00	(D10_q5.00_a-0.69_0.00_m240)
[0014][athena] HR-series: s1-saa-q5.00	(D10_q5.00_a-0.68_0.00_m240)
[0015][athena] HR-series: s1-sa-q5.00	(D10_q5.00_a0.4_0.0_m240)
[0016][athena] HR-series: s1-sa-q5.00	(D10_q5.00_a0.6_0.0_m240)
[0017][athena] HR-series: ns-q5.00	(D10_q5.00_a0.0_0.0_m240)
[0018][athena] HR-series: s1-sa-q4.00	(D10_q4.00_a0.6_0.0_m240)
[0019][athena] HR-series: s1-sa-q4.00	(D10_q4.00_a0.4_0.0_m240)
[0020][athena] HR-series: s1-sa-q4.00	(D10_q4.00_a0.2_0.0_m240)
[0021][athena] HR-series: ns-q4.00	(D11_q4.00_a0.0_m160)
[0022][athena] HR-series: s1-saa-q4.00	(D11_q4.00_a-0.8_0.0_m160)
[0023][athena] HR-series: s1-sa-q3.00	(D11_q3.00_a0.8_0.00_m200)
[0024][athena] HR-series: s1-sa-q3.00	(D11_q3.00_a0.2_0.00_m200)
[0025][athena] HR-series: ns-q3.00	(D11_q3.00_a0.0_m180)
[0026][athena] HR-series: sa-q2.00	(D11_q2.00_a0.4_m160)
[0027][athena] HR-series: sa-q2.00	(D11_q2.00_a0.2_m160)
[0028][athena] HR-series: ns-q2.00	(D11_q2.00_a0.0_m180)
[0029][athena] HR-series: saa-q2.00	(D11_q2.00_a-0.6_m200)
[0030][athena] HR-series: saa-q2.00	(D11_q2.00_a-0.4_m200)
[0031][athena] HR-series: saa-q2.00	(D11_q2.00_a-0.2_m200)
[0032][athena] HR-series: s1-sa-q2.50	(D11_q2.50_a0.4_0.00_m160)
[0033][athena] HR-series: s1-sa-q2.50	(D11_q2.50_a0.2_0.00_m160)
[0034][athena] HR-series: ns-q2.50	(D11_q2.50_a0.0_m200)
[0035][athena] HR-series: saa-q2.50	(D11_q2.50_a-0.6_m200)
[0036][athena] HR-series: saa-q2.50	(D11_q2.50_a-0.4_m200)
[0037][athena] HR-series: saa-q2.50	(D11_q2.50_a-0.2_m200)
[0038][athena] HR-series: ns-q2.25	(D11_q2.25_a0.0_m200)
[0039][athena] HR-series: ns-q15.04	(D7.5_q15.00_a0.0_CHgEEB_m800)
[0040][athena] HR-series: ns-q10.00	(D8.4_q10.00_a0.0_m400)
[0041][athena] HR-series: sa-q1.00	(D11_q1.00_a0.8_m160)
[0042][athena] HR-series: sa-q1.00	(D11_q1.00_a0.7_m200)
[0043][athena] HR-series: sa-q1.00	(D11_q1.00_a0.5_m200)
[0044][athena] HR-series: sa-q1.00	(D11_q1.00_a0.4_m200)
[0045][athena] HR-series: sa-q1.00	(D11_q1.00_a0.3_m200)
[0046][athena] HR-series: sa-q1.00	(D11_q1.00_a0.2_m200)
[0047][athena] HR-series: sa-q1.00	(D11_q1.00_a0.20_0.80_m160)
[0048][athena] HR-series: sa-q1.00	(D11_q1.00_a0.20_0.60_m160)
[0049][athena] HR-series: sa-q1.00	(D11_q1.00_a0.20_0.40_m160)
[0050][athena] HR-series: sa-q1.00	(D11_q1.00_a0.1_m200)
[0051][athena] HR-series: ns-q1.00	(D11_q1.00_a0.0_m120)
[0052][athena] HR-series: s1-sa-q1.00	(D11_q1.00_a0.00_0.80_m160)
[0053][athena] HR-series: s1-sa-q1.00	(D11_q1.00_a0.00_0.60_m160)
[0054][athena] HR-series: s1-sa-q1.00	(D11_q1.00_a0.00_0.40_m160)
[0055][athena] HR-series: s1-sa-q1.00	(D11_q1.00_a0.00_0.20_m160)
[0056][athena] HR-series: saa-q1.00	(D11_q1.00_a-0.4_m200)
[0057][athena] HR-series: saa-q1.00	(D11_q1.00_a-0.2_m200)
[0058][athena] HR-series: ns-q1.75	(D11_q1.75_a0.0_m200)
[0059][athena] HR-series: sa-q1.50	(D9_q1.50_a0.1_m200)
[0060][athena] HR-series: sa-q1.50	(D11_q1.50_a0.4_m200)
[0061][athena] HR-series: sa-q1.50	(D11_q1.50_a0.2_m200)
[0062][athena] HR-series: ns-q1.50	(D11_q1.50_a0.0_m200)
[0063][athena] HR-series: saa-q1.50	(D11_q1.50_a-0.6_m200)
[0064][athena] HR-series: saa-q1.50	(D11_q1.50_a-0.4_m200)
[0065][athena] HR-series: saa-q1.50	(D11_q1.50_a-0.2_m200)
[0066][athena] HR-series: ns-q1.25	(D11_q1.25_a0.0_m200)
[0067][athena] HR-series: s1-sa-q2.00	(D12_q2.00_a0.30_0.00_m120)
[0068][athena] HR-series: sa-q1.00	(D12_q1.00_a0.60_m080)
[0069][athena] HR-series: sa-q2.00	(D11_q2.00_a0.60_m080)
[0070][athena] HR-series: p-q2.00	(D12_q2.00_a0.15_-0.60_m120)


In [16]:
y = gwylm( A[28], lm=([2,2],[3,3],[4,4],[5,5],[2,1],[3,2]), verbose=True,clean=True )


(gwylm)>> Found clean (=True) keyword.
(gwylm)>> Found lm (=([2, 2], [3, 3], [4, 4], [5, 5], [2, 1], [3, 2])) keyword.
(gwylm)>> Found load (=True) keyword.
(gwylm)>> Found lowpass (=False) keyword.
(gwylm)>> Found scentry_obj (=<nrutils.core.nrsc.scentry instance at 0x10f589a70>) keyword.
(gwylm)>> Found verbose (=True) keyword.
(load)>> Loading: Ylm_WEYLSCAL4::Psi4r_l2_m2_r75.00.asc
(load)>> Re-orienting waveform phase to be consistent with internal sign convention for Psi4, where sign(dPhi/dt)=1*sign(m). Note that the internal sign convention is defined in ... nrutils/core/__init__.py as "M_RELATIVE_SIGN_CONVENTION". This message has appeared becuase the waveform is determioned to obey and sign convention: sign(dPhi/dt)=-1*sign(m).
(load)>> Loading: Ylm_WEYLSCAL4::Psi4r_l3_m3_r75.00.asc
(load)>> Re-orienting waveform phase to be consistent with internal sign convention for Psi4, where sign(dPhi/dt)=1*sign(m). Note that the internal sign convention is defined in ... nrutils/core/__init__.py as "M_RELATIVE_SIGN_CONVENTION". This message has appeared becuase the waveform is determioned to obey and sign convention: sign(dPhi/dt)=-1*sign(m).
(load)>> Loading: Ylm_WEYLSCAL4::Psi4r_l4_m4_r75.00.asc
(load)>> Re-orienting waveform phase to be consistent with internal sign convention for Psi4, where sign(dPhi/dt)=1*sign(m). Note that the internal sign convention is defined in ... nrutils/core/__init__.py as "M_RELATIVE_SIGN_CONVENTION". This message has appeared becuase the waveform is determioned to obey and sign convention: sign(dPhi/dt)=-1*sign(m).
(load)>> Loading: Ylm_WEYLSCAL4::Psi4r_l5_m5_r75.00.asc
(load)>> Re-orienting waveform phase to be consistent with internal sign convention for Psi4, where sign(dPhi/dt)=1*sign(m). Note that the internal sign convention is defined in ... nrutils/core/__init__.py as "M_RELATIVE_SIGN_CONVENTION". This message has appeared becuase the waveform is determioned to obey and sign convention: sign(dPhi/dt)=-1*sign(m).
(load)>> Loading: Ylm_WEYLSCAL4::Psi4r_l2_m1_r75.00.asc
(load)>> Re-orienting waveform phase to be consistent with internal sign convention for Psi4, where sign(dPhi/dt)=1*sign(m). Note that the internal sign convention is defined in ... nrutils/core/__init__.py as "M_RELATIVE_SIGN_CONVENTION". This message has appeared becuase the waveform is determioned to obey and sign convention: sign(dPhi/dt)=-1*sign(m).
(load)>> Loading: Ylm_WEYLSCAL4::Psi4r_l3_m2_r75.00.asc
(load)>> Re-orienting waveform phase to be consistent with internal sign convention for Psi4, where sign(dPhi/dt)=1*sign(m). Note that the internal sign convention is defined in ... nrutils/core/__init__.py as "M_RELATIVE_SIGN_CONVENTION". This message has appeared becuase the waveform is determioned to obey and sign convention: sign(dPhi/dt)=-1*sign(m).
(gwylm)>> Using w22 from a PN estimate to calculate strain multipoles [see pnw0 in basics.py, and/or arxiv:1310.1528v4].
* w0(w22) = 0.043995 (this is the lower frequency used for FFI method [arxiv:1006.1632v3])
(gwylm.calchlm)>> The user should note that there is no minus sign used in front of the double time integral for strain (i.e. Eq 4 of arxiv:1006.1632). This differs from Eq 3.4 of arxiv:0707.4654v3. The net effect is a rotation of the overall polarization of pi degrees. The user should also note that there is no minus sign applied to h_cross meaning that the user must be mindful to write h_pluss-1j*h_cross when appropriate.
* w0(w22) = 0.065993 (this is the lower frequency used for FFI method [arxiv:1006.1632v3])
(gwylm.calchlm)>> The user should note that there is no minus sign used in front of the double time integral for strain (i.e. Eq 4 of arxiv:1006.1632). This differs from Eq 3.4 of arxiv:0707.4654v3. The net effect is a rotation of the overall polarization of pi degrees. The user should also note that there is no minus sign applied to h_cross meaning that the user must be mindful to write h_pluss-1j*h_cross when appropriate.
* w0(w22) = 0.087991 (this is the lower frequency used for FFI method [arxiv:1006.1632v3])
(gwylm.calchlm)>> The user should note that there is no minus sign used in front of the double time integral for strain (i.e. Eq 4 of arxiv:1006.1632). This differs from Eq 3.4 of arxiv:0707.4654v3. The net effect is a rotation of the overall polarization of pi degrees. The user should also note that there is no minus sign applied to h_cross meaning that the user must be mindful to write h_pluss-1j*h_cross when appropriate.
* w0(w22) = 0.109989 (this is the lower frequency used for FFI method [arxiv:1006.1632v3])
(gwylm.calchlm)>> The user should note that there is no minus sign used in front of the double time integral for strain (i.e. Eq 4 of arxiv:1006.1632). This differs from Eq 3.4 of arxiv:0707.4654v3. The net effect is a rotation of the overall polarization of pi degrees. The user should also note that there is no minus sign applied to h_cross meaning that the user must be mindful to write h_pluss-1j*h_cross when appropriate.
* w0(w22) = 0.021998 (this is the lower frequency used for FFI method [arxiv:1006.1632v3])
(gwylm.calchlm)>> The user should note that there is no minus sign used in front of the double time integral for strain (i.e. Eq 4 of arxiv:1006.1632). This differs from Eq 3.4 of arxiv:0707.4654v3. The net effect is a rotation of the overall polarization of pi degrees. The user should also note that there is no minus sign applied to h_cross meaning that the user must be mindful to write h_pluss-1j*h_cross when appropriate.
* w0(w22) = 0.043995 (this is the lower frequency used for FFI method [arxiv:1006.1632v3])
(gwylm.calchlm)>> The user should note that there is no minus sign used in front of the double time integral for strain (i.e. Eq 4 of arxiv:1006.1632). This differs from Eq 3.4 of arxiv:0707.4654v3. The net effect is a rotation of the overall polarization of pi degrees. The user should also note that there is no minus sign applied to h_cross meaning that the user must be mindful to write h_pluss-1j*h_cross when appropriate.

In [17]:
h22 = y.lm[2,2]['strain']

In [20]:
close('all')
figure()
from kerr import leaver,rgb
from numpy.linalg import norm
from numpy import pi

clr = rgb(len(y.hlm))
for k,h in enumerate(y.hlm):
    mask = h.f<h.m*0.118/2
    plot( h.f[mask], h.fd_dphi[mask], alpha=0.6, color=clr[k], label='(%i,%i)'%(h.l,h.m) )
    plot( (h.m/2)*h22.f[h22.f<0.118], h22.fd_dphi[h22.f<0.118], '--k',alpha=0.5, label='(2,2)->(%i,%i)'%(h.l,h.m) )
    cw = leaver( norm(h.xf), h.l, h.m, 0, Mf=h.mf )[0]
    axvline( cw.real/(2*pi), color=clr[k] )
gca().set_xscale("log", nonposy='clip')
# xlim([0.02,0.24])
# ylim([2500,3400])
xlabel('$f (1/M)$')
ylabel('$d\phi/df$')
# legend()
title(y.label)

# savefig('/Users/book/Desktop/fd_dphi_comparison_%s.pdf'%y.label)


Out[20]:
<matplotlib.text.Text at 0x111dd8450>

In [35]:
print h.xf


[ -1.22215271e-09   3.00107260e-09   6.56477666e-01]

In [ ]: