In [1]:
%run basics
%matplotlib


Using matplotlib backend: Qt4Agg

In [2]:
def NEE_Lasslop(Fsd,D,T,D0,E0,alpha,beta0,k,rb):
    NEE = -1*GPP_Lasslop(Fsd,D,alpha,beta0,k,D0) + ER_LloydTaylor(T,rb,E0)
    return NEE

In [3]:
def NEE_Isaac(Fsd,D,T,D0,E0,alpha,beta0,rb):
#def NEE_Isaac(args,params):
    NEE = -1*GPP_Isaac(Fsd,D,alpha,beta0,D0) + ER_LloydTaylor(T,rb,E0)
    return NEE

In [4]:
def NEE_NRH_Isaac(Fsd,D,T,D0,E0,alpha,beta0,eta,rb):
    NEE = -1*GPP_NRH_Isaac(Fsd,D,alpha,beta0,eta,D0) + ER_LloydTaylor(T,rb,E0)
    return NEE

In [5]:
def GPP_Lasslop(Fsd,D,alpha,beta0,k,D0):
    beta = beta0*SHD_func_Lasslop(D,k,D0)
    GPP = alpha*beta*Fsd/(alpha*Fsd+beta)
    return GPP

In [6]:
def GPP_Isaac(Fsd,D,alpha,beta0,D0):
    beta = beta0*SHD_func_Isaac(D,D0)
    GPP = alpha*beta*Fsd/(alpha*Fsd+beta)
    return GPP

In [7]:
def GPP_NRH_Isaac(Fsd,D,alpha,beta0,eta,D0):
    beta = beta0*SHD_func_Isaac(D,D0)
    GPP = (1/(2*eta))*(alpha*Fsd+beta-numpy.sqrt((alpha*Fsd+beta)**2-4*alpha*beta*eta*Fsd))
    return GPP

In [8]:
def SHD_func_Lasslop(D,k,D0):
    SHD_func = numpy.ones(len(D))
    idx = numpy.where(D>D0)[0]
    SHD_func[idx] = numpy.exp(-k*(D[idx]-D0))
    return SHD_func

In [9]:
def SHD_func_Isaac(D,D0):
    SHD_func = numpy.ones(len(D))
    idx = numpy.where(D>D0)[0]
    SHD_func[idx] = 1/(1+(D[idx]-D0)/D0)
    return SHD_func

In [10]:
def ER_LloydTaylor(T,rb,E0):
#    return rb*numpy.exp(E0*(1/(c.Tref-c.T0)-1/(T-c.T0)))
    return rb*numpy.exp(E0*(1/(288.13-227.13)-1/((T+273.15)-227.13)))

In [11]:
def plot_ER(fig,i,ER,T,Sws,weight_type='Huber'):
    ax = fig.add_subplot(2,2,i)
    popt,pcov = irls_leastsq(residuals_LT,[2,200],args=(ER,T),maxfev=3,weight_type=weight_type)
    resid = ER - ER_LloydTaylor(T,popt[0],popt[1])
    weights = CalculateWeights(resid,weight_type=weight_type)
    plt.scatter(T,ER,c=weights)
    #mean,edges,number = scipy.stats.binned_statistic(T,Reco,statistic='mean')
    #mid = [(edges[i]+edges[i+1])/2 for i in range(0,len(edges)-1)]
    #plt.plot(mid,mean,'ro')
    Xfit = numpy.linspace(numpy.min(T),numpy.max(T),100)
    Yfit = ER_LloydTaylor(Xfit,popt[0],popt[1])
    plt.plot(Xfit,Yfit,'r-')
    text_str = ('%.2f < Sws < %.2f'%(Sws[0],Sws[-1]))
    plt.text(0.5,0.9,text_str,horizontalalignment='center',transform=ax.transAxes)
    text_str = ('rb=%.2f,E0=%.2f'%(popt[0],popt[-1]))
    plt.text(0.5,0.8,text_str,horizontalalignment='center',transform=ax.transAxes)

In [12]:
def irls_leastsq(func,p0,args=(),maxfev=3,weight_type='Huber',mode='verbose'):
    weighted = False
    popt,pcov = scipy.optimize.leastsq(func,p0,args=args+(weighted,weight_type))
    print 'After non-weighted call to leastsq: ',popt
    n=1
    weighted = True
    while n<=maxfev:
        popt,pcov = scipy.optimize.leastsq(func,popt,args=args+(weighted,weight_type))
        if mode=='verbose':
            print 'Weighted call '+str(n)+' to leastsq: ',popt
        ER_fit = ER_LloydTaylor(args[1],popt[0],popt[1])
        #NEE_plt = NEE_Isaac(args[1:],popt)
        resid = args[0] - ER_fit
        weights = CalculateWeights(resid,weight_type=weight_type)
        #fig = plt.figure()
        #plt.scatter(args[1],args[0],c=weights)
        #plt.plot(args[1],ER_fit,'r+')
        #plt.show()
        n = n + 1
    return popt,pcov

In [13]:
def residuals_LloydTaylor(params,ER,T,weighted,weight_type):
    rb = params[0]
    E0 = params[1]
    resid = ER - ER_LloydTaylor(T,rb,E0)
    if weighted:
        weights = CalculateWeights(resid,weight_type=weight_type)
        return resid*weights
    else:
        return resid

In [14]:
def residuals_Lasslop(params,NEE,Fsd,D,T,D0,E0,weighted,weight_type):
    alpha = params[0]
    beta0 = params[1]
    k = params[2]
    rb = params[3]
    resid = NEE - NEE_Lasslop(Fsd,D,T,D0,E0,alpha,beta0,k,rb)
    if weighted:
        weights = CalculateWeights(resid,weight_type=weight_type)
        return resid*weights
    else:
        return resid

In [15]:
def residuals_Isaac(params,NEE,Fsd,D,T,D0,E0,weighted,weight_type):
    """
    Purpose:
    Residual function for use in fitting LRC to observations of NEE.
    Usage:
    Passed to leastsq curve fit function.
    Where:
     params is an array of paramters to be fitted
      - params[0] is alpha
        params[1] is beta0
        params[2] is eta, curvature of NRH
        params[3] is rb
    NEE is observed net ecosystem exchange
    Fsd is incoming shortwave
    D is SHD
    T is T
    D0 is blah
    E0 is temperature sensitivity of ER
    Author: PRI
    Date: Back in the day
    """
    alpha = params[0]
    beta0 = params[1]
    eta = params[2]
    rb = params[3]
    resid = NEE - NEE_NRH_Isaac(Fsd,D,T,D0,E0,alpha,beta0,eta,rb)
    if weighted:
        weights = CalculateWeights(resid,weight_type=weight_type)
        return resid*weights
    else:
        return resid

In [16]:
def CalculateWeights(resid,weight_type='Huber'):
    if weight_type.lower()=='tukey':
        weights = TukeyBiweight(MAD_scale(resid))
    elif weight_type.lower()=='huber':
        weights = HuberTWeight(MAD_scale(resid))
    elif weight_type.lower()=='ols':
        weights = OLSWeight(MAD_scale(resid))
    else:
        print "CalculateWeights: Unknown weight type, used Huber's t weight"
        weights = HuberTWeight(MAD_scale(resid))
    return weights

In [17]:
def TukeyBiweight(x):
    return ((numpy.abs(x)<1.0)*(1.0 - x**2)**2)

In [18]:
def HuberTWeight(x):
    weights = numpy.ones(len(x))
    idx = numpy.where(numpy.abs(x)>1.345)[0]
    weights[idx] = 1.345/numpy.abs(x[idx])
    return weights

In [19]:
def OLSWeight(x):
    weights = numpy.ones(len(x))
    return weights

In [20]:
def MAD_scale(resid):
    scale = numpy.median(numpy.abs(resid - numpy.median(resid))) / 0.6745
    return resid/scale

In [21]:
#ncname = "qcio.get_filename_dialog(path="../../Sites/HowardSprings/Data/Processed/all")"
ncname ="C:/OzFlux/Sites/CUP/Processed/CUP_2012_to_2015_L6_v295.nc"
print ncname
ds = qcio.nc_read_series(ncname)
ldt = ds.series["DateTime"]["Data"]
ts = int(ds.globalattributes["time_step"])
site_name = ds.globalattributes["site_name"]


C:/OzFlux/Sites/CUP/Processed/CUP_2012_to_2015_L6_v295.nc
C:/OzFlux/Sites/CUP/Processed/CUP_2012_to_2015_L6_v295.nc

In [78]:
Fsd,f,a = qcutils.GetSeriesasMA(ds,"Fsd")
D,f,a = qcutils.GetSeriesasMA(ds,"VPD")
T,f,a = qcutils.GetSeriesasMA(ds,"Ta")
ER,f,a = qcutils.GetSeriesasMA(ds,"ER")
Fc,f,a = qcutils.GetSeriesasMA(ds,"Fc")

In [79]:
fig = plt.figure(1)
ax1=plt.subplot(511)
plt.plot(ldt,Fsd)
ax2=plt.subplot(512,sharex=ax1)
plt.plot(ldt,D)
ax3=plt.subplot(513,sharex=ax1)
plt.plot(ldt,T)
ax4=plt.subplot(514,sharex=ax1)
plt.plot(ldt,Fc)
ax5=plt.subplot(515,sharex=ax1)
plt.plot(ldt,ER)
plt.show()

In [80]:
mask = ER.mask
for item in [T]:
    mask = numpy.ma.mask_or(mask,item.mask)
ER = numpy.ma.array(ER,mask=mask)
T = numpy.ma.array(T,mask=mask)
start_date = ldt[0]
end_date = ldt[-1]
this_date = start_date+dateutil.relativedelta.relativedelta(months=1)
LloydTaylor_results = {"start_date":[],"end_date":[],"rb":[],"E0":[]}
while start_date<end_date:
    LloydTaylor_results["start_date"].append(str(start_date))
    LloydTaylor_results["end_date"].append(str(end_date))
    si = qcutils.GetDateIndex(ldt,str(start_date))
    ei = qcutils.GetDateIndex(ldt,str(end_date))
    ER_plt = numpy.ma.compressed(ER[si:ei+1])
    T_plt = numpy.ma.compressed(T[si:ei+1])
    popt,pcov = irls_leastsq(residuals_LloydTaylor,[1,100],args=(ER_plt,T_plt),maxfev=3,weight_type='Huber',mode='quiet')
    LloydTaylor_results["rb"].append(popt[0])
    LloydTaylor_results["E0"].append(popt[1])
    start_date = this_date
    this_date = start_date+dateutil.relativedelta.relativedelta(months=1)


After non-weighted call to leastsq:  [   1.90137294  234.94969453]
After non-weighted call to leastsq:  [   1.90151661  236.05555074]
After non-weighted call to leastsq: After non-weighted call to leastsq:  [   1.90137294  234.94969453]
After non-weighted call to leastsq:  [   1.90151661  236.05555074]
After non-weighted call to leastsq:  [   1.9038782   236.22424634]
After non-weighted call to leastsq:  [   1.9038782   236.22424634]
After non-weighted call to leastsq:  [   1.89636458  251.74429263]
After non-weighted call to leastsq:  [   1.89636458  251.74429263]
After non-weighted call to leastsq:  [   1.887009    255.62671028]
After non-weighted call to leastsq:  [   1.88727837  249.21668691]
After non-weighted call to leastsq:  [   1.887009    255.62671028]
After non-weighted call to leastsq:  [   1.88727837  249.21668691]
After non-weighted call to leastsq:  [   1.88494721  249.09759354]
After non-weighted call to leastsq:  [   1.88494721  249.09759354]
After non-weighted call to leastsq:  [   1.87900316  250.25824128]
After non-weighted call to leastsq:  [   1.87900316  250.25824128]
After non-weighted call to leastsq:  [   1.90007171  245.64088765]
After non-weighted call to leastsq:  [   1.90007171  245.64088765]
After non-weighted call to leastsq:  [   1.9089903   243.42891987]
After non-weighted call to leastsq:  [   1.9089903   243.42891987]
After non-weighted call to leastsq:  [   1.94599981  235.85098713]
After non-weighted call to leastsq:  [   1.94599981  235.85098713]
After non-weighted call to leastsq:  [   1.97606067  232.35742349]
After non-weighted call to leastsq:  [   2.00479025  239.95102405]
After non-weighted call to leastsq:  [   1.97606067  232.35742349]
After non-weighted call to leastsq:  [   2.00479025  239.95102405]
After non-weighted call to leastsq:  [   2.02466786  245.70950049]
After non-weighted call to leastsq:  [   2.01111273  253.09276115]
After non-weighted call to leastsq:  [   2.02466786  245.70950049]
After non-weighted call to leastsq:  [   2.01111273  253.09276115]
After non-weighted call to leastsq:  [   1.97605072  277.67492416]
After non-weighted call to leastsq:  [   1.97605072  277.67492416]
After non-weighted call to leastsq:  [   1.96096852  297.60995768]
After non-weighted call to leastsq:  [   1.94173937  296.84923288]
After non-weighted call to leastsq:  [   1.96096852  297.60995768]
After non-weighted call to leastsq:  [   1.94173937  296.84923288]
After non-weighted call to leastsq:  [   1.9044405   298.83937548]
After non-weighted call to leastsq:  [   1.91789911  296.38240691]
After non-weighted call to leastsq:  [   1.9044405   298.83937548]
After non-weighted call to leastsq:  [   1.91789911  296.38240691]
After non-weighted call to leastsq:  [   1.94467435  295.9837346 ]
After non-weighted call to leastsq:  [   1.94467435  295.9837346 ]
After non-weighted call to leastsq:  [   2.0582911   268.41115789]
After non-weighted call to leastsq:  [   2.17208367  247.6866315 ]
After non-weighted call to leastsq:  [   2.0582911   268.41115789]
After non-weighted call to leastsq:  [   2.17208367  247.6866315 ]
After non-weighted call to leastsq:  [   2.24087155  234.21521825]
After non-weighted call to leastsq:  [   2.23445952  253.15839016]
After non-weighted call to leastsq:  [   2.24087155  234.21521825]
After non-weighted call to leastsq:  [   2.23445952  253.15839016]
After non-weighted call to leastsq:  [   2.25870888  267.16130827]
After non-weighted call to leastsq:  [   2.24334305  282.93727928]
After non-weighted call to leastsq:  [   2.25870888  267.16130827]
After non-weighted call to leastsq:  [   2.24334305  282.93727928]
After non-weighted call to leastsq:  [   2.19363765  290.52599081]
After non-weighted call to leastsq:  [   2.11936873  247.57658285]
After non-weighted call to leastsq:  [   2.19363765  290.52599081]
After non-weighted call to leastsq:  [   2.11936873  247.57658285]
After non-weighted call to leastsq:  [   2.06952711  215.67144864]
After non-weighted call to leastsq:  [   1.95093081  175.46306294]
After non-weighted call to leastsq:  [   2.06952711  215.67144864]
After non-weighted call to leastsq:  [   1.95093081  175.46306294]
After non-weighted call to leastsq:  [   1.94500642  178.79033621]
After non-weighted call to leastsq:  [   1.87508037  197.89216305]
After non-weighted call to leastsq:  [   1.94500642  178.79033621]
After non-weighted call to leastsq:  [   1.87508037  197.89216305]
After non-weighted call to leastsq:  [   2.01023933  151.82796628]
After non-weighted call to leastsq:  [   2.30020929  110.84391406]
After non-weighted call to leastsq:  [   2.34439297  128.60820086]
After non-weighted call to leastsq:  [   2.37914806  206.42979503]
 [   2.01023933  151.82796628]
After non-weighted call to leastsq:  [   2.30020929  110.84391406]
After non-weighted call to leastsq:  [   2.34439297  128.60820086]
After non-weighted call to leastsq:  [   2.37914806  206.42979503]

In [83]:
for i in range(len(LloydTaylor_results["start_date"])):
    print LloydTaylor_results["start_date"][i],LloydTaylor_results["rb"][i],LloydTaylor_results["E0"][i]


2012-10-19 00:00:00 1.71838719928 190.991662073
2012-11-19 00:00:00 1.75809289364 183.771030119
2012-12-19 00:00:00 1.72937790381 183.288415394
2013-01-19 00:00:00 1.61914923786 245.880950688
2013-02-19 00:00:00 1.63588619405 220.231507857
2013-03-19 00:00:00 1.77112622133 188.440251597
2013-04-19 00:00:00 1.88495554551 249.116688738
2013-05-19 00:00:00 1.59115247154 213.29218354
2013-06-19 00:00:00 1.68123162967 200.754857405
2013-07-19 00:00:00 1.59041268755 213.723727543
2013-08-19 00:00:00 1.73395935987 238.61112621
2013-09-19 00:00:00 1.75071088632 230.235885282
2013-10-19 00:00:00 1.46831363884 374.183817642
2013-11-19 00:00:00 1.91103874715 175.898874551
2013-12-19 00:00:00 1.68278870946 202.259860686
2014-01-19 00:00:00 1.58211683395 325.190899068
2014-02-19 00:00:00 1.56571716234 333.97287778
2014-03-19 00:00:00 1.55593129194 327.873427044
2014-04-19 00:00:00 1.61688033184 274.72063704
2014-05-19 00:00:00 1.57668420028 261.655739364
2014-06-19 00:00:00 1.698083809 290.710330905
2014-07-19 00:00:00 1.9186375832 217.992503513
2014-08-19 00:00:00 1.83628331616 243.634378035
2014-09-19 00:00:00 1.93438161988 207.453542477
2014-10-19 00:00:00 1.67656341267 379.739678209
2014-11-19 00:00:00 1.94419369367 341.699156195
2014-12-19 00:00:00 1.8650286099 373.968731606
2015-01-19 00:00:00 1.87499847676 383.23094346
2015-02-19 00:00:00 1.88407523456 153.280066284
2015-03-19 00:00:00 1.9188644569 159.961507752
2015-04-19 00:00:00 1.6708807234 245.499862463
2015-05-19 00:00:00 1.68541906663 203.83497053
2015-06-19 00:00:00 1.6262335911 207.952370821
2015-07-19 00:00:00 2.00830126151 155.113067835
2015-08-19 00:00:00 2.02665473675 61.9724581165
2015-09-19 00:00:00 2.07930741619 118.504520906
2015-10-19 00:00:00 2.90643891192 -109.561555695
2012-10-19 00:00:00 1.71838719928 190.991662073
2012-11-19 00:00:00 1.75809289364 183.771030119
2012-12-19 00:00:00 1.72937790381 183.288415394
2013-01-19 00:00:00 1.61914923786 245.880950688
2013-02-19 00:00:00 1.63588619405 220.231507857
2013-03-19 00:00:00 1.77112622133 188.440251597
2013-04-19 00:00:00 1.88495554551 249.116688738
2013-05-19 00:00:00 1.59115247154 213.29218354
2013-06-19 00:00:00 1.68123162967 200.754857405
2013-07-19 00:00:00 1.59041268755 213.723727543
2013-08-19 00:00:00 1.73395935987 238.61112621
2013-09-19 00:00:00 1.75071088632 230.235885282
2013-10-19 00:00:00 1.46831363884 374.183817642
2013-11-19 00:00:00 1.91103874715 175.898874551
2013-12-19 00:00:00 1.68278870946 202.259860686
2014-01-19 00:00:00 1.58211683395 325.190899068
2014-02-19 00:00:00 1.56571716234 333.97287778
2014-03-19 00:00:00 1.55593129194 327.873427044
2014-04-19 00:00:00 1.61688033184 274.72063704
2014-05-19 00:00:00 1.57668420028 261.655739364
2014-06-19 00:00:00 1.698083809 290.710330905
2014-07-19 00:00:00 1.9186375832 217.992503513
2014-08-19 00:00:00 1.83628331616 243.634378035
2014-09-19 00:00:00 1.93438161988 207.453542477
2014-10-19 00:00:00 1.67656341267 379.739678209
2014-11-19 00:00:00 1.94419369367 341.699156195
2014-12-19 00:00:00 1.8650286099 373.968731606
2015-01-19 00:00:00 1.87499847676 383.23094346
2015-02-19 00:00:00 1.88407523456 153.280066284
2015-03-19 00:00:00 1.9188644569 159.961507752
2015-04-19 00:00:00 1.6708807234 245.499862463
2015-05-19 00:00:00 1.68541906663 203.83497053
2015-06-19 00:00:00 1.6262335911 207.952370821
2015-07-19 00:00:00 2.00830126151 155.113067835
2015-08-19 00:00:00 2.02665473675 61.9724581165
2015-09-19 00:00:00 2.07930741619 118.504520906
2015-10-19 00:00:00 2.90643891192 -109.561555695

In [81]:
fig=plt.figure()
plt.plot(LloydTaylor_results["E0"])
plt.show()

In [73]:
Fsd,f,a = qcutils.GetSeriesasMA(ds,"Fsd")
D,f,a = qcutils.GetSeriesasMA(ds,"VPD")
T,f,a = qcutils.GetSeriesasMA(ds,"Ta")
ER,f,a = qcutils.GetSeriesasMA(ds,"ER")
Fc,f,a = qcutils.GetSeriesasMA(ds,"Fc")

In [74]:
Fc = numpy.ma.masked_where(f!=0,Fc)
#see the beautiful way to mask the data!
Fc_day = numpy.ma.masked_where(Fsd<=10,Fc)
Fc_night = numpy.ma.masked_where(Fsd>10,Fc)
mask = Fc_day.mask
for item in [D,T]:
    mask = numpy.ma.mask_or(mask,item.mask)
NEE_day = numpy.ma.array(Fc_day,mask=mask)
Fsd = numpy.ma.array(Fsd,mask=mask)
D = numpy.ma.array(D,mask=mask)
T = numpy.ma.array(T,mask=mask)

In [75]:
fig = plt.figure(1)
ax1=plt.subplot(411)
plt.plot(ldt,Fsd)
ax2=plt.subplot(412,sharex=ax1)
plt.plot(ldt,D)
ax3=plt.subplot(413,sharex=ax1)
plt.plot(ldt,T)
ax4=plt.subplot(414,sharex=ax1)
plt.plot(ldt,NEE_day)
plt.show()

In [76]:
window_size = 15
jump_size = 5
start_date = ldt[0]
#end_date = datetime.datetime(start_date.year+1,1,1)+datetime.timedelta(minutes=ts)
end_date = ldt[-1]
this_date = start_date + datetime.timedelta(days=window_size)
Lasslop_results = {"start_date":[],"end_date":[],"alpha":[],"beta0":[],"k":[],"rb_day":[]}
while this_date<end_date:
    Lasslop_results["start_date"].append(str(start_date))
    Lasslop_results["end_date"].append(str(end_date))
    si = qcutils.GetDateIndex(ldt,str(start_date),ts=ts)
    ei = qcutils.GetDateIndex(ldt,str(this_date),ts=ts)
    ldt_plt = ldt[si:ei+1]
    NEE_plt = NEE_day[si:ei+1]
    Fsd_plt = Fsd[si:ei+1]
    D_plt = D[si:ei+1]
    T_plt = T[si:ei+1]
    #this identifies index values or row numbers of good data
    idx = numpy.ma.where(NEE_plt.mask==False)[0]
    ldt_plt = [ldt_plt[i] for i in idx]
    #numpy.ma.compressed tosses out the masked data in order to curve fit on the subset
    NEE_plt = numpy.ma.compressed(NEE_plt)
    Fsd_plt = numpy.ma.compressed(Fsd_plt)
    D_plt = numpy.ma.compressed(D_plt)
    T_plt = numpy.ma.compressed(T_plt)
    #popt,pcov = irls_leastsq(residuals_Lasslop,[0.1,100,0,1],args=(NEE_plt,Fsd_plt,D_plt,T_plt,0.005,210),maxfev=3,weight_type='Huber')
    popt,pcov = irls_leastsq(residuals_Isaac,[0.1,100,1,1],args=(NEE_plt,Fsd_plt,D_plt,T_plt,1.0,250),
                             maxfev=3,weight_type='Huber',mode='quiet')
    Lasslop_results["alpha"].append(popt[0])
    Lasslop_results["beta0"].append(popt[1])
    Lasslop_results["k"].append(popt[2])
    Lasslop_results["rb_day"].append(popt[3])
    #print start_date,this_date,popt
    start_date = start_date + datetime.timedelta(days=jump_size)
    this_date = start_date + datetime.timedelta(days=window_size)


After non-weighted call to leastsq:  [  1.02094644e-02   1.12188420e+01   1.00000556e+00   2.40383036e-01]
After non-weighted call to leastsq: After non-weighted call to leastsq:  [  1.02094644e-02   1.12188420e+01   1.00000556e+00   2.40383036e-01]
After non-weighted call to leastsq:  [  8.98820644e-03   1.04516309e+01   1.00000853e+00   3.91315559e-01]
After non-weighted call to leastsq:  [  8.98820644e-03   1.04516309e+01   1.00000853e+00   3.91315559e-01]
After non-weighted call to leastsq:  [  7.47390884e-03   1.09331010e+01   1.00000013e+00   5.10170927e-01]
After non-weighted call to leastsq:  [  7.47390884e-03   1.09331010e+01   1.00000013e+00   5.10170927e-01]
After non-weighted call to leastsq:  [  8.66272671e-03   1.26748513e+01   9.77304802e-01   7.36171931e-01]
After non-weighted call to leastsq:  [  8.66272671e-03   1.26748513e+01   9.77304802e-01   7.36171931e-01]
After non-weighted call to leastsq:  [  8.41836817e-03   1.29112276e+01   9.79458209e-01   4.93803002e-01]
After non-weighted call to leastsq:  [  0.01285318  11.48676038   0.99659118   1.06474331]
After non-weighted call to leastsq:  [  8.41836817e-03   1.29112276e+01   9.79458209e-01   4.93803002e-01]
After non-weighted call to leastsq:  [  0.01285318  11.48676038   0.99659118   1.06474331]
After non-weighted call to leastsq:  [  0.01351648  12.55530595   0.99747434   1.50916013]
After non-weighted call to leastsq:  [  0.01696153  16.67012697   0.89605915   1.65642255]
After non-weighted call to leastsq:  [  0.01351648  12.55530595   0.99747434   1.50916013]
After non-weighted call to leastsq:  [  0.01696153  16.67012697   0.89605915   1.65642255]
After non-weighted call to leastsq:  [  2.80343527e-02   4.93370085e+01  -3.67828225e+00   1.69578294e+00]
After non-weighted call to leastsq:  [  2.00813371e-02   1.98689767e+02  -2.97542292e+01   5.68004573e-01]
After non-weighted call to leastsq:  [  2.80343527e-02   4.93370085e+01  -3.67828225e+00   1.69578294e+00]
After non-weighted call to leastsq:  [  2.00813371e-02   1.98689767e+02  -2.97542292e+01   5.68004573e-01]
After non-weighted call to leastsq:  [  0.02083622  10.1696025    0.72479393   0.70038111]
After non-weighted call to leastsq:  [  0.02083622  10.1696025    0.72479393   0.70038111]
After non-weighted call to leastsq:  [  0.01642344  12.71505793   0.67691527   0.70280956]
After non-weighted call to leastsq:  [  0.01716369  11.65881843   0.96189096   1.30108616]
After non-weighted call to leastsq:  [  0.01642344  12.71505793   0.67691527   0.70280956]
After non-weighted call to leastsq:  [  0.01716369  11.65881843   0.96189096   1.30108616]
After non-weighted call to leastsq:  [  0.01189679  11.30105767   0.99999996   1.25194618]
After non-weighted call to leastsq:  [  0.01516816  11.76446624   0.93685431   1.07479499]
After non-weighted call to leastsq:  [  0.01189679  11.30105767   0.99999996   1.25194618]
After non-weighted call to leastsq:  [  0.01516816  11.76446624   0.93685431   1.07479499]
After non-weighted call to leastsq:  [  0.01154134  10.91085487   1.00000043   0.71862661]
After non-weighted call to leastsq:  [  0.01475735  12.11902518   0.97348878   0.90926063]
After non-weighted call to leastsq:  [  0.01154134  10.91085487   1.00000043   0.71862661]
After non-weighted call to leastsq:  [  0.01475735  12.11902518   0.97348878   0.90926063]
After non-weighted call to leastsq:  [  0.01168201  11.40176294   1.00000299   0.81810393]
After non-weighted call to leastsq:  [  0.01168201  11.40176294   1.00000299   0.81810393]
After non-weighted call to leastsq:  [ 0.01327192  9.63136782  0.86050988  0.9789647 ]
After non-weighted call to leastsq:  [  0.01401328  13.26614607   0.64588675   1.29758392]
After non-weighted call to leastsq:  [ 0.01327192  9.63136782  0.86050988  0.9789647 ]
After non-weighted call to leastsq:  [  0.01401328  13.26614607   0.64588675   1.29758392]
After non-weighted call to leastsq:  [  1.17476895e-02   2.61819077e+01   2.57947998e-01   1.90541596e+00]
After non-weighted call to leastsq:  [  1.63075059e-02   1.90040727e+02  -1.54771154e+01   1.68335471e+00]
After non-weighted call to leastsq:  [  1.17476895e-02   2.61819077e+01   2.57947998e-01   1.90541596e+00]
After non-weighted call to leastsq:  [  1.63075059e-02   1.90040727e+02  -1.54771154e+01   1.68335471e+00]
After non-weighted call to leastsq:  [ nan  nan  nan  nan]
After non-weighted call to leastsq:  [ nan  nan  nan  nan]
After non-weighted call to leastsq:  [ nan  nan  nan  nan]
After non-weighted call to leastsq:  [ nan  nan  nan  nan]
After non-weighted call to leastsq:  [ nan  nan  nan  nan]
After non-weighted call to leastsq:  [ nan  nan  nan  nan]
After non-weighted call to leastsq:  [  1.21566404e-02   1.73754150e+01   9.77824342e-01   9.46009949e-01]
After non-weighted call to leastsq:  [  1.11462335e-02   1.68342038e+01   9.84953009e-01   8.00119879e-01]
After non-weighted call to leastsq:  [  1.15286751e-02   1.77020602e+01   9.94053178e-01   9.26672371e-01]
After non-weighted call to leastsq:  [  1.21566404e-02   1.73754150e+01   9.77824342e-01   9.46009949e-01]
After non-weighted call to leastsq:  [  1.11462335e-02   1.68342038e+01   9.84953009e-01   8.00119879e-01]
After non-weighted call to leastsq:  [  1.15286751e-02   1.77020602e+01   9.94053178e-01   9.26672371e-01]
After non-weighted call to leastsq:  [  1.17212067e-02   1.58088413e+01   1.00000016e+00   7.05065281e-01]
After non-weighted call to leastsq:  [  1.17212067e-02   1.58088413e+01   1.00000016e+00   7.05065281e-01]
After non-weighted call to leastsq:  [  1.29449985e-02   1.55657716e+01   1.00000663e+00   6.09739152e-01]
After non-weighted call to leastsq:  [  1.29449985e-02   1.55657716e+01   1.00000663e+00   6.09739152e-01]
After non-weighted call to leastsq:  [  1.22481891e-02   1.51846232e+01   9.99763018e-01   2.71418950e-01]
After non-weighted call to leastsq:  [  1.42020104e-02   1.45985887e+01   9.94731477e-01   4.13859827e-01]
After non-weighted call to leastsq:  [  1.22481891e-02   1.51846232e+01   9.99763018e-01   2.71418950e-01]
After non-weighted call to leastsq:  [  1.42020104e-02   1.45985887e+01   9.94731477e-01   4.13859827e-01]
After non-weighted call to leastsq:  [  9.40725580e-03   1.99458925e+01   1.00042966e+00  -4.01615735e-01]
After non-weighted call to leastsq:  [  8.85508458e-03   1.04325916e+01   1.00000035e+00  -3.45190878e-01]
After non-weighted call to leastsq:  [  8.89642845e-03   9.69892055e+00   9.99999962e-01  -1.74914585e-01]
After non-weighted call to leastsq:  [  9.40725580e-03   1.99458925e+01   1.00042966e+00  -4.01615735e-01]
After non-weighted call to leastsq:  [  8.85508458e-03   1.04325916e+01   1.00000035e+00  -3.45190878e-01]
After non-weighted call to leastsq:  [  8.89642845e-03   9.69892055e+00   9.99999962e-01  -1.74914585e-01]
After non-weighted call to leastsq:  [  9.73147148e-03   2.55923842e+01   1.03624868e+00   6.54583872e-02]
After non-weighted call to leastsq:  [  1.06711956e-02   2.31470920e+01   1.00741542e+00   6.64636306e-02]
After non-weighted call to leastsq:  [  9.73147148e-03   2.55923842e+01   1.03624868e+00   6.54583872e-02]
After non-weighted call to leastsq:  [  1.06711956e-02   2.31470920e+01   1.00741542e+00   6.64636306e-02]
After non-weighted call to leastsq:  [  1.17034345e-02   2.23569008e+01   1.00050408e+00   1.75610939e-01]
After non-weighted call to leastsq:  [  1.17034345e-02   2.23569008e+01   1.00050408e+00   1.75610939e-01]
After non-weighted call to leastsq: 
C:\Anaconda\lib\site-packages\IPython\kernel\__main__.py:3: RuntimeWarning: invalid value encountered in sqrt
  app.launch_new_instance()
C:\Anaconda\lib\site-packages\IPython\kernel\__main__.py:2: RuntimeWarning: invalid value encountered in absolute
  from IPython.kernel.zmq import kernelapp as app
C:\Anaconda\lib\site-packages\IPython\kernel\__main__.py:3: RuntimeWarning: invalid value encountered in absolute
  app.launch_new_instance()
C:\Anaconda\lib\site-packages\IPython\kernel\__main__.py:3: RuntimeWarning: invalid value encountered in greater
  app.launch_new_instance()
C:\Anaconda\lib\site-packages\IPython\kernel\__main__.py:3: RuntimeWarning: overflow encountered in exp
  app.launch_new_instance()
C:\Anaconda\lib\site-packages\IPython\kernel\__main__.py:3: RuntimeWarning: invalid value encountered in sqrt
  app.launch_new_instance()
C:\Anaconda\lib\site-packages\IPython\kernel\__main__.py:2: RuntimeWarning: invalid value encountered in absolute
  from IPython.kernel.zmq import kernelapp as app
C:\Anaconda\lib\site-packages\IPython\kernel\__main__.py:3: RuntimeWarning: invalid value encountered in absolute
  app.launch_new_instance()
C:\Anaconda\lib\site-packages\IPython\kernel\__main__.py:3: RuntimeWarning: invalid value encountered in greater
  app.launch_new_instance()
C:\Anaconda\lib\site-packages\IPython\kernel\__main__.py:3: RuntimeWarning: overflow encountered in exp
  app.launch_new_instance()
 [  1.23623549e-02   4.81914454e+05   1.91040576e+03   4.47942302e-02]
After non-weighted call to leastsq:  [  1.23623549e-02   4.81914454e+05   1.91040576e+03   4.47942302e-02]
After non-weighted call to leastsq:  [ nan  nan  nan  nan]
After non-weighted call to leastsq:  [ nan  nan  nan  nan]
After non-weighted call to leastsq:  [  4.66826815e-06  -2.61283662e-03   4.36254122e-04  -5.33499127e+00]
After non-weighted call to leastsq:  [  4.66826815e-06  -2.61283662e-03   4.36254122e-04  -5.33499127e+00]
After non-weighted call to leastsq:  [  2.82918713e-11  -1.85567159e-08   3.52807883e-09  -5.51854023e+00]
After non-weighted call to leastsq:  [  6.83553135e-04  -1.87762710e-01   3.42491656e-02  -4.54873939e+00]
After non-weighted call to leastsq:  [  2.82918713e-11  -1.85567159e-08   3.52807883e-09  -5.51854023e+00]
After non-weighted call to leastsq:  [  6.83553135e-04  -1.87762710e-01   3.42491656e-02  -4.54873939e+00]
After non-weighted call to leastsq:  [  6.32067806e-03   7.45412869e+06   1.02314592e+00  -1.08414893e+00]
After non-weighted call to leastsq:  [  6.32067806e-03   7.45412869e+06   1.02314592e+00  -1.08414893e+00]
After non-weighted call to leastsq:  [  6.14669067e-03   1.06156484e+08   9.65006416e-01  -1.17316305e+00]
After non-weighted call to leastsq:  [  1.07275112e-02   1.16527026e+08  -7.24417813e-01  -8.32350646e-01]
After non-weighted call to leastsq:  [ 0.01454434  6.67207877  1.0000003  -0.37975426]
After non-weighted call to leastsq:  [  6.14669067e-03   1.06156484e+08   9.65006416e-01  -1.17316305e+00]
After non-weighted call to leastsq:  [  1.07275112e-02   1.16527026e+08  -7.24417813e-01  -8.32350646e-01]
After non-weighted call to leastsq:  [ 0.01454434  6.67207877  1.0000003  -0.37975426]
After non-weighted call to leastsq:  [  1.25069267e-02   1.45627403e+08  -6.96990877e-01  -5.55690839e-01]
After non-weighted call to leastsq:  [  1.35466340e-02   1.95802359e+07   9.49127402e-01   2.15906167e-02]
After non-weighted call to leastsq:  [  1.25069267e-02   1.45627403e+08  -6.96990877e-01  -5.55690839e-01]
After non-weighted call to leastsq:  [  1.35466340e-02   1.95802359e+07   9.49127402e-01   2.15906167e-02]
After non-weighted call to leastsq:  [  1.15024649e-02   1.77978251e+01   1.07331560e+00  -2.67451020e-01]
After non-weighted call to leastsq:  [  1.15024649e-02   1.77978251e+01   1.07331560e+00  -2.67451020e-01]
After non-weighted call to leastsq:  [  0.09999999  55.00899821   0.99999998   1.00000568]
After non-weighted call to leastsq:  [  0.09999999  55.00899821   0.99999998   1.00000568]
After non-weighted call to leastsq:  [  0.09999998  55.31219385   0.99999998   1.0000061 ]
After non-weighted call to leastsq:  [  1.10293885e-02   4.77167097e+07   2.27366305e+00  -6.16951151e-01]
After non-weighted call to leastsq:  [  0.09999998  55.31219385   0.99999998   1.0000061 ]
After non-weighted call to leastsq:  [  1.10293885e-02   4.77167097e+07   2.27366305e+00  -6.16951151e-01]
After non-weighted call to leastsq:  [  1.12602023e-02   1.19571329e+06  -1.79129393e-01  -6.28311065e-01]
After non-weighted call to leastsq:  [  1.12602023e-02   1.19571329e+06  -1.79129393e-01  -6.28311065e-01]
After non-weighted call to leastsq:  [  8.00299279e-03   1.60596591e+01   1.20001625e+00  -1.34886140e+00]
After non-weighted call to leastsq:  [  8.37672482e-03   4.59023037e+07   1.02825840e+00  -1.77778688e+00]
After non-weighted call to leastsq:  [  8.00299279e-03   1.60596591e+01   1.20001625e+00  -1.34886140e+00]
After non-weighted call to leastsq:  [  8.37672482e-03   4.59023037e+07   1.02825840e+00  -1.77778688e+00]
After non-weighted call to leastsq:  [  9.07619449e-03   1.10782946e+01   1.00005120e+00  -1.41392835e+00]
After non-weighted call to leastsq:  [  1.13677691e-02   1.55556602e+01   1.00070755e+00  -4.53592706e-01]
After non-weighted call to leastsq:  [  9.07619449e-03   1.10782946e+01   1.00005120e+00  -1.41392835e+00]
After non-weighted call to leastsq:  [  1.13677691e-02   1.55556602e+01   1.00070755e+00  -4.53592706e-01]
After non-weighted call to leastsq:  [  1.06501901e-02   1.43573953e+01   1.00036444e+00  -3.09703094e-01]
After non-weighted call to leastsq:  [  1.01421702e-02   1.39949611e+01   1.00094722e+00  -3.86045823e-01]
After non-weighted call to leastsq:  [  1.06501901e-02   1.43573953e+01   1.00036444e+00  -3.09703094e-01]
After non-weighted call to leastsq:  [  1.01421702e-02   1.39949611e+01   1.00094722e+00  -3.86045823e-01]
After non-weighted call to leastsq:  [ 0.01011172  8.29554118  0.99907765 -0.65951229]
After non-weighted call to leastsq:  [ 0.01011172  8.29554118  0.99907765 -0.65951229]
After non-weighted call to leastsq:  [ 0.01094582  8.02657174  0.99999995 -0.41853133]
After non-weighted call to leastsq:  [ 0.00996064  8.54106035  0.99385219 -0.22268942]
After non-weighted call to leastsq:  [ 0.01094582  8.02657174  0.99999995 -0.41853133]
After non-weighted call to leastsq:  [ 0.00996064  8.54106035  0.99385219 -0.22268942]
After non-weighted call to leastsq:  [  1.20284933e-02   1.32353074e+01   8.79893236e-01  -2.55678711e-02]
After non-weighted call to leastsq:  [  1.20284933e-02   1.32353074e+01   8.79893236e-01  -2.55678711e-02]
After non-weighted call to leastsq:  [  9.24447650e-03   1.03252906e+01   1.00015060e+00  -2.57908656e-01]
After non-weighted call to leastsq:  [  8.38604996e-03   1.15615496e+01   1.00000021e+00  -3.99554747e-01]
After non-weighted call to leastsq:  [  9.24447650e-03   1.03252906e+01   1.00015060e+00  -2.57908656e-01]
After non-weighted call to leastsq:  [  8.38604996e-03   1.15615496e+01   1.00000021e+00  -3.99554747e-01]
After non-weighted call to leastsq:  [ nan  nan  nan  nan]
After non-weighted call to leastsq:  [ nan  nan  nan  nan]
After non-weighted call to leastsq:  [ nan  nan  nan  nan]
After non-weighted call to leastsq:  [ nan  nan  nan  nan]
After non-weighted call to leastsq:  [  6.11006614e-03   9.90653479e+00   9.99926801e-01   2.57337262e-01]
After non-weighted call to leastsq:  [  6.11006614e-03   9.90653479e+00   9.99926801e-01   2.57337262e-01]
After non-weighted call to leastsq:  [  7.32371011e-03   1.04442399e+01   9.95261884e-01   7.39255423e-01]
After non-weighted call to leastsq:  [  7.32371011e-03   1.04442399e+01   9.95261884e-01   7.39255423e-01]
After non-weighted call to leastsq:  [ nan  nan  nan  nan]
After non-weighted call to leastsq:  [ nan  nan  nan  nan]
After non-weighted call to leastsq:  [  6.69481444e-03   8.71389996e+00   1.00000123e+00   7.99210946e-01]
After non-weighted call to leastsq:  [  6.69481444e-03   8.71389996e+00   1.00000123e+00   7.99210946e-01]
After non-weighted call to leastsq:  [ nan  nan  nan  nan]
After non-weighted call to leastsq:  [ nan  nan  nan  nan]
After non-weighted call to leastsq:  [  6.70855256e-03   8.70215615e+00   1.00000137e+00   5.83352040e-01]
After non-weighted call to leastsq:  [  7.22885170e-03   9.32517399e+00   1.00000025e+00   9.01298545e-01]
After non-weighted call to leastsq:  [  6.65030213e-03   7.45196780e+00   9.96033604e-01   9.67205126e-01]
After non-weighted call to leastsq:  [  6.70855256e-03   8.70215615e+00   1.00000137e+00   5.83352040e-01]
After non-weighted call to leastsq:  [  7.22885170e-03   9.32517399e+00   1.00000025e+00   9.01298545e-01]
After non-weighted call to leastsq:  [  6.65030213e-03   7.45196780e+00   9.96033604e-01   9.67205126e-01]
After non-weighted call to leastsq:  [  5.49152718e-03   9.03291127e+00   9.69208847e-01   1.11233045e+00]
After non-weighted call to leastsq:  [  5.86020243e-03   8.04385283e+00   9.53913017e-01   1.02502910e+00]
After non-weighted call to leastsq:  [  5.49152718e-03   9.03291127e+00   9.69208847e-01   1.11233045e+00]
After non-weighted call to leastsq:  [  5.86020243e-03   8.04385283e+00   9.53913017e-01   1.02502910e+00]
After non-weighted call to leastsq:  [  8.09073957e-03   1.58833557e+01   4.24722588e-01   1.39063571e+00]
After non-weighted call to leastsq:  [ 0.01162147  9.18431361  0.89327759  1.67041504]
After non-weighted call to leastsq:  [  8.09073957e-03   1.58833557e+01   4.24722588e-01   1.39063571e+00]
After non-weighted call to leastsq:  [ 0.01162147  9.18431361  0.89327759  1.67041504]
After non-weighted call to leastsq:  [  8.64756263e-03   9.96446128e+00   9.66924975e-01   1.37359224e+00]
After non-weighted call to leastsq:  [  8.16576669e-03   1.13897542e+01   9.92581220e-01   1.26289832e+00]
After non-weighted call to leastsq:  [  8.64756263e-03   9.96446128e+00   9.66924975e-01   1.37359224e+00]
After non-weighted call to leastsq:  [  8.16576669e-03   1.13897542e+01   9.92581220e-01   1.26289832e+00]
After non-weighted call to leastsq:  [  8.57344565e-03   1.19036193e+01   9.86816362e-01   1.14804463e+00]
After non-weighted call to leastsq:  [  8.57344565e-03   1.19036193e+01   9.86816362e-01   1.14804463e+00]
After non-weighted call to leastsq:  [  9.65669062e-03   1.09141139e+01   1.00000910e+00   1.23272018e+00]
After non-weighted call to leastsq:  [ 0.0090595   8.98037873  1.00000025  1.11236968]
After non-weighted call to leastsq:  [  9.65669062e-03   1.09141139e+01   1.00000910e+00   1.23272018e+00]
After non-weighted call to leastsq:  [ 0.0090595   8.98037873  1.00000025  1.11236968]
After non-weighted call to leastsq:  [  7.26351698e-03   1.04133516e+01   9.75229986e-01   1.09510106e+00]
After non-weighted call to leastsq:  [  6.91387856e-03   1.70817746e+01   7.42959380e-01   8.80187922e-01]
After non-weighted call to leastsq:  [  7.26351698e-03   1.04133516e+01   9.75229986e-01   1.09510106e+00]
After non-weighted call to leastsq:  [  6.91387856e-03   1.70817746e+01   7.42959380e-01   8.80187922e-01]
After non-weighted call to leastsq:  [  9.91893429e-03   1.11540724e+01   9.63638477e-01   1.06569528e+00]
After non-weighted call to leastsq:  [ 0.01080749  9.56096005  1.00000106  1.14703347]
After non-weighted call to leastsq:  [  9.91893429e-03   1.11540724e+01   9.63638477e-01   1.06569528e+00]
After non-weighted call to leastsq:  [ 0.01080749  9.56096005  1.00000106  1.14703347]
After non-weighted call to leastsq:  [ nan  nan  nan  nan]
After non-weighted call to leastsq:  [ nan  nan  nan  nan]
After non-weighted call to leastsq:  [  1.00783560e-02   1.19781231e+01   9.57658536e-01   1.50310379e+00]
After non-weighted call to leastsq:  [  1.00783560e-02   1.19781231e+01   9.57658536e-01   1.50310379e+00]
After non-weighted call to leastsq:  [  6.61612495e-03   9.51146104e+00   9.99997908e-01   1.20367486e+00]
After non-weighted call to leastsq:  [  6.61612495e-03   9.51146104e+00   9.99997908e-01   1.20367486e+00]
After non-weighted call to leastsq:  [  9.20795216e-03   1.11841690e+01   8.85310283e-01   1.17000791e+00]
After non-weighted call to leastsq:  [  9.03134688e-03   1.06433317e+01   8.70527397e-01   9.71154995e-01]
After non-weighted call to leastsq:  [  9.20795216e-03   1.11841690e+01   8.85310283e-01   1.17000791e+00]
After non-weighted call to leastsq:  [  9.03134688e-03   1.06433317e+01   8.70527397e-01   9.71154995e-01]
After non-weighted call to leastsq:  [  0.01634983  14.26518286   0.62351833   1.19156942]
After non-weighted call to leastsq:  [  1.26420459e-02   1.29022118e+01   8.16825480e-01   1.17471963e+00]
After non-weighted call to leastsq:  [  0.01634983  14.26518286   0.62351833   1.19156942]
After non-weighted call to leastsq:  [  1.26420459e-02   1.29022118e+01   8.16825480e-01   1.17471963e+00]
After non-weighted call to leastsq:  [  1.34192347e-02   1.34819389e+01   9.07887686e-01   1.55673378e+00]
After non-weighted call to leastsq:  [  1.29092419e-02   1.48731217e+01   9.46614500e-01   2.01051398e+00]
After non-weighted call to leastsq:  [  1.34192347e-02   1.34819389e+01   9.07887686e-01   1.55673378e+00]
After non-weighted call to leastsq:  [  1.29092419e-02   1.48731217e+01   9.46614500e-01   2.01051398e+00]
After non-weighted call to leastsq:  [  1.04660620e-02   1.16356863e+01   9.99871350e-01   1.47582399e+00]
After non-weighted call to leastsq:  [  1.04660620e-02   1.16356863e+01   9.99871350e-01   1.47582399e+00]
After non-weighted call to leastsq:  [  1.06110961e-02   1.34327863e+01   1.00001462e+00   1.52160679e+00]
After non-weighted call to leastsq:  [  9.86418679e-03   1.28275995e+01   1.00000033e+00   1.15276021e+00]
After non-weighted call to leastsq:  [  1.06110961e-02   1.34327863e+01   1.00001462e+00   1.52160679e+00]
After non-weighted call to leastsq:  [  9.86418679e-03   1.28275995e+01   1.00000033e+00   1.15276021e+00]
After non-weighted call to leastsq:  [  9.88428354e-03   1.33325992e+01   9.96300381e-01   1.13582758e+00]
After non-weighted call to leastsq:  [  9.88428354e-03   1.33325992e+01   9.96300381e-01   1.13582758e+00]
After non-weighted call to leastsq:  [  0.01146175  10.89885786   1.00000105   1.03690377]
After non-weighted call to leastsq:  [  9.81316189e-03   9.83184300e+00   1.00000287e+00   8.84695788e-01]
After non-weighted call to leastsq:  [  0.01146175  10.89885786   1.00000105   1.03690377]
After non-weighted call to leastsq:  [  9.81316189e-03   9.83184300e+00   1.00000287e+00   8.84695788e-01]
After non-weighted call to leastsq:  [  1.29016847e-02   2.59866039e+01   3.05987510e-01   1.11187880e+00]
After non-weighted call to leastsq:  [  1.29016847e-02   2.59866039e+01   3.05987510e-01   1.11187880e+00]
After non-weighted call to leastsq:  [ nan  nan  nan  nan]
After non-weighted call to leastsq:  [ nan  nan  nan  nan]
After non-weighted call to leastsq:  [  0.01508999  10.05135636   1.00002596   1.19760668]
After non-weighted call to leastsq:  [  0.01508999  10.05135636   1.00002596   1.19760668]
After non-weighted call to leastsq:  [  0.01185636  11.36804624   0.99895907   0.60466284]
After non-weighted call to leastsq:  [  1.06850176e-02   1.09188213e+01   1.00001519e+00   5.05178861e-01]
After non-weighted call to leastsq:  [  0.01185636  11.36804624   0.99895907   0.60466284]
After non-weighted call to leastsq:  [  1.06850176e-02   1.09188213e+01   1.00001519e+00   5.05178861e-01]
After non-weighted call to leastsq:  [  8.86714550e-03   9.26116325e+00   1.00000037e+00   2.93581067e-02]
After non-weighted call to leastsq:  [  1.30979349e-02   1.02871989e+01   8.66834944e-01  -4.92115073e-05]
After non-weighted call to leastsq:  [ 0.01617096  9.68957329  0.83174423 -0.06596329]
After non-weighted call to leastsq:  [  8.86714550e-03   9.26116325e+00   1.00000037e+00   2.93581067e-02]
After non-weighted call to leastsq:  [  1.30979349e-02   1.02871989e+01   8.66834944e-01  -4.92115073e-05]
After non-weighted call to leastsq:  [ 0.01617096  9.68957329  0.83174423 -0.06596329]
After non-weighted call to leastsq:  [ 0.01139735  7.87415632  0.85172804 -0.497462  ]
After non-weighted call to leastsq:  [ 0.01139735  7.87415632  0.85172804 -0.497462  ]
After non-weighted call to leastsq:  [ nan  nan  nan  nan]
After non-weighted call to leastsq:  [ nan  nan  nan  nan]
After non-weighted call to leastsq:  [  5.77673305e-03   1.68510486e+01   1.03416200e+00  -7.54996503e-01]
After non-weighted call to leastsq:  [  5.77673305e-03   1.68510486e+01   1.03416200e+00  -7.54996503e-01]
After non-weighted call to leastsq:  [ 0.00862807 -2.09539707  0.57748581 -3.69457391]
After non-weighted call to leastsq:  [ 0.00862807 -2.09539707  0.57748581 -3.69457391]
After non-weighted call to leastsq:  [  9.30975728e-03   1.38479104e+01   1.02736890e+00  -2.31051239e-01]
After non-weighted call to leastsq:  [  9.30975728e-03   1.38479104e+01   1.02736890e+00  -2.31051239e-01]
After non-weighted call to leastsq:  [  9.64232177e-03   2.83298183e+07   8.34875534e-01  -2.28989437e-01]
After non-weighted call to leastsq:  [  1.19140590e-02   2.97021711e+07   2.51411966e-01   1.38827494e-01]
After non-weighted call to leastsq:  [  9.16073727e-03   1.34801081e+07   2.65671450e+00  -5.11912501e-01]
After non-weighted call to leastsq:  [  9.64232177e-03   2.83298183e+07   8.34875534e-01  -2.28989437e-01]
After non-weighted call to leastsq:  [  1.19140590e-02   2.97021711e+07   2.51411966e-01   1.38827494e-01]
After non-weighted call to leastsq:  [  9.16073727e-03   1.34801081e+07   2.65671450e+00  -5.11912501e-01]
After non-weighted call to leastsq:  [  1.04741761e-02   1.24655621e+08   1.46595339e+00  -4.50709083e-01]
After non-weighted call to leastsq:  [  1.04741761e-02   1.24655621e+08   1.46595339e+00  -4.50709083e-01]
After non-weighted call to leastsq:  [  1.20891403e-02   4.37999179e+05   1.00031860e+00  -3.14950150e-01]
After non-weighted call to leastsq:  [  1.20891403e-02   4.37999179e+05   1.00031860e+00  -3.14950150e-01]
After non-weighted call to leastsq:  [  1.11856164e-02   2.44742513e+01   9.02090637e-01  -6.19153017e-01]
After non-weighted call to leastsq:  [  8.19061818e-03   4.36372057e+05   7.20607104e+03  -1.03603998e+00]
After non-weighted call to leastsq:  [  1.11856164e-02   2.44742513e+01   9.02090637e-01  -6.19153017e-01]
After non-weighted call to leastsq:  [  8.19061818e-03   4.36372057e+05   7.20607104e+03  -1.03603998e+00]
After non-weighted call to leastsq:  [  6.78446536e-03   1.39758840e+01   1.11008586e+00  -1.19951312e+00]
After non-weighted call to leastsq:  [  6.78446536e-03   1.39758840e+01   1.11008586e+00  -1.19951312e+00]
After non-weighted call to leastsq:  [  7.65128085e-03   1.22862726e+01   1.03357365e+00  -1.27389276e+00]
After non-weighted call to leastsq:  [  6.74740696e-03   1.80672050e+07   9.98637671e-01  -1.32924735e+00]
After non-weighted call to leastsq:  [  7.65128085e-03   1.22862726e+01   1.03357365e+00  -1.27389276e+00]
After non-weighted call to leastsq:  [  6.74740696e-03   1.80672050e+07   9.98637671e-01  -1.32924735e+00]
After non-weighted call to leastsq:  [  7.31041336e-03   9.29929402e+00   1.00108613e+00  -9.44812480e-01]
After non-weighted call to leastsq:  [  6.63074245e-03   8.31283767e+00   1.00000702e+00  -9.55121277e-01]
After non-weighted call to leastsq:  [  7.31041336e-03   9.29929402e+00   1.00108613e+00  -9.44812480e-01]
After non-weighted call to leastsq:  [  6.63074245e-03   8.31283767e+00   1.00000702e+00  -9.55121277e-01]
After non-weighted call to leastsq:  [  6.83349191e-03   8.98897063e+00   1.00006157e+00  -7.70801372e-01]
After non-weighted call to leastsq:  [  6.83349191e-03   8.98897063e+00   1.00006157e+00  -7.70801372e-01]
After non-weighted call to leastsq:  [  6.59386239e-03   1.83365055e+01   1.02242022e+00  -9.28892466e-01]
After non-weighted call to leastsq:  [  7.12886861e-03   8.62655963e+00   1.00149192e+00  -4.42728033e-01]
After non-weighted call to leastsq:  [  6.59386239e-03   1.83365055e+01   1.02242022e+00  -9.28892466e-01]
After non-weighted call to leastsq:  [  7.12886861e-03   8.62655963e+00   1.00149192e+00  -4.42728033e-01]
After non-weighted call to leastsq:  [ 0.01218448  5.21657661  1.00000378  0.47391138]
After non-weighted call to leastsq:  [ 0.01218448  5.21657661  1.00000378  0.47391138]
After non-weighted call to leastsq:  [  6.75996804e-03   3.35510581e+07   1.74397606e-01  -8.38114988e-03]
After non-weighted call to leastsq:  [  6.75996804e-03   3.35510581e+07   1.74397606e-01  -8.38114988e-03]
After non-weighted call to leastsq:  [ 0.01049787  5.27447567  1.00000082  0.48409963]
After non-weighted call to leastsq:  [ 0.01049787  5.27447567  1.00000082  0.48409963]
After non-weighted call to leastsq:  [ nan  nan  nan  nan]
After non-weighted call to leastsq:  [ nan  nan  nan  nan]
After non-weighted call to leastsq:  [ 0.01220098  8.33008711  0.90207698  0.15705618]
After non-weighted call to leastsq:  [  1.23647165e-02   2.08002542e+01  -2.90448512e-01   1.53510078e-01]
After non-weighted call to leastsq:  [ 0.01220098  8.33008711  0.90207698  0.15705618]
After non-weighted call to leastsq:  [  1.23647165e-02   2.08002542e+01  -2.90448512e-01   1.53510078e-01]
After non-weighted call to leastsq:  [  7.93119843e-03   8.61277669e+00   9.99998923e-01   1.35190863e-01]
After non-weighted call to leastsq:  [  7.62794844e-03   1.00958357e+01   9.89745743e-01   3.02244797e-01]
After non-weighted call to leastsq:  [  7.93119843e-03   8.61277669e+00   9.99998923e-01   1.35190863e-01]
After non-weighted call to leastsq:  [  7.62794844e-03   1.00958357e+01   9.89745743e-01   3.02244797e-01]
After non-weighted call to leastsq:  [  9.02779016e-03   1.10470142e+01   9.38178679e-01   4.65761111e-01]
After non-weighted call to leastsq:  [  9.02779016e-03   1.10470142e+01   9.38178679e-01   4.65761111e-01]
After non-weighted call to leastsq:  [  1.06767503e-02   1.16880892e+01   8.58026550e-01   6.98460135e-01]
After non-weighted call to leastsq:  [ 0.01027272  9.26233071  0.93270105  0.6974271 ]
After non-weighted call to leastsq:  [  1.06767503e-02   1.16880892e+01   8.58026550e-01   6.98460135e-01]
After non-weighted call to leastsq:  [ 0.01027272  9.26233071  0.93270105  0.6974271 ]
After non-weighted call to leastsq:  [ 0.01064943  8.90764108  0.93409289  0.8239062 ]
After non-weighted call to leastsq:  [  6.80524338e-03   7.31359834e+00   9.99999955e-01   7.16435355e-01]
After non-weighted call to leastsq:  [ 0.01064943  8.90764108  0.93409289  0.8239062 ]
After non-weighted call to leastsq:  [  6.80524338e-03   7.31359834e+00   9.99999955e-01   7.16435355e-01]
After non-weighted call to leastsq:  [  1.00957493e-02   1.48827590e+01   8.03923291e-01   1.39038069e+00]
After non-weighted call to leastsq:  [  1.00957493e-02   1.48827590e+01   8.03923291e-01   1.39038069e+00]
After non-weighted call to leastsq:  [  6.81396551e-03   1.05678075e+01   1.00000824e+00   1.14546675e+00]
After non-weighted call to leastsq:  [  6.81396551e-03   1.05678075e+01   1.00000824e+00   1.14546675e+00]
After non-weighted call to leastsq:  [ nan  nan  nan  nan]
After non-weighted call to leastsq:  [ nan  nan  nan  nan]
After non-weighted call to leastsq:  [  8.35586578e-03   9.83283695e+00   8.51561233e-01   1.04243176e+00]
After non-weighted call to leastsq:  [  8.35586578e-03   9.83283695e+00   8.51561233e-01   1.04243176e+00]
After non-weighted call to leastsq:  [  0.01268086  10.29472374   0.56559426   1.1999657 ]
After non-weighted call to leastsq:  [  0.01675875  10.28188797   0.25438372   1.29733936]
After non-weighted call to leastsq:  [  0.01268086  10.29472374   0.56559426   1.1999657 ]
After non-weighted call to leastsq:  [  0.01675875  10.28188797   0.25438372   1.29733936]
After non-weighted call to leastsq:  [ 0.00832113  7.75669689  1.00001812  1.20842662]
After non-weighted call to leastsq:  [ 0.00832113  7.75669689  1.00001812  1.20842662]
After non-weighted call to leastsq:  [ nan  nan  nan  nan]
After non-weighted call to leastsq:  [ nan  nan  nan  nan]
After non-weighted call to leastsq:  [  6.18633384e-03   8.47238855e+00   9.99999957e-01   1.55876176e+00]
After non-weighted call to leastsq:  [  6.18633384e-03   8.47238855e+00   9.99999957e-01   1.55876176e+00]
After non-weighted call to leastsq:  [  7.02962102e-03   9.70381359e+00   1.00000003e+00   1.94886088e+00]
After non-weighted call to leastsq:  [  7.02962102e-03   9.70381359e+00   1.00000003e+00   1.94886088e+00]
After non-weighted call to leastsq:  [  8.07985186e-03   9.59825272e+00   9.70079950e-01   2.00204030e+00]
After non-weighted call to leastsq:  [  1.10217474e-02   1.24690379e+01   9.07630576e-01   2.22625544e+00]
After non-weighted call to leastsq:  [  8.07985186e-03   9.59825272e+00   9.70079950e-01   2.00204030e+00]
After non-weighted call to leastsq:  [  1.10217474e-02   1.24690379e+01   9.07630576e-01   2.22625544e+00]
After non-weighted call to leastsq:  [  9.74676924e-03   1.16463345e+01   9.03821191e-01   1.97187434e+00]
After non-weighted call to leastsq:  [  1.22981091e-02   3.46947104e+01  -5.73631683e-01   1.74887779e+00]
After non-weighted call to leastsq:  [  9.74676924e-03   1.16463345e+01   9.03821191e-01   1.97187434e+00]
After non-weighted call to leastsq:  [  1.22981091e-02   3.46947104e+01  -5.73631683e-01   1.74887779e+00]
After non-weighted call to leastsq:  [  1.25145504e-02   2.54030865e+01  -7.72321832e-02   1.57932592e+00]
After non-weighted call to leastsq:  [  1.10611966e-02   1.54499465e+01   8.11502435e-01   1.44865550e+00]
After non-weighted call to leastsq:  [  1.25145504e-02   2.54030865e+01  -7.72321832e-02   1.57932592e+00]
After non-weighted call to leastsq:  [  1.10611966e-02   1.54499465e+01   8.11502435e-01   1.44865550e+00]
After non-weighted call to leastsq:  [  9.42397009e-03   1.77726329e+01   7.84931583e-01   1.55499426e+00]
After non-weighted call to leastsq:  [  9.08007298e-03   2.58345683e+01   8.17861742e-01   1.72720789e+00]
After non-weighted call to leastsq:  [  9.42397009e-03   1.77726329e+01   7.84931583e-01   1.55499426e+00]
After non-weighted call to leastsq:  [  9.08007298e-03   2.58345683e+01   8.17861742e-01   1.72720789e+00]
After non-weighted call to leastsq:  [  9.38139416e-03   3.15717459e+01   8.77547858e-01   2.02275491e+00]
After non-weighted call to leastsq:  [  9.10454330e-03   2.98940955e+01   8.79794962e-01   1.81731117e+00]
After non-weighted call to leastsq:  [  9.38139416e-03   3.15717459e+01   8.77547858e-01   2.02275491e+00]
After non-weighted call to leastsq:  [  9.10454330e-03   2.98940955e+01   8.79794962e-01   1.81731117e+00]
After non-weighted call to leastsq:  [  1.39578654e-02   2.33520715e+01   6.89323854e-01   2.01826079e+00]
After non-weighted call to leastsq:  [  0.01435768  13.84720522   0.99887441   1.88285713]
After non-weighted call to leastsq:  [  1.39578654e-02   2.33520715e+01   6.89323854e-01   2.01826079e+00]
After non-weighted call to leastsq:  [  0.01435768  13.84720522   0.99887441   1.88285713]
After non-weighted call to leastsq:  [  1.43040892e-02   2.36904327e+01   9.30288706e-01   2.05442707e+00]
After non-weighted call to leastsq:  [  1.37252005e-02   2.47272712e+01   9.77852537e-01   2.21088767e+00]
After non-weighted call to leastsq:  [  1.43040892e-02   2.36904327e+01   9.30288706e-01   2.05442707e+00]
After non-weighted call to leastsq:  [  1.37252005e-02   2.47272712e+01   9.77852537e-01   2.21088767e+00]
After non-weighted call to leastsq:  [  1.35698824e-02   2.84783812e+01   9.56241725e-01   2.04137780e+00]
After non-weighted call to leastsq:  [  1.87173166e-02   3.16385386e+01   5.03979174e-01   2.10466555e+00]
After non-weighted call to leastsq:  [  1.35698824e-02   2.84783812e+01   9.56241725e-01   2.04137780e+00]
After non-weighted call to leastsq:  [  1.87173166e-02   3.16385386e+01   5.03979174e-01   2.10466555e+00]
After non-weighted call to leastsq:  [  3.21073409e-02   2.91869843e+05  -2.90586049e+04   2.04937061e+00]
After non-weighted call to leastsq:  [  3.21073409e-02   2.91869843e+05  -2.90586049e+04   2.04937061e+00]
After non-weighted call to leastsq:  [  1.75773860e-02   4.70519619e+01  -5.22179767e-01   1.36996553e+00]
After non-weighted call to leastsq:  [  1.75773860e-02   4.70519619e+01  -5.22179767e-01   1.36996553e+00]
After non-weighted call to leastsq:  [  1.67119303e-02   2.98407372e+01   5.11759341e-01   1.14429119e+00]
After non-weighted call to leastsq:  [  1.87915627e-02   1.91964643e+01   7.09766729e-01   1.15899765e+00]
After non-weighted call to leastsq:  [  1.67119303e-02   2.98407372e+01   5.11759341e-01   1.14429119e+00]
After non-weighted call to leastsq:  [  1.87915627e-02   1.91964643e+01   7.09766729e-01   1.15899765e+00]
After non-weighted call to leastsq:  [  0.02319531  23.11529941   0.38023707   1.28317424]
After non-weighted call to leastsq:  [  1.04316093e-02   1.05126410e+01   9.99999999e-01   2.71021135e-01]
After non-weighted call to leastsq:  [  0.02319531  23.11529941   0.38023707   1.28317424]
After non-weighted call to leastsq:  [  1.04316093e-02   1.05126410e+01   9.99999999e-01   2.71021135e-01]
After non-weighted call to leastsq:  [  9.27742898e-03   1.32697547e+01   9.96969111e-01   5.67128378e-02]
After non-weighted call to leastsq:  [  1.14889158e-02   1.35665045e+01   1.00005728e+00   5.32251828e-02]
After non-weighted call to leastsq:  [  1.33650901e-02   1.76208512e+01   1.00001336e+00   9.04752940e-01]
After non-weighted call to leastsq:  [  9.27742898e-03   1.32697547e+01   9.96969111e-01   5.67128378e-02]
After non-weighted call to leastsq:  [  1.14889158e-02   1.35665045e+01   1.00005728e+00   5.32251828e-02]
After non-weighted call to leastsq:  [  1.33650901e-02   1.76208512e+01   1.00001336e+00   9.04752940e-01]
After non-weighted call to leastsq:  [  1.40454216e-02   1.84479918e+01   1.00014287e+00   1.15539998e+00]
After non-weighted call to leastsq:  [  1.25674743e-02   1.38692420e+01   1.00000025e+00   7.10478229e-01]
After non-weighted call to leastsq:  [  1.40454216e-02   1.84479918e+01   1.00014287e+00   1.15539998e+00]
After non-weighted call to leastsq:  [  1.25674743e-02   1.38692420e+01   1.00000025e+00   7.10478229e-01]
After non-weighted call to leastsq:  [  0.01888411  15.19548094   0.92209003   0.83380089]
After non-weighted call to leastsq:  [  1.87861320e-02   2.00002402e+01   7.03823917e-01   2.91441163e-01]
After non-weighted call to leastsq:  [  0.01888411  15.19548094   0.92209003   0.83380089]
After non-weighted call to leastsq:  [  1.87861320e-02   2.00002402e+01   7.03823917e-01   2.91441163e-01]
After non-weighted call to leastsq:  [  1.55396497e-02   2.49434578e+01   8.73394990e-01   2.57462843e-01]
After non-weighted call to leastsq:  [  1.55396497e-02   2.49434578e+01   8.73394990e-01   2.57462843e-01]
After non-weighted call to leastsq:  [ nan  nan  nan  nan]
After non-weighted call to leastsq:  [ nan  nan  nan  nan]
After non-weighted call to leastsq:  [  1.28854514e-02   2.51628105e+07   8.47322768e-01  -1.43752457e-01]
After non-weighted call to leastsq:  [  1.20267358e-02   7.56834431e+07   8.49052111e-01  -3.41088911e-01]
After non-weighted call to leastsq:  [  1.28854514e-02   2.51628105e+07   8.47322768e-01  -1.43752457e-01]
After non-weighted call to leastsq:  [  1.20267358e-02   7.56834431e+07   8.49052111e-01  -3.41088911e-01]
After non-weighted call to leastsq:  [  1.34825112e-02   7.64814647e+06   9.94109094e-01  -1.23388592e-01]
After non-weighted call to leastsq:  [  1.22441509e-02   1.39006753e+08   9.60708375e-01  -3.76376639e-01]
After non-weighted call to leastsq:  [  1.34825112e-02   7.64814647e+06   9.94109094e-01  -1.23388592e-01]
After non-weighted call to leastsq:  [  1.22441509e-02   1.39006753e+08   9.60708375e-01  -3.76376639e-01]
After non-weighted call to leastsq:  [  0.09999998  79.49025354   0.99999996   1.00000534]
After non-weighted call to leastsq:  [  1.11060571e-02   2.16289671e+08  -2.97327901e-01  -1.25600693e+00]
After non-weighted call to leastsq:  [  0.09999998  79.49025354   0.99999996   1.00000534]
After non-weighted call to leastsq:  [  1.11060571e-02   2.16289671e+08  -2.97327901e-01  -1.25600693e+00]
After non-weighted call to leastsq:  [  1.64636954e-02   1.06208298e+07   9.97594277e-01   1.14319549e-01]
After non-weighted call to leastsq:  [  1.58746894e-02   3.93054112e+08   1.11773773e+00   2.41446436e-01]
After non-weighted call to leastsq:  [  1.64636954e-02   1.06208298e+07   9.97594277e-01   1.14319549e-01]
After non-weighted call to leastsq:  [  1.58746894e-02   3.93054112e+08   1.11773773e+00   2.41446436e-01]
After non-weighted call to leastsq:  [  1.48691708e-02   2.00877345e+08   8.53316944e-01   5.24399161e-01]
After non-weighted call to leastsq:  [  1.05071819e-02   1.69160346e+07   9.96660758e-01  -7.30489931e-01]
After non-weighted call to leastsq:  [  8.51286916e-03   1.76091059e+08   2.74730799e+00  -1.22359318e+00]
After non-weighted call to leastsq:  [  1.48691708e-02   2.00877345e+08   8.53316944e-01   5.24399161e-01]
After non-weighted call to leastsq:  [  1.05071819e-02   1.69160346e+07   9.96660758e-01  -7.30489931e-01]
After non-weighted call to leastsq:  [  8.51286916e-03   1.76091059e+08   2.74730799e+00  -1.22359318e+00]
After non-weighted call to leastsq:  [  7.83624929e-03   4.93114237e+07  -7.20359827e-01  -1.74058207e+00]
After non-weighted call to leastsq:  [  9.45950580e-03   1.47074704e+08   8.17256224e-01  -1.60148003e+00]
After non-weighted call to leastsq:  [  7.83624929e-03   4.93114237e+07  -7.20359827e-01  -1.74058207e+00]
After non-weighted call to leastsq:  [  9.45950580e-03   1.47074704e+08   8.17256224e-01  -1.60148003e+00]
After non-weighted call to leastsq:  [  1.17520348e-02   2.60379719e+07   9.78911531e-01  -6.33863090e-01]
After non-weighted call to leastsq:  [  8.39965215e-03   5.26223071e+07   6.39950358e-01  -1.24173171e+00]
After non-weighted call to leastsq:  [  1.17520348e-02   2.60379719e+07   9.78911531e-01  -6.33863090e-01]
After non-weighted call to leastsq:  [  8.39965215e-03   5.26223071e+07   6.39950358e-01  -1.24173171e+00]
After non-weighted call to leastsq:  [  9.30063818e-03   1.20169047e+01   1.00035634e+00  -9.97909577e-01]
After non-weighted call to leastsq:  [  7.20156466e-03   9.31999707e+00   1.00038789e+00  -1.72923030e+00]
After non-weighted call to leastsq:  [  9.30063818e-03   1.20169047e+01   1.00035634e+00  -9.97909577e-01]
After non-weighted call to leastsq:  [  7.20156466e-03   9.31999707e+00   1.00038789e+00  -1.72923030e+00]
After non-weighted call to leastsq:  [  9.24028079e-03   1.16808868e+01   1.00006352e+00  -1.02062427e+00]
After non-weighted call to leastsq:  [  9.24028079e-03   1.16808868e+01   1.00006352e+00  -1.02062427e+00]
After non-weighted call to leastsq:  [  9.58498392e-03   1.06126568e+01   1.00014223e+00  -6.83795151e-01]
After non-weighted call to leastsq:  [  9.58498392e-03   1.06126568e+01   1.00014223e+00  -6.83795151e-01]
After non-weighted call to leastsq:  [  1.10869424e-02   1.75368560e+01   1.00008742e+00  -2.01652989e-01]
After non-weighted call to leastsq:  [  1.10869424e-02   1.75368560e+01   1.00008742e+00  -2.01652989e-01]
After non-weighted call to leastsq:  [ nan  nan  nan  nan]
After non-weighted call to leastsq:  [ nan  nan  nan  nan]
After non-weighted call to leastsq:  [  9.43721894e-03   1.69404298e+01   1.00275604e+00  -7.02869327e-01]
After non-weighted call to leastsq:  [  9.62074614e-03   1.46323648e+01   1.00049845e+00  -9.48847185e-01]
After non-weighted call to leastsq:  [  9.43721894e-03   1.69404298e+01   1.00275604e+00  -7.02869327e-01]
After non-weighted call to leastsq:  [  9.62074614e-03   1.46323648e+01   1.00049845e+00  -9.48847185e-01]
After non-weighted call to leastsq:  [  8.12761150e-03   1.39431183e+01   1.00682792e+00  -1.05044110e+00]
After non-weighted call to leastsq:  [  8.12761150e-03   1.39431183e+01   1.00682792e+00  -1.05044110e+00]
After non-weighted call to leastsq:  [  9.63927784e-03   2.18745242e+01   9.53495640e-01  -9.91896049e-02]
After non-weighted call to leastsq:  [  8.67347492e-03   5.70234647e+05   2.97849634e+03   3.25963936e-01]
After non-weighted call to leastsq:  [  9.63927784e-03   2.18745242e+01   9.53495640e-01  -9.91896049e-02]
After non-weighted call to leastsq:  [  8.67347492e-03   5.70234647e+05   2.97849634e+03   3.25963936e-01]
After non-weighted call to leastsq:  [  1.34339521e-02   1.20276435e+06  -6.01302308e+04   2.80278574e-01]
After non-weighted call to leastsq:  [  1.12589172e-02   1.22205236e+01   9.65772574e-01   8.36189029e-01]
After non-weighted call to leastsq:  [  1.34339521e-02   1.20276435e+06  -6.01302308e+04   2.80278574e-01]
After non-weighted call to leastsq:  [  1.12589172e-02   1.22205236e+01   9.65772574e-01   8.36189029e-01]
After non-weighted call to leastsq:  [ 0.01145878  9.37725428  0.99416804  0.90880041]
After non-weighted call to leastsq:  [  1.00059290e-02   1.01559996e+01   9.99999992e-01   7.99853781e-01]
After non-weighted call to leastsq:  [ 0.01145878  9.37725428  0.99416804  0.90880041]
After non-weighted call to leastsq:  [  1.00059290e-02   1.01559996e+01   9.99999992e-01   7.99853781e-01]
After non-weighted call to leastsq:  [  1.10534284e-02   1.12348594e+01   1.00000006e+00   8.59940669e-01]
After non-weighted call to leastsq:  [  1.10534284e-02   1.12348594e+01   1.00000006e+00   8.59940669e-01]
After non-weighted call to leastsq:  [  0.0123019   12.16841808   0.99872128   0.72099106]
After non-weighted call to leastsq:  [  0.01717251  15.91519377   0.74211431   1.04550225]
C:\Anaconda\lib\site-packages\IPython\kernel\__main__.py:2: RuntimeWarning: invalid value encountered in subtract
  from IPython.kernel.zmq import kernelapp as app
 [  0.0123019   12.16841808   0.99872128   0.72099106]
After non-weighted call to leastsq:  [  0.01717251  15.91519377   0.74211431   1.04550225]
C:\Anaconda\lib\site-packages\IPython\kernel\__main__.py:2: RuntimeWarning: invalid value encountered in subtract
  from IPython.kernel.zmq import kernelapp as app

In [77]:
fig=plt.figure()
plt.plot(Lasslop_results["rb_day"])
plt.show()

In [42]:
fig=plt.figure(1)
ax1=plt.subplot(411)
plt.plot(ldt_plt,Fsd_plt,'b.')
ax2=plt.subplot(412,sharex=ax1)
plt.plot(ldt_plt,D_plt,'b.')
ax3=plt.subplot(413,sharex=ax1)
plt.plot(ldt_plt,T_plt,'b.')
ax4=plt.subplot(414,sharex=ax1)
plt.plot(ldt_plt,NEE_plt,'b.')
plt.show()

In [43]:
fig=plt.figure(1)
plt.plot(Fsd_plt,NEE_plt,'b.')
plt.show()

In [44]:
fig=plt.figure()
plt.plot(D_plt,SHD_func_Isaac(D_plt,0.005),'b.')
plt.show()

In [ ]: