Changeset 397 for trunk/GSASIIstruct.py


Ignore:
Timestamp:
Oct 21, 2011 12:15:50 PM (10 years ago)
Author:
vondreele
Message:

collect default settings for Sample in one routine
add recalibrate routine for images
azimuths from image integration are now the center angle of each azimuth bin
put in 1/2 pixel offset in image calibration/integration calcs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIstruct.py

    r395 r397  
    22852285        Ftol = Controls['min dM/M']
    22862286        Factor = Controls['shift factor']
    2287         try:
    2288             if Controls['deriv type'] == 'analytic':
    2289                 result = so.leastsq(errRefine,values,Dfun=dervRefine,full_output=True,
    2290                     ftol=Ftol,col_deriv=True,factor=Factor,
    2291                     args=([Histograms,Phases],parmDict,varyList,calcControls,pawleyLookup,dlg))
    2292                 ncyc = int(result[2]['nfev']/2)               
    2293             else:           #'numeric'
    2294                 result = so.leastsq(errRefine,values,full_output=True,ftol=Ftol,epsfcn=1.e-8,factor=Factor,
    2295                     args=([Histograms,Phases],parmDict,varyList,calcControls,pawleyLookup,dlg))
    2296                 ncyc = int(result[2]['nfev']/len(varyList))
    2297 #            table = dict(zip(varyList,zip(values,result[0],(result[0]-values))))
    2298 #            for item in table: print item,table[item]               #useful debug - are things shifting?
    2299         except Exception:
    2300             result = [parmDict['saved values'],None]
     2287        if Controls['deriv type'] == 'analytic':
     2288            result = so.leastsq(errRefine,values,Dfun=dervRefine,full_output=True,
     2289                ftol=Ftol,col_deriv=True,factor=Factor,
     2290                args=([Histograms,Phases],parmDict,varyList,calcControls,pawleyLookup,dlg))
     2291            ncyc = int(result[2]['nfev']/2)               
     2292        else:           #'numeric'
     2293            result = so.leastsq(errRefine,values,full_output=True,ftol=Ftol,epsfcn=1.e-8,factor=Factor,
     2294                args=([Histograms,Phases],parmDict,varyList,calcControls,pawleyLookup,dlg))
     2295            ncyc = int(result[2]['nfev']/len(varyList))
     2296#        table = dict(zip(varyList,zip(values,result[0],(result[0]-values))))
     2297#        for item in table: print item,table[item]               #useful debug - are things shifting?
    23012298        runtime = time.time()-begin
    23022299        chisq = np.sum(result[2]['fvec']**2)
Note: See TracChangeset for help on using the changeset viewer.