In [32]:
# Setup ipython environment
%load_ext autoreload
%autoreload 2
%matplotlib inline
# 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
from matplotlib.pyplot import *
# Import useful things
from nrutils import scsearch,gwylm
from numpy import array
The autoreload extension is already loaded. To reload it, use:
%reload_ext autoreload
In [19]:
# Search for a simulation. Hopefully the results will be from different codes. NOTE that this could be done more manually so that we don't "hope" but know.
A = scsearch( q=[1,4], nonspinning=True, verbose=True )
[scsearch]>> Found nonspinning (=True) keyword.
[scsearch]>> Found q (=[1, 4]) keyword.
[scsearch]>> Found verbose (=True) keyword.
## Found 136 possibly degenerate simulations:
[0001][uib] q4Sebastian: ns-q4.00
[0002][athena] HRq-series: ns-q1.60
[0003][athena] HRq-series: ns-q1.40
[0004][athena] HRq-series: ns-q1.20
[0005][athena] HRq-series: ns-q1.10
[0006][athena] HRq-series: ns-q1.30
[0007][athena] HRq-series: ns-q1.50
[0008][athena] HRq-series: ns-q1.00
[0009][athena] HRq-series: ns-q3.00
[0010][athena] HRq-series: ns-q2.90
[0011][athena] HRq-series: ns-q2.80
[0012][athena] HRq-series: ns-q3.50
[0013][athena] HRq-series: ns-q2.60
[0014][athena] HRq-series: ns-q2.70
[0015][athena] HRq-series: ns-q3.40
[0016][athena] HRq-series: ns-q3.30
[0017][athena] HRq-series: ns-q3.20
[0018][athena] HRq-series: ns-q3.60
[0019][athena] HRq-series: ns-q3.10
[0020][athena] HRq-series: ns-q3.80
[0021][athena] HRq-series: ns-q3.70
[0022][athena] HRq-series: ns-q3.90
[0023][athena] HRq-series: ns-q2.50
[0024][athena] HRq-series: ns-q2.40
[0025][athena] HRq-series: ns-q2.30
[0026][athena] HRq-series: ns-q2.20
[0027][athena] HRq-series: ns-q3.00
[0028][athena] HRq-series: ns-q3.00
[0029][athena] HRq-series: ns-q3.00
[0030][athena] HRq-series: ns-q3.00
[0031][athena] HRq-series: ns-q3.00
[0032][athena] HRq-series: ns-q3.00
[0033][athena] HRq-series: ns-q3.00
[0034][athena] HRq-series: ns-q3.00
[0035][athena] HRq-series: ns-q3.00
[0036][athena] HRq-series: ns-q2.00
[0037][athena] HRq-series: ns-q1.80
[0038][athena] HRq-series: ns-q1.90
[0039][athena] HRq-series: ns-q2.10
[0040][athena] HRq-series: ns-q1.70
[0041][athena] HRq-series: ns-q4.00
[0042][athena] HR-series: ns-q4.00
[0043][athena] HR-series: ns-q4.00
[0044][athena] HR-series: ns-q4.00
[0045][athena] HR-series: ns-q4.00
[0046][athena] HR-series: ns-q4.00
[0047][athena] HR-series: ns-q4.00
[0048][athena] HR-series: ns-q4.00
[0049][athena] HR-series: ns-q3.00
[0050][athena] HR-series: ns-q3.00
[0051][athena] HR-series: ns-q2.00
[0052][athena] HR-series: ns-q2.00
[0053][athena] HR-series: ns-q2.50
[0054][athena] HR-series: ns-q2.50
[0055][athena] HR-series: ns-q2.50
[0056][athena] HR-series: ns-q2.50
[0057][athena] HR-series: ns-q2.50
[0058][athena] HR-series: ns-q2.50
[0059][athena] HR-series: ns-q2.50
[0060][athena] HR-series: ns-q2.50
[0061][athena] HR-series: ns-q2.50
[0062][athena] HR-series: ns-q2.50
[0063][athena] HR-series: ns-q2.50
[0064][athena] HR-series: ns-q2.25
[0065][athena] HR-series: ns-q1.00
[0066][athena] HR-series: ns-q1.00
[0067][athena] HR-series: ns-q1.00
[0068][athena] HR-series: ns-q1.00
[0069][athena] HR-series: ns-q1.75
[0070][athena] HR-series: ns-q1.50
[0071][athena] HR-series: ns-q1.25
[0072][sxs] SXS0201: qc-ns-q2.32
[0073][sxs] SXS0200: qc-ns-q3.27
[0074][sxs] SXS0198: qc-ns-q1.20
[0075][sxs] SXS0194: qc-ns-q1.52
[0076][sxs] SXS0193: qc-ns-q3.50
[0077][sxs] SXS0191: qc-ns-q2.51
[0078][sxs] SXS0184: qc-ns-q2.00
[0079][sxs] SXS0183: qc-ns-q3.00
[0080][sxs] SXS0182: qc-ns-q4.00
[0081][sxs] SXS0169: qc-ns-q2.00
[0082][sxs] SXS0168: qc-ns-q3.00
[0083][sxs] SXS0100: qc-ns-q1.50
[0084][sxs] SXS0093: qc-ns-q1.50
[0085][sxs] SXS0090: qc-ns-q1.00
[0086][sxs] SXS0086: qc-ns-q1.00
[0087][sxs] SXS0073: qc-ns-q1.00
[0088][sxs] SXS0070: qc-ns-q1.00
[0089][sxs] SXS0068: qc-ns-q1.00
[0090][sxs] SXS0067: qc-ns-q1.00
[0091][sxs] SXS0066: qc-ns-q1.00
[0092][sxs] SXS0030: qc-ns-q3.00
[0093][sxs] SXS0008: qc-ns-q1.50
[0094][sxs] SXS0007: qc-ns-q1.50
[0095][sxs] SXS0002: qc-ns-q1.00
[0096][numrel-hrqseries] q3CFL: ns-q3.00
[0097][numrel-hrqseries] q3CFL: ns-q3.00
[0098][numrel-hrqseries] D9_q4.0_a0.0_m160: ns-q4.00
[0099][numrel-hrqseries] q3CFL: ns-q3.00
[0100][numrel-hrqseries] q3CFL: ns-q3.00
[0101][numrel-hrqseries] q3CFL: ns-q3.00
[0102][numrel-hrqseries] q3CFL: ns-q3.00
[0103][numrel-hrqseries] q3CFL: ns-q3.00
[0104][numrel-hrqseries] q3CFL: ns-q3.00
[0105][uib] VeryOld: ns-q4.00
[0106][numrel-hrqseries] D9_q3.8_a0.0_m160: ns-q3.80
[0107][numrel-hrqseries] D9_q3.7_a0.0_m160: ns-q3.70
[0108][numrel-hrqseries] D9_q3.9_a0.0_m160: ns-q3.90
[0109][numrel-hrqseries] q3CFL: ns-q3.00
[0110][numrel-hrqseries] D9_q3.4_a0.0_m160: ns-q3.40
[0111][numrel-hrqseries] D9_q3.3_a0.0_m160: ns-q3.30
[0112][numrel-hrqseries] D9_q3.2_a0.0_m160: ns-q3.20
[0113][numrel-hrqseries] D9_q3.1_a0.0_m160: ns-q3.10
[0114][numrel-hrqseries] D9_q3.6_a0.0_m160: ns-q3.60
[0115][numrel-hrqseries] D9_q1.6_a0.0_m160: ns-q1.60
[0116][numrel-hrqseries] D9_q1.4_a0.0_m160: ns-q1.40
[0117][numrel-hrqseries] D9_q1.2_a0.0_m160: ns-q1.20
[0118][numrel-hrqseries] D9_q1.1_a0.0_m160: ns-q1.10
[0119][numrel-hrqseries] D9_q1.3_a0.0_m160: ns-q1.30
[0120][numrel-hrqseries] D9_q1.5_a0.0_m160: ns-q1.50
[0121][numrel-hrqseries] D9_q1.0_a0.0_m160: ns-q1.00
[0122][numrel-hrqseries] D9_q3.0_a0.0_m160: ns-q3.00
[0123][numrel-hrqseries] D9_q2.9_a0.0_m160: ns-q2.90
[0124][numrel-hrqseries] D9_q2.8_a0.0_m160: ns-q2.80
[0125][numrel-hrqseries] D9_q3.5_a0.0_m160: ns-q3.50
[0126][numrel-hrqseries] D9_q2.6_a0.0_m160: ns-q2.60
[0127][numrel-hrqseries] D9_q2.7_a0.0_m160: ns-q2.70
[0128][numrel-hrqseries] D9_q2.5_a0.0_m160: ns-q2.50
[0129][numrel-hrqseries] D9_q2.4_a0.0_m160: ns-q2.40
[0130][numrel-hrqseries] D9_q2.3_a0.0_m160: ns-q2.30
[0131][numrel-hrqseries] D9_q2.2_a0.0_m160: ns-q2.20
[0132][numrel-hrqseries] D9_q2.0_a0.0_m160: ns-q2.00
[0133][numrel-hrqseries] D9_q1.8_a0.0_m160: ns-q1.80
[0134][numrel-hrqseries] D9_q2.1_a0.0_m160: ns-q2.10
[0135][numrel-hrqseries] D9_q1.9_a0.0_m160: ns-q1.90
[0136][numrel-hrqseries] D9_q1.7_a0.0_m160: ns-q1.70
In [20]:
# Select which of the search results we wish to keep
U,V = A[77],A[131]
In [38]:
# Load the modes
u = gwylm(U,lmax=2,verbose=True)
v = gwylm(V,lmax=2,verbose=True)
(gwylm)>> Found clean (=False) keyword.
(gwylm)>> Found lmax (=2) keyword.
(gwylm)>> Found load (=True) keyword.
(gwylm)>> Found scentry_obj (=<nrutils.core.nrsc.scentry instance at 0x108609170>) keyword.
(gwylm)>> Found verbose (=True) keyword.
(load)>> Loading: rMPsi4_Y_l2_m-2.asc
(**) Warning: No dt given to gwf(). We will assume that the input waveform array is in geometric units, and that dt = 0.290315 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.290315 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_l2_m-1.asc
(**) Warning: No dt given to gwf(). We will assume that the input waveform array is in geometric units, and that dt = 0.290315 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.290315 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_l2_m0.asc
(**) Warning: No dt given to gwf(). We will assume that the input waveform array is in geometric units, and that dt = 0.290315 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.290315 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)=0*sign(m).
(load)>> Loading: rMPsi4_Y_l2_m1.asc
(**) Warning: No dt given to gwf(). We will assume that the input waveform array is in geometric units, and that dt = 0.290315 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.290315 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_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.290315 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.290315 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.031781 (this is the lower frequency used for FFI method [arxiv:1006.1632v3])
* w0(w22) = -0.015891 (this is the lower frequency used for FFI method [arxiv:1006.1632v3])
* w0(w22) = 0.031781 (this is the lower frequency used for FFI method [arxiv:1006.1632v3])
* w0(w22) = 0.015891 (this is the lower frequency used for FFI method [arxiv:1006.1632v3])
* w0(w22) = 0.031781 (this is the lower frequency used for FFI method [arxiv:1006.1632v3])
(gwylm)>> Found clean (=False) keyword.
(gwylm)>> Found lmax (=2) keyword.
(gwylm)>> Found load (=True) keyword.
(gwylm)>> Found scentry_obj (=<nrutils.core.nrsc.scentry instance at 0x109150248>) keyword.
(gwylm)>> Found verbose (=True) keyword.
(load)>> Loading: mp_WeylScal4::Psi4i_l2_m-2_r75.00.asc
>> 75.000000
(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: mp_WeylScal4::Psi4i_l2_m-1_r75.00.asc
>> 75.000000
(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: mp_WeylScal4::Psi4i_l2_m0_r75.00.asc
>> 75.000000
(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)=0*sign(m).
(load)>> Loading: mp_WeylScal4::Psi4i_l2_m1_r75.00.asc
>> 75.000000
(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: mp_WeylScal4::Psi4i_l2_m2_r75.00.asc
>> 75.000000
(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.057949 (this is the lower frequency used for FFI method [arxiv:1006.1632v3])
* w0(w22) = -0.028974 (this is the lower frequency used for FFI method [arxiv:1006.1632v3])
* w0(w22) = 0.057949 (this is the lower frequency used for FFI method [arxiv:1006.1632v3])
* w0(w22) = 0.028974 (this is the lower frequency used for FFI method [arxiv:1006.1632v3])
* w0(w22) = 0.057949 (this is the lower frequency used for FFI method [arxiv:1006.1632v3])
In [39]:
# Plot the waveforms
u.plot(); v.plot()
Out[39]:
[<matplotlib.axes._subplots.AxesSubplot at 0x108344f50>,
<matplotlib.axes._subplots.AxesSubplot at 0x109683c50>,
<matplotlib.axes._subplots.AxesSubplot at 0x10be10c90>]
<matplotlib.figure.Figure at 0x10bb9a490>
<matplotlib.figure.Figure at 0x10bb9a510>
In [40]:
#
theta,phi = 0,0
a,b = u.recompose(theta,phi,kind='strain'),v.recompose(theta,phi,kind='strain')
In [41]:
figure( figsize=2*array([5,3]) )
plot( a.t - a.intrp_t_amp_max, a.amp )
plot( b.t - b.intrp_t_amp_max, b.amp )
gca().set_yscale("log", nonposy='clip')
ylim([1e-5,1e-1])
xlim([-400,100])
title('the amplitudes should be approx. the same')
Out[41]:
<matplotlib.text.Text at 0x10bc9b1d0>
In [42]:
a.plot();b.plot();
In [ ]:
Content source: Cyberface/nrutils_dev
Similar notebooks: