Changeset 2522


Ignore:
Timestamp:
Nov 14, 2016 9:23:02 AM (5 years ago)
Author:
vondreele
Message:

Do Ivo's changes & some more work on mag derivatives.

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r2518 r2522  
    442442        # get the file(s)
    443443        if multiple:
    444             mode = style=wx.OPEN | wx.MULTIPLE
     444            mode = wx.OPEN|wx.MULTIPLE
    445445        else:
    446             mode = style=wx.OPEN
     446            mode = wx.OPEN
    447447        filelist = G2G.GetImportFile(self,message="Choose "+label+" input file",
    448                     defaultFile="",wildcard=choices, style=mode)
     448                    defaultFile="",wildcard=choices,style=mode)
    449449        rd_list = []
    450450        filelist1 = []
  • trunk/GSASIIIO.py

    r2515 r2522  
    373373                primaryReaders.append(rd)
    374374    if len(secondaryReaders) + len(primaryReaders) == 0:
    375         print('Error: No matching format for file '+filename)
     375        print('Error: No matching format for file '+imagefile)
    376376        raise Exception('No image read')
    377377    fp = None
     
    416416                return rd.Comments,rd.Data,rd.Npix,rd.Image
    417417    else:
    418         print('Error reading file '+filename)
     418        print('Error reading file '+imagefile)
    419419        print('Error messages(s)\n'+errorReport)
    420420        raise Exception('No image read')   
     
    439439            primaryReaders.append(rd)
    440440    if len(secondaryReaders) + len(primaryReaders) == 0:
    441         print('Error: No matching format for file '+filename)
     441        print('Error: No matching format for file '+imagefile)
    442442        raise Exception('No image read')
    443443    errorReport = ''
     
    484484        if CreatedIMGitems: return CreatedIMGitems
    485485    else:
    486         print('Error reading file '+filename)
     486        print('Error reading file '+imagefile)
    487487        print('Error messages(s)\n'+errorReport)
    488488        return []
  • trunk/GSASIIimage.py

    r2490 r2522  
    371371    'Needs a doc string'
    372372    dsp = data['wavelength']/(2.0*npsind(Th))   
    373     return GetDetectorXY(dsp,azm,data)
     373    return GetDetectorXY(dsp,Azm,data)
    374374                   
    375375def GetTthAzmDsp(x,y,data): #expensive
  • trunk/GSASIImath.py

    r2466 r2522  
    277277        while True:
    278278            try:
    279                 jndb = Indb.index(indb)
    280                 Indb.remove(jndb)
     279                jndb = IndB.index(indb)
     280                IndB.remove(jndb)
    281281            except:
    282282                break
  • trunk/GSASIIphsGUI.py

    r2521 r2522  
    38713871        AA1letter = ['A','R','N','D','C','Q','E','G','H','I',
    38723872            'L','K','M','F','P','S','T','W','Y','V','M',' ',' ',' ']
    3873         defaultDrawing = {'Atoms':[],'viewPoint':[[0.5,0.5,0.5],[]],'showHydrogen':True,
     3873        defaultDrawing = {'viewPoint':[[0.5,0.5,0.5],[]],'showHydrogen':True,
    38743874            'backColor':[0,0,0],'depthFog':False,'Zclip':50.0,'cameraPos':50.,'Zstep':0.5,
    38753875            'radiusFactor':0.85,'contourLevel':1.,'bondRadius':0.1,'ballScale':0.33,
  • trunk/GSASIIpwd.py

    r2519 r2522  
    12001200                    if len(Pdabc):
    12011201                        alp = np.interp(dsp,Pdabc[0],Pdabc[1])
    1202                         dad0 = 0
     1202                        dada0 = 0
    12031203                    else:
    12041204                        alp = G2mth.getTOFalpha(parmDict,dsp)
     
    12931293    'needs a doc string'
    12941294    if len(Background) == 1:            # fix up old backgrounds
    1295         BackGround.append({'nDebye':0,'debyeTerms':[]})
     1295        Background.append({'nDebye':0,'debyeTerms':[]})
    12961296    bakType,bakFlag = Background[0][:2]
    12971297    backVals = Background[0][3:]
  • trunk/GSASIIstrMath.py

    r2520 r2522  
    10821082        #sums below are over Nops - real part
    10831083        dfadfr = np.sum(fam/occ,axis=2)        #array(Mxyz,refBlk,nAtom) Fdata != 0 avoids /0. problem deriv OK
    1084         dfadx = np.sum(-twopi*Uniq[nxs,:,:,nxs,:]*famx[:,:,:,:,nxs],axis=2)          #deriv OK
     1084        dfadx = np.sum(twopi*Uniq[nxs,:,:,nxs,:]*famx[:,:,:,:,nxs],axis=2)          #deriv OK
    10851085        dfadmx = np.sum(dmx*TMcorr[nxs,:,nxs,:]*cosm[nxs,:,:,:],axis=2)
    10861086        dfadui = np.sum(-SQfactor[:,nxs,nxs]*fam,axis=2) #array(Ops,refBlk,nAtoms)  deriv OK
     
    10881088        # imaginary part; array(3,refBlk,nAtom,3) & array(3,refBlk,nAtom,6)
    10891089        dfbdfr = np.sum(fbm/occ,axis=2)        #array(mxyz,refBlk,nAtom) Fdata != 0 avoids /0. problem
    1090         dfbdx = np.sum(-twopi*Uniq[nxs,:,:,nxs,:]*fbmx[:,:,:,:,nxs],axis=2)
     1090        dfbdx = np.sum(twopi*Uniq[nxs,:,:,nxs,:]*fbmx[:,:,:,:,nxs],axis=2)
    10911091        dfbdmx = np.sum(dmx*TMcorr[nxs,:,nxs,:]*sinm[nxs,:,:,:],axis=2)
    10921092        dfbdui = np.sum(-SQfactor[:,nxs,nxs]*fbm,axis=2) #array(Ops,refBlk,nAtoms)
     
    10981098        dFdui[iBeg:iFin] = 2.*np.sum(fams[:,:,nxs]*dfadui+fbms[:,:,nxs]*dfbdui,axis=0)
    10991099        dFdua[iBeg:iFin] = 2.*np.sum(fams[:,:,nxs,nxs]*dfadua+fbms[:,:,nxs,nxs]*dfbdua,axis=0)
    1100 #        GSASIIpath.IPyBreak()
     1100        GSASIIpath.IPyBreak()
    11011101        iBeg += blkSize
    11021102    print ' %d derivative time %.4f\r'%(nRef,time.time()-time0)
Note: See TracChangeset for help on using the changeset viewer.