Did I find the right examples for you? yes no

All Samples(21)  |  Call(21)  |  Derive(0)  |  Import(0)

src/b/1/B1python-0.8.7/src/B1macros.py   B1python(Download)
                pylab.title('WAXS->short: %g +/- %g'% (multwaxs2short, errmultwaxs2short));
            utils.pause()
        datalong=utils.trimq(utils.multsasdict(ds2,multlong2short,errmultlong2short),qmax=qsep)
        datashort=utils.trimq(ds1,qmin=qsep,qmax=qsepw)
        if onlyone:
            tocombine=[datashort]
        else:
            tocombine=[datalong,datashort]
        if (not ignorewaxs) and (not waxs_notfound):
            datawaxs=utils.trimq(utils.multsasdict(dataw,multwaxs2short,errmultwaxs2short),qmin=qsepw)
            #re-integrate the two distances.
            if di==0: # WAXS:
                dataredlong=utils.trimq(datalong,qmin=ourqmin,qmax=ourqmax)
                if len(dataredlong['q'])<2:
                    raise ValueError("WAXS curve does not have enough q-points in the common q-range!")
            goodqs=dataredlong['q'][2*np.absolute(dataredlong['q']-dataredshort['q'])/(dataredlong['q']+dataredshort['q'])<qtolerance]
            print "Number of good q-s: %d out of %d" % (len(goodqs),len(dataredlong['q']))
            dataredlong=utils.trimq(dataredlong,qmin=goodqs.min(),qmax=goodqs.max())
            dataredshort=utils.trimq(dataredshort,qmin=goodqs.min(),qmax=goodqs.max())
 

src/b/1/B1python-0.8.7/src/fitting.py   B1python(Download)
        raise ValueError('m+alpha should be larger than 1. alpha: %f m: %f (m+alpha): %f',(-alpha,m,m-alpha))
    alpha=alpha-m
    data1=utils.trimq(data,qmin,qmax)
    q2=data1['q'].max()
    q1=data['q'].min()
    ax4=pylab.axes(((1-rightborder-width),bottomborder,width,height))
 
    data1=utils.trimq(data,qmin,qmax)
 
    if gui:
        ax3.clear()
        ax4.clear()
        data1=utils.trimq(data,qmin,qmax)
        Iexp=np.array(data1['Intensity'])
        qexp=np.array(data1['q'])
        the calculated error of the prefactor
    """
    data1=utils.trimq(data,qmin,qmax)
    x1=data1['q']**2;
    err1=np.absolute(data1['Error']/data1['Intensity']*data1['q']**2)
        the calculated error of the prefactor
    """
    data1=utils.trimq(data,qmin,qmax)
    x1=data1['q']**2;
    err1=np.absolute(data1['Error']/data1['Intensity']);