(dev) This is a notebook for General Development Iterations

Wishlist

  • Command line interface to setup nrutils
  • Allow for user to input location of config files to scbuild
  • Rotation of multipoles with Wigner D-matrix:
    gwylm = gwylm.rotate( t, alpha, beta, gamma )
    
  • Recompose function
    gwf = gwylm.recompose(theta,phi)
    

Import useful things


In [10]:
# Setup enviroment to autoreload packages
%load_ext autoreload
%autoreload 2
%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,rgb


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

Try to build a catalog with the defulat configuration files (those defined in the user's paths.ini)


In [ ]:
# Do this with scbuild
# scbuild(keyword='hogshead')

In [2]:
# Look for simulations
A = scsearch(keyword='sxs',spinaligned=True,verbose=True,unique=True)


[scsearch]>> Found keyword (='sxs') keyword.
[scsearch]>> Found spinaligned (=True) 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 20 unique simulations:
[0001][sxs] SXS0178: qc-1chi0.99-2chi0.99-sa-q1.00	(SXS0178)
[0002][sxs] SXS0177: qc-1chi0.99-2chi0.99-sa-q1.00	(SXS0177)
[0003][sxs] SXS0176: qc-1chi0.96-2chi0.96-sa-q1.00	(SXS0176)
[0004][sxs] SXS0175: qc-1chi0.75-2chi0.75-sa-q1.00	(SXS0175)
[0005][sxs] SXS0174: qc-1chi0.50-sa-q3.00	(SXS0174)
[0006][sxs] SXS0172: qc-1chi0.98-2chi0.98-sa-q1.00	(SXS0172)
[0007][sxs] SXS0170: qc-1chi0.44-2chi0.44-sa-q1.00	(SXS0170)
[0008][sxs] SXS0162: qc-1chi0.60-sa-q2.00	(SXS0162)
[0009][sxs] SXS0160: qc-1chi0.90-2chi0.90-sa-q1.00	(SXS0160)
[0010][sxs] SXS0158: qc-1chi0.97-2chi0.97-sa-q1.00	(SXS0158)
[0011][sxs] SXS0157: qc-1chi0.95-2chi0.95-sa-q1.00	(SXS0157)
[0012][sxs] SXS0155: qc-1chi0.80-2chi0.80-sa-q1.00	(SXS0155)
[0013][sxs] SXS0153: qc-1chi0.85-2chi0.85-sa-q1.00	(SXS0153)
[0014][sxs] SXS0152: qc-1chi0.60-2chi0.60-sa-q1.00	(SXS0152)
[0015][sxs] SXS0150: qc-1chi0.20-2chi0.20-sa-q1.00	(SXS0150)
[0016][sxs] SXS0065: qc-1chi0.50-sa-q8.00	(SXS0065)
[0017][sxs] SXS0061: qc-1chi0.50-sa-q5.00	(SXS0061)
[0018][sxs] SXS0047: qc-1chi0.50-2chi0.50-sa-q3.00	(SXS0047)
[0019][sxs] SXS0013: qc-1chi0.50-sa-q1.50	(SXS0013)
[0020][sxs] SXS0005: qc-1chi0.50-sa-q1.00	(SXS0005)


In [ ]:
A[0].config.show()

In [3]:
y = gwylm( A[0], lm=([2,2],[3,2],[3,3],[4,4],[4,3]), verbose=True )


(gwylm)>> Found clean (=False) keyword.
(gwylm)>> Found lm (=([2, 2], [3, 2], [3, 3], [4, 4], [4, 3])) keyword.
(gwylm)>> Found load (=True) keyword.
(gwylm)>> Found lowpass (=False) keyword.
(gwylm)>> Found scentry_obj (=<nrutils.core.nrsc.scentry instance at 0x10f79e170>) keyword.
(gwylm)>> Found verbose (=True) keyword.
(load)>> Loading: rMPsi4_Y_l2_m2.asc
(**) Warning: No dt given to gwf(). We will assume that the input waveform array is in geometric units, and that dt = 0.345225 will more than suffice.
(**) Warning: No dt given to gwf(). We will assume that the input waveform array is in geometric units, and that dt = 0.345225 will more than suffice.
(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: rMPsi4_Y_l3_m2.asc
(**) Warning: No dt given to gwf(). We will assume that the input waveform array is in geometric units, and that dt = 0.345225 will more than suffice.
(**) Warning: No dt given to gwf(). We will assume that the input waveform array is in geometric units, and that dt = 0.345225 will more than suffice.
(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: rMPsi4_Y_l3_m3.asc
(**) Warning: No dt given to gwf(). We will assume that the input waveform array is in geometric units, and that dt = 0.345225 will more than suffice.
(**) Warning: No dt given to gwf(). We will assume that the input waveform array is in geometric units, and that dt = 0.345225 will more than suffice.
(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: rMPsi4_Y_l4_m4.asc
(**) Warning: No dt given to gwf(). We will assume that the input waveform array is in geometric units, and that dt = 0.345225 will more than suffice.
(**) Warning: No dt given to gwf(). We will assume that the input waveform array is in geometric units, and that dt = 0.345225 will more than suffice.
(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: rMPsi4_Y_l4_m3.asc
(**) Warning: No dt given to gwf(). We will assume that the input waveform array is in geometric units, and that dt = 0.345225 will more than suffice.
(**) Warning: No dt given to gwf(). We will assume that the input waveform array is in geometric units, and that dt = 0.345225 will more than suffice.
(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.027536 (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.027536 (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.041304 (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.055072 (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.041304 (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 [11]:
fig = figure()
clr = rgb( len(y.hlm) )
for k,h in enumerate(y.hlm):
    plot( h.f, h.fd_amp, color=clr[k] )
gca().set_xscale("log", nonposx='clip')
gca().set_yscale("log", nonposy='clip')
show()

In [6]:
close('all')

In [ ]:
print getattr(y,'note')

In [ ]:
A = scsearch(nonspinning=True,verbose=True,unique=True,keyword='sxs')

In [ ]:
y = gwylm(A[0],lm=[2,2],verbose=True)

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

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

clr = rgb(3)
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*h22.f[h22.f<0.118]/2, h22.fd_dphi[h22.f<0.118], '--k', 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.016,0.22])
ylim([1783,2853])
xlabel('$f~(1/M)$')
ylabel('$d\phi/df$')
legend()
title(y.label)

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

In [35]:
print h.xf


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

In [ ]: