In [1]:
from matplotlib.pyplot import *
%matplotlib inline
from scipy.optimize import leastsq

Molecular weights and corresponding radii of gyration taken from the litterature.


In [3]:
Mws = np.array([69.2e3, 2e5, 212.4e3, 333e3, 681e3, 900e3, 1.95e6, 11.4e6, 13.2e6, 21e6, 31e6])
Rgs = np.array([10.0, 12.5, 0.02*660, 15, 33.0, 41, 35, 1330*0.14, 145.4, 180, 220])
scatter(Mws, Rgs)
xscale('log')
yscale('log')
#Flory exponent
a = np.exp(leastsq(
    lambda p, x, y: p[0] + 3/5.*x-y, 
    [1], 
    args=(np.log(Mws), np.log(Rgs))
    )[0][0])
X = 10**np.arange(4,9)
plot(X, a*X**(3/5.))
#free exponent
b, nu = leastsq(
    lambda p, x, y: p[0] + p[1]*x-y, 
    [1, 3/5.], 
    args=(np.log(Mws), np.log(Rgs))
    )[0]
b = np.exp(b)
plot(X, b*X**nu)


Out[3]:
[<matplotlib.lines.Line2D at 0x7fa0cf3de6d0>]

Get your estimates


In [4]:
myMws = np.array([3.8e6, 8.4e6])
print a * myMws**(3/5.)
print b * myMws**nu


[  76.02022643  122.35636673]
[  73.15534279  113.84234119]

In [ ]: