Changeset 2659 for trunk/GSASIIpwd.py


Ignore:
Timestamp:
Jan 24, 2017 1:58:38 PM (5 years ago)
Author:
vondreele
Message:

make lab data (2 x-ray wavelengths) instrument default 'Bragg-Brentano', all others 'Debye-Scherrer'
refactor PDF stuff to show PDF Controls & (new) PDF Peaks on G2 tree (removing I(Q)...).
Old gpx files with I(Q)... updated automatically to new scheme
Add new tree item for PDF Peaks - does nothing yet.
Fix FWHM calc for TOF so bins/FWHM on peak fitting make sense.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwd.py

    r2652 r2659  
    580580   
    581581    sig = lambda Th,U,V,W: np.sqrt(max(0.001,U*tand(Th)**2+V*tand(Th)+W))
    582     sigTOF = lambda dsp,S0,S1,S2,Sq:  S0+S1*dsp**2+S2*dsp**4+Sq/dsp**2
     582    sigTOF = lambda dsp,S0,S1,S2,Sq: np.sqrt(S0+S1*dsp**2+S2*dsp**4+Sq/dsp**2)
    583583    gam = lambda Th,X,Y: (X/cosd(Th)+Y*tand(Th))
    584584    gamTOF = lambda dsp,X,Y: X*dsp+Y*dsp**2
     
    17681768            binsperFWHM.append(0.)
    17691769    if peakVary: PeaksPrint(dataType,parmDict,sigDict,varyList,binsperFWHM)
    1770     if len(binsperFWHM) and min(binsperFWHM) < 3.:
    1771         print '*** Warning: calculated peak widths are too narrow to refine profile coefficients ***'
    1772         if 'T' in Inst['Type'][0]:
    1773             print ' Manually increase sig-0, 1, or 2 in Instrument Parameters'
    1774         else:
    1775             print ' Manually increase W in Instrument Parameters'
     1770    if len(binsperFWHM):
     1771        if min(binsperFWHM) < 1.:
     1772            print '*** Warning: calculated peak widths are too narrow to refine profile coefficients ***'
     1773            if 'T' in Inst['Type'][0]:
     1774                print ' Manually increase sig-0, 1, or 2 in Instrument Parameters'
     1775            else:
     1776                print ' Manually increase W in Instrument Parameters'
     1777        elif min(binsperFWHM) < 4.:
     1778            print '*** Warning: data binning yields too few data points across peak FWHM for reliable Rietveld refinement ***'
     1779            print '*** recommended is 6-10; you have %.2f ***'%(min(binsperFWHM))
    17761780    return sigDict,result,sig,Rvals,varyList,parmDict,fullvaryList,badVary
    17771781
Note: See TracChangeset for help on using the changeset viewer.