Test Phase Shifting on MMRDNS


In [18]:
# Setup ipython environment
%load_ext autoreload
%autoreload 2
%matplotlib inline

# Import Useful things 
from kerr import mmrdns
from numpy import pi

# Setup plotting backend
# ---
## MPL
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 *
from IPython.html.widgets import *


The autoreload extension is already loaded. To reload it, use:
  %reload_ext autoreload

Plot spherical mode for given ll mm and eta


In [32]:
#
ll,mm,eta = 3,2,mmrdns.q2eta(1)
ar = mmrdns.meval_spherical_mode(ll,mm,eta,gwfout=True)( mmrdns.t )
#
ax,fig = ar.plot()



In [35]:
#
def plt_shifted_gwf(dphi):
    ar.shift_phase(dphi,fromraw=True)
    ar.plot()
    
#
interact( plt_shifted_gwf, dphi=(0,pi,1.0/512) )


Out[35]:
<function __main__.plt_shifted_gwf>

Notes

  • gwf.shift_phase() works as expected
  • an option "fromraw" was added to gwf.shift_phase() so that shifting may always be performed relaltive to the initial gwf object's data (via rawgwfarr)
  • As one should expect, shifting the phase does not affect the overall amplitude.

In [ ]: