Changeset 2727
- Timestamp:
- Feb 27, 2017 3:06:07 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASII.py
r2726 r2727 3574 3574 Qlimits.append([0.9*qMax,qMax]) 3575 3575 ElList = {} 3576 sumnum = 1. 3576 3577 for item in Comments: #grab chemical formula from Comments 3577 3578 if 'formula' in item[:15].lower(): … … 3581 3582 nums = formula[1::2] 3582 3583 Formula = zip(elems,nums) 3584 sumnum = 0. 3583 3585 for [elem,num] in Formula: 3584 3586 ElData = G2elem.GetElInfo(elem,Parms) 3585 3587 ElData['FormulaNo'] = float(num) 3588 sumnum += float(num) 3586 3589 ElList[elem] = ElData 3590 3587 3591 except ValueError: 3588 3592 ElData = G2elem.GetElInfo(formula[0],Parms) … … 3599 3603 for i in dlg.GetSelections(): 3600 3604 PDFnames = G2gd.GetPatternTreeDataNames(self,['PDF ',]) 3601 G2obj.CreatePDFitems(self,TextList[i],ElLists[i],Qlimits[i], pwdrMin,PDFnames)3605 G2obj.CreatePDFitems(self,TextList[i],ElLists[i],Qlimits[i],sumnum,pwdrMin,PDFnames) 3602 3606 for item in self.ExportPDF: item.Enable(True) 3603 3607 finally: … … 3867 3871 Called from the Calculate/Refine menu. 3868 3872 ''' 3873 self.dataFrame.userReSize = False #avoids bad resizing based on MessageDialog 3869 3874 Id = G2gd.GetPatternTreeItemId(self,self.root,'Sequential results') 3870 3875 if Id: … … 3928 3933 else: 3929 3934 self.ErrorDialog('Refinement error',Msg) 3930 self.dataFrame.userReSize = False3931 3935 3932 3936 def SaveTreeSetting(self): -
trunk/GSASIIddataGUI.py
r2718 r2727 867 867 useData.SetValue(UseList[G2frame.hist]['Use']) 868 868 useBox.Add(useData,0,WACV) 869 lebail = wx.CheckBox(DData,wx.ID_ANY,label='Do LeBail extraction?') 870 lebail.Bind(wx.EVT_CHECKBOX, OnLeBail) 871 lebail.SetValue(UseList[G2frame.hist]['LeBail']) 872 useBox.Add(lebail,0,WACV) 869 if not generalData['doPawley']: 870 lebail = wx.CheckBox(DData,wx.ID_ANY,label='Do LeBail extraction?') 871 lebail.Bind(wx.EVT_CHECKBOX, OnLeBail) 872 lebail.SetValue(UseList[G2frame.hist]['LeBail']) 873 useBox.Add(lebail,0,WACV) 873 874 bottomSizer.Add(useBox,0,WACV|wx.TOP|wx.BOTTOM|wx.LEFT,5) 874 875 -
trunk/GSASIIimgGUI.py
r2723 r2727 2922 2922 G2frame,imgId, 'Comments')) 2923 2923 ElList = {} 2924 sumnum = 1.0 2924 2925 for item in Comments: #grab chemical formula from Comments, if there 2925 2926 if 'formula' in item[:15].lower(): … … 2928 2929 nums = formula[1::2] 2929 2930 formula = zip(elems,nums) 2931 sumnum = 0. 2930 2932 for [elem,num] in formula: 2931 2933 ElData = G2elem.GetElInfo(elem,Parms) 2932 2934 ElData['FormulaNo'] = float(num) 2935 sumnum += float(num) 2933 2936 ElList[elem] = ElData 2934 2937 PDFnames = G2gd.GetPatternTreeDataNames(G2frame,['PDF ',]) 2935 PDFid = G2obj.CreatePDFitems(G2frame,pwdr,ElList.copy(),Qlimits, pwdrMin,PDFnames)2938 PDFid = G2obj.CreatePDFitems(G2frame,pwdr,ElList.copy(),Qlimits,sumnum,pwdrMin,PDFnames) 2936 2939 if not PDFid: continue 2937 2940 PDFdata = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId( -
trunk/GSASIIobj.py
r2721 r2727 2092 2092 return repr(self.msg) 2093 2093 2094 def CreatePDFitems(G2frame,PWDRtree,ElList,Qlimits, FltBkg=0,PDFnames=[]):2094 def CreatePDFitems(G2frame,PWDRtree,ElList,Qlimits,numAtm=1,FltBkg=0,PDFnames=[]): 2095 2095 '''Create and initialize a new set of PDF tree entries 2096 2096 … … 2099 2099 :param dict ElList: data structure with composition 2100 2100 :param list Qlimits: Q limits to be used for computing the PDF 2101 :param float numAtm: no. atom in chemical formula 2102 :param float FltBkg: flat background value 2103 :param list PDFnames: previously used PDF names 2104 2101 2105 :returns: the Id of the newly created PDF entry 2102 2106 ''' … … 2112 2116 'Container':{'Name':'','Mult':-1.0,'Refine':False}, 2113 2117 'Container Bkg.':{'Name':'','Mult':-1.0},'ElList':ElList, 2114 'Geometry':'Cylinder','Diam':1.0,'Pack':0.50,'Form Vol':10.0 ,'Flat Bkg':FltBkg,2118 'Geometry':'Cylinder','Diam':1.0,'Pack':0.50,'Form Vol':10.0*numAtm,'Flat Bkg':FltBkg, 2115 2119 'DetType':'Area detector','ObliqCoeff':0.2,'Ruland':0.025,'QScaleLim':Qlimits, 2116 2120 'Lorch':False,'BackRatio':0.0,'Rmax':100.,'noRing':False,'IofQmin':1.0, -
trunk/GSASIIpwdGUI.py
r2715 r2727 4802 4802 Cmin += CBmin*data['Container Bkg.']['Mult'] 4803 4803 Smin += Cmul*Cmin 4804 data['Flat Bkg'] = Smin4804 data['Flat Bkg'] = max(0,Smin) 4805 4805 4806 4806 PDFfileSizer = wx.BoxSizer(wx.VERTICAL) … … 4984 4984 sqBox.Add(obliqCoeff,0) 4985 4985 sqBox.Add(wx.StaticText(G2frame.dataDisplay,label=' Flat Bkg.: '),0,WACV) 4986 flatBkg = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'Flat Bkg',nDig=(10,0), 4986 flatBkg = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'Flat Bkg',nDig=(10,0),min=0, 4987 4987 typeHint=float,OnLeave=AfterChangeNoRefresh) 4988 4988 sqBox.Add(flatBkg,0) -
trunk/GSASIIstrIO.py
r2718 r2727 187 187 Natoms,atomIndx,phaseVary,phaseDict,pawleyLookup,FFtables,BLtables,MFtables,maxSSwave = \ 188 188 GetPhaseData(Phases,RestraintDict=None,rbIds=rbIds,Print=False) # generates atom symmetry constraints 189 hapVary,hapDict,controlDict = GetHistogramPhaseData(Phases,Histograms,Print=False )189 hapVary,hapDict,controlDict = GetHistogramPhaseData(Phases,Histograms,Print=False,resetRefList=False) 190 190 histVary,histDict,controlDict = GetHistogramData(Histograms,Print=False) 191 191 varyList = rbVary+phaseVary+hapVary+histVary -
trunk/GSASIIstrMath.py
r2718 r2727 3079 3079 GA,GB = G2lat.Gmat2AB(G) #Orthogonalization matricies 3080 3080 Vst = np.sqrt(nl.det(G)) #V* 3081 if not Phase['General'].get('doPawley') and not parmDict[phfx+'LeBail'] :3081 if not Phase['General'].get('doPawley') and not parmDict[phfx+'LeBail'] and len(refDict['FF']): 3082 3082 if im: 3083 3083 SStructureFactor(refDict,G,hfx,pfx,SGData,SSGData,calcControls,parmDict) … … 3254 3254 G,g = G2lat.A2Gmat(A) #recip & real metric tensors 3255 3255 GA,GB = G2lat.Gmat2AB(G) #Orthogonalization matricies 3256 if not Phase['General'].get('doPawley') and not parmDict[phfx+'LeBail'] :3256 if not Phase['General'].get('doPawley') and not parmDict[phfx+'LeBail'] and len(refDict['FF']): 3257 3257 if im: 3258 3258 dFdvDict = SStructureFactorDerv(refDict,im,G,hfx,pfx,SGData,SSGData,calcControls,parmDict) … … 3449 3449 if Ka2 and iFin2-iBeg2: 3450 3450 depDerivDict[phfx+name][iBeg2:iFin2] += parmDict[phfx+'Scale']*dFdvDict[phfx+name][iref]*dervDict2['int']/refl[9+im] 3451 if not Phase['General'].get('doPawley') and not parmDict[phfx+'LeBail'] :3451 if not Phase['General'].get('doPawley') and not parmDict[phfx+'LeBail'] and len(refDict['FF']): 3452 3452 #do atom derivatives - for RB,F,X & U so far - how do I scale mixed phase constraints? 3453 3453 corr = 0.
Note: See TracChangeset
for help on using the changeset viewer.