In [1]:
%pylab inline


Populating the interactive namespace from numpy and matplotlib

In [2]:
def transmonFreq(x, b):
    return sqrt(8 * b[3] * (b[0] * cos(pi * x + b[2])*sqrt(1 + b[1]**2 * tan(pi * x + b[2])**2)))

In [8]:
x = linspace(-.85, .85, 101) * .6
y = transmonFreq(x, [15, 1/3, 0, .226])
plt.plot(x, y)


/usr/local/lib/python3.4/dist-packages/ipykernel/__main__.py:2: RuntimeWarning: invalid value encountered in sqrt
  from ipykernel import kernelapp as app
Out[8]:
[<matplotlib.lines.Line2D at 0x7f30fbb09860>]

In [ ]: