Changeset 2826


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

add covariances to sequential strain ring fit results

Location:
trunk
Files:
2 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):
  • trunk/GSASIIimgGUI.py

    r2824 r2826  
    20142014                parmDict = {'Sample load':StaCtrls['Sample load'],}
    20152015                varyNames = ['e11','e12','e22']
     2016                coVar = np.eye(4*len(StaCtrls['d-zero']))
    20162017                for j,item in enumerate(StaCtrls['d-zero']):
    20172018                    variables += item['Emat']
     
    20252026                    varyList.append('%d;Ivar'%(j))
    20262027                    sig.append(None)
     2028                    j4 = j*4
     2029                    coVar[j4:j4+3,j4:j4+3] = item['covMat']
    20272030                SeqResult[name] = {'variables':variables,'varyList':varyList,'sig':sig,'Rvals':[],
    2028                     'covMatrix':np.eye(len(variables)),'title':name,'parmDict':parmDict}
     2031                    'covMatrix':coVar,'title':name,'parmDict':parmDict}
    20292032            else:
    20302033                SeqResult['histNames'] = goodnames
Note: See TracChangeset for help on using the changeset viewer.