Changeset 2826 for trunk/GSASIIimage.py


Ignore:
Timestamp:
May 10, 2017 9:28:05 PM (4 years ago)
Author:
vondreele
Message:

add covariances to sequential strain ring fit results

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimage.py

    r2824 r2826  
    10051005            ring.update(R)
    10061006            p0 = ring['Emat']
    1007             val,esd = FitStrain(Ring,p0,dset,wave,phi,StaType)
     1007            val,esd,covMat = FitStrain(Ring,p0,dset,wave,phi,StaType)
    10081008            ring['Emat'] = val
    10091009            ring['Esig'] = esd
     
    10141014            ringint /= np.mean(ringint)
    10151015            ring['Ivar'] = np.var(ringint)
     1016            ring['covMat'] = covMat
    10161017            print 'Variance in normalized ring intensity: %.3f'%(ring['Ivar'])
    10171018    CalcStrSta(StrSta,Controls)
     
    11161117    vals = list(result[0])
    11171118    chisq = np.sum(result[2]['fvec']**2)/(rings.shape[1]-3)     #reduced chi^2 = M/(Nobs-Nvar)
     1119    covM = result[1]
     1120    covMatrix = covM*chisq
    11181121    sig = list(np.sqrt(chisq*np.diag(result[1])))
    11191122    ValSig = zip(names,fmt,vals,sig)
    11201123    StrainPrint(ValSig,dset)
    1121     return vals,sig
     1124    return vals,sig,covMatrix
    11221125   
    11231126def AutoSpotMasks(Image,Masks,Controls):
Note: See TracChangeset for help on using the changeset viewer.