Changeset 2685 for trunk/GSASIIimage.py


Ignore:
Timestamp:
Feb 1, 2017 11:11:59 PM (5 years ago)
Author:
vondreele
Message:

save image recalibrate all in sequential results table
allow global setting of PDFpeak parameter refinement flags

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimage.py

    r2671 r2685  
    205205    if Print:
    206206        CalibPrint(ValSig,chisq,rings.shape[0])
    207     return chisq
    208                    
     207    return [chisq,vals,sigList]
     208
    209209def ImageLocalMax(image,w,Xpix,Ypix):
    210210    'Needs a doc string'
     
    527527    if not data['calibrant']:
    528528        print 'no calibration material selected'
    529         return True   
     529        return []   
    530530    skip = data['calibskip']
    531531    dmin = data['calibdmin']
     
    572572    if not data['rings']:
    573573        print 'no rings found; try lower Min ring I/Ib'
    574         return True   
     574        return []   
    575575       
    576576    rings = np.concatenate((data['rings']),axis=0)
    577     chisq = FitDetector(rings,varyList,parmDict)
     577    [chisq,vals,sigList] = FitDetector(rings,varyList,parmDict)
    578578    data['wavelength'] = parmDict['wave']
    579579    data['distance'] = parmDict['dist']
     
    590590    print 'calibration time = %.3f'%(time.time()-time0)
    591591    G2plt.PlotImage(G2frame,newImage=True)       
    592     return True
     592    return [vals,varyList,sigList,parmDict]
    593593           
    594594def ImageCalibrate(G2frame,data):
     
    715715            varyList = [item for item in varyDict if varyDict[item]]
    716716            if len(Ringp) > 10:
    717                 chip = FitDetector(np.array(Ring0+Ringp),varyList,parmDict,True)
     717                chip = FitDetector(np.array(Ring0+Ringp),varyList,parmDict,True)[0]
    718718                tiltp = parmDict['tilt']
    719719                phip = parmDict['phi']
     
    727727            if len(Ringm) > 10:
    728728                parmDict['tilt'] *= -1
    729                 chim = FitDetector(np.array(Ring0+Ringm),varyList,parmDict,True)
     729                chim = FitDetector(np.array(Ring0+Ringm),varyList,parmDict,True)[0]
    730730                tiltm = parmDict['tilt']
    731731                phim = parmDict['phi']
     
    769769            rings = np.concatenate((data['rings']),axis=0)
    770770            if i:
    771                 chisq = FitDetector(rings,varyList,parmDict,False)
     771                chisq = FitDetector(rings,varyList,parmDict,False)[0]
    772772                data['distance'] = parmDict['dist']
    773773                data['center'] = [parmDict['det-X'],parmDict['det-Y']]
     
    789789    N = len(data['ellipses'])
    790790    if N > 2:
    791         FitDetector(rings,varyList,parmDict)
     791        FitDetector(rings,varyList,parmDict)[0]
    792792        data['wavelength'] = parmDict['wave']
    793793        data['distance'] = parmDict['dist']
Note: See TracChangeset for help on using the changeset viewer.