Changeset 342 for trunk/GSASIIindex.py


Ignore:
Timestamp:
Aug 5, 2011 2:35:43 PM (11 years ago)
Author:
vondreele
Message:

major modifications to get 1st "working" version of Refine
Add GSASIImapvars.py
fix cell refinement in indexing window
single cycle for peak refinement

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIindex.py

    r312 r342  
    268268   
    269269    values = A2values(ibrav,A)
    270     result = so.leastsq(errFit,values,args=(ibrav,Peaks[7],Peaks[4:7],Pwr),
    271         full_output=True,factor=0.1)
     270    result = so.leastsq(errFit,values,full_output=True,ftol=0.0001,
     271        args=(ibrav,Peaks[7],Peaks[4:7],Pwr))
    272272    A = Values2A(ibrav,result[0])
    273273    return True,np.sum(errFit(result[0],ibrav,Peaks[7],Peaks[4:7],Pwr)**2),A,result
     
    286286    values = A2values(ibrav,A)
    287287    values.append(Z)
    288     result = so.leastsq(errFit,values,args=(ibrav,Peaks[7],Peaks[4:7],Peaks[0],wave,Pwr),
    289         full_output=True)
     288    result = so.leastsq(errFit,values,full_output=True,ftol=0.001,
     289        args=(ibrav,Peaks[7],Peaks[4:7],Peaks[0],wave,Pwr))
    290290    A = Values2A(ibrav,result[0][:-1])
    291291    Z = result[0][-1]
     
    348348    dmin = getDmin(peaks)
    349349    smin = 1.0e10
    350     pwr = 4
     350    pwr = 8
    351351    maxTries = 10
    352352    OK = False
     
    380380        Peaks = np.array(peaks).T
    381381        H = Peaks[4:7]
    382         Peaks[8] = 1./np.sqrt(G2lat.calc_rDsq(H,A))
     382        try:
     383            Peaks[8] = 1./np.sqrt(G2lat.calc_rDsq(H,A))
     384        except FloatingPointError:
     385            print G2lat.calc_rDsq(H,A)
     386            Peaks[8] = 1.0
    383387        peaks = Peaks.T
    384388       
Note: See TracChangeset for help on using the changeset viewer.