Changeset 1878 for trunk/GSASIIpwd.py


Ignore:
Timestamp:
Jun 4, 2015 1:49:58 PM (7 years ago)
Author:
vondreele
Message:

refactor DDataGUI - mostly move event routines to be inside respective sizer routines
Enable Flack parameter - function OK; derivatives need work
Allow inversion of noncentrosymmetric structures in SymOpDialog? - to test enantiomers
some work to make pdf stuff neutron TOF friendly - not complete
fix Debye background function - now works; refactor result printing for it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwd.py

    r1874 r1878  
    270270    MuR = Abs*data['Diam']/20.0
    271271    xydata['IofQ'][1][1] /= Absorb(data['Geometry'],MuR,Tth)
    272     xydata['IofQ'][1][1] /= Polarization(inst['Polariz.'][1],Tth,Azm=inst['Azimuth'][1])[0]
     272    if 'X' in inst['Type'][0]:
     273        xydata['IofQ'][1][1] /= Polarization(inst['Polariz.'][1],Tth,Azm=inst['Azimuth'][1])[0]
    273274    if data['DetType'] == 'Image plate':
    274275        xydata['IofQ'][1][1] *= Oblique(data['ObliqCoeff'],Tth)
     
    993994    for name in varyList:
    994995        if 'Debye' in name:
    995             parm,id = name.split(':')
     996            parm,id = name.split(';')
    996997            ip = names.index(parm)
    997998            dMdv[varyList.index(name)] = dMddb[3*int(id)+ip]
     
    12041205    debyeList = []
    12051206    for i in range(Debye['nDebye']):
    1206         debyeNames = ['DebyeA:'+str(i),'DebyeR:'+str(i),'DebyeU:'+str(i)]
     1207        debyeNames = ['DebyeA;'+str(i),'DebyeR;'+str(i),'DebyeU;'+str(i)]
    12071208        debyeDict.update(dict(zip(debyeNames,Debye['debyeTerms'][i][::2])))
    12081209        debyeList += zip(debyeNames,Debye['debyeTerms'][i][1::2])
     
    13321333        iDb = 0
    13331334        while True:
    1334             names = ['DebyeA:','DebyeR:','DebyeU:']
     1335            names = ['DebyeA;','DebyeR;','DebyeU;']
    13351336            try:
    13361337                for i,name in enumerate(names):
     
    13651366            print 'Background not refined'
    13661367        if Background[1]['nDebye']:
    1367             parms = ['DebyeA','DebyeR','DebyeU']
     1368            parms = ['DebyeA;','DebyeR;','DebyeU;']
    13681369            print 'Debye diffuse scattering coefficients'
    13691370            ptfmt = "%12.5f"
    1370             names =   'names :'
    1371             ptstr =  'values:'
    1372             sigstr = 'esds  :'
    1373             for item in sigDict:
    1374                 if 'Debye' in item:
    1375                     names += '%12s'%(item)
    1376                     sigstr += ptfmt%(sigDict[item])
    1377                     parm,id = item.split(':')
    1378                     ip = parms.index(parm)
    1379                     ptstr += ptfmt%(Background[1]['debyeTerms'][int(id)][2*ip])
    1380             print names
    1381             print ptstr
    1382             print sigstr
     1371            print ' term       DebyeA       esd        DebyeR       esd        DebyeU        esd'
     1372            for term in range(Background[1]['nDebye']):
     1373                line = ' term %d'%(term)
     1374                for ip,name in enumerate(parms):
     1375                    line += ptfmt%(Background[1]['debyeTerms'][term][2*ip])
     1376                    if name+str(term) in sigDict:
     1377                        line += ptfmt%(sigDict[name+str(term)])
     1378                print line
    13831379        if Background[1]['nPeaks']:
    13841380            parms = ['BkPkpos','BkPkint','BkPksig','BkPkgam']
     
    15301526                ptstr += ptfmt[name] % (parmDict[parName])
    15311527                if parName in varyList:
    1532 #                    ptstr += G2IO.ValEsd(parmDict[parName],sigDict[parName])
    15331528                    ptstr += ptfmt[name] % (sigDict[parName])
    15341529                else:
    1535 #                    ptstr += G2IO.ValEsd(parmDict[parName],0.0)
    1536                     ptstr += 10*' '
     1530                    if name in ['alp','bet']:
     1531                        ptstr += 8*' '
     1532                    else:
     1533                        ptstr += 10*' '
    15371534            print '%s'%(('Peak'+str(i+1)).center(8)),ptstr
    15381535               
Note: See TracChangeset for help on using the changeset viewer.