In [1]:
%load_ext autoreload
%autoreload 2

In [2]:
# Make plotting inline
%matplotlib inline
from matplotlib.pyplot import savefig
# Import workhorse class for calculating QNM frequencies 
from kerr.mapqnms import cwbox
#
from numpy import sign


kerr## Found formula module "ksm2_cw"
kerr## Found formula module "ksm2_sc"
kerr## Found formula module "mmrdns_amplitudes"
kerr## Found formula module "mmrdns_Mfjf"

In [7]:
# Define parameters 
l,m,jf = 2,2,0.68

# Define a box in cw space over which to calculate QNM solutions
x = 0
y = -0.45
wid = 1.2*m
hig = (y-1e-3)*2

#
a = cwbox( l,m,x,y,wid,hig,res=80,maxn=3,verbose=True )




In [ ]:
#
a.map(jf)


(map)>> 

# -------------------------------------------------------------------------------- #
Attempting to map qnm solutions for: jf = 0.68000000
# -------------------------------------------------------------------------------- #

(map)>> Solvinq Leavers Eqns over grid
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Done.
(map)>> Searching for local minima. Ignoring mins on boundaries.
(map)>> Number of local minima found: 8.
(sensescale)>> Sensing the scale of the current object's sub-boxes.
(map)>> Refining QNM solution locations using a hybrid strategy.
(refine)>> * Constructing guess using scberti-grid or extrap.
(guess)>> The function value at guess from grid is 5.78838617166
The final function value is 2.48274659684e-14

	 Geuss   cw: (-0.167088607595-0.763987341772j)
	 Optimal cw: (-0.159237603682-0.757745990482j)
	 Approx  sc: (4.38594109645+1.32717855747j)
	 Geuss   sc: (4.38594109645+1.32717855747j)
	 Optimal sc: (4.47049532106+1.28478149076j)

(sensescale)>> Sensing the scale of the current object's sub-boxes.
(refine)>> * Constructing guess using scberti-grid or extrap.
(guess)>> The function value at guess from grid is 9.10338900321

In [ ]:
from matplotlib.pyplot import close
close('all')
a.plot(showlabel=True)
# savefig( 'cwbox_example_chi%1.4f_l%im%i.pdf' % (jf,l,m) )

In [315]:
# a.map(jf+0.01)
# a.plot(showlabel=True)
# savefig( 'cwbox_example_chi%1.4f_l%im%i.pdf' % (a.__jf__[-1],l,m) )

In [316]:
# a.data

In [317]:
# from numpy import vstack

# D = vstack([a.data[(l,m,0,0)]['jf'],a.data[(l,m,0,0)]['cw'],a.data[(l,m,0,0)]['sc'],a.data[(l,m,0,0)]['lvrfmin']])
# print D.T.shape

In [ ]: