Changeset 4046
- Timestamp:
- Jun 30, 2019 9:53:33 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIdataGUI.py
r4045 r4046 4697 4697 time.sleep(0.1) 4698 4698 pltNumber = self.G2plotNB.nb.GetSelection() 4699 pltText = self.G2plotNB.nb.GetPageText(pltNumber) 4699 if pltNumber >= 0: 4700 pltText = self.G2plotNB.nb.GetPageText(pltNumber) 4701 else: 4702 pltText = None 4700 4703 # update plots where a routine is supplied 4701 4704 for lbl,win in zip(self.G2plotNB.plotList,self.G2plotNB.panelList): … … 7355 7358 sigwtFrList.append(0.0) 7356 7359 continue 7360 elif not Phases[phase]['Histograms'][name]['Use']: 7361 wtFrList.append(None) 7362 sigwtFrList.append(0.0) 7363 continue 7357 7364 wtFrSum = 0. 7358 7365 for phase1 in Phases: 7359 7366 if name not in Phases[phase1]['Histograms']: continue 7367 if not Phases[phase1]['Histograms'][name]['Use']: continue 7360 7368 wtFrSum += Phases[phase1]['Histograms'][name]['Scale'][0]*Phases[phase1]['General']['Mass'] 7361 7369 var = str(Phases[phase]['pId'])+':'+str(i)+':Scale' -
trunk/GSASIIddataGUI.py
r3982 r4046 126 126 if 'PWDR' in G2frame.hist and generalData['Type'] != 'magnetic': 127 127 wtSum = G2pwd.PhaseWtSum(G2frame,G2frame.hist) 128 if wtSum :128 if wtSum and UseList[G2frame.hist]['Use']: 129 129 weightFr = UseList[G2frame.hist]['Scale'][0]*generalData['Mass']/wtSum 130 130 scaleSizer.Add(wx.StaticText(DData,label=' Wt. fraction: %.3f'%(weightFr)),0,WACV) … … 832 832 Obj = event.GetEventObject() 833 833 UseList[G2frame.hist]['Use'] = Obj.GetValue() 834 wx.CallLater(100,RepaintHistogramInfo,DData.GetScrollPos(wx.VERTICAL)) 834 835 835 836 def OnLeBail(event): -
trunk/GSASIIplot.py
r4044 r4046 6433 6433 Xnew.append(X[i]) 6434 6434 Ynew.append(Y[i]) 6435 if sig [i]:6435 if sig and sig[i]: 6436 6436 gotsig = True 6437 6437 Ysnew.append(sig[i]) -
trunk/GSASIIpwd.py
r4030 r4046 86 86 if Phases[phase]['General']['Type'] != 'magnetic': 87 87 if histo in Phases[phase]['Histograms']: 88 if not Phases[phase]['Histograms'][histo]['Use']: continue 88 89 mass = Phases[phase]['General']['Mass'] 89 90 phFr = Phases[phase]['Histograms'][histo]['Scale'][0] -
trunk/GSASIIstrMath.py
r4038 r4046 3013 3013 continue 3014 3014 Phase = Phases[phase] 3015 if histogram not in Phase['Histograms']: 3016 continue 3015 3017 im = 0 3016 3018 if Phase['General'].get('Modulated',False): … … 3114 3116 print ('GetFobsSq t=',time.time()-starttime) 3115 3117 3116 def getPowderProfile(parmDict,x,varylist,Histogram,Phases,calcControls,pawleyLookup ):3118 def getPowderProfile(parmDict,x,varylist,Histogram,Phases,calcControls,pawleyLookup,histogram=None): 3117 3119 'Computes the powder pattern for a histogram based on contributions from all used phases' 3118 3120 if GSASIIpath.GetConfigValue('Show_timing',False): starttime = time.time() … … 3173 3175 continue 3174 3176 Phase = Phases[phase] 3177 if histogram and not histogram in Phase['Histograms']: 3178 continue 3175 3179 pId = Phase['pId'] 3176 3180 pfx = '%d::'%(pId) … … 3318 3322 ptx.pyqlmninit() #initialize fortran arrays for spherical harmonics for each processor 3319 3323 parmDict,x,varylist,Histogram,Phases,rigidbodyDict,calcControls,pawleyLookup,dependentVars = args[:9] 3320 prc=0 3321 tprc=1 3324 prc,tprc,histogram = 0,1,None 3322 3325 if len(args) >= 10: prc=args[9] 3323 3326 if len(args) >= 11: tprc=args[10] 3327 if len(args) >= 12: histogram=args[11] 3324 3328 def cellVaryDerv(pfx,SGData,dpdA): 3325 3329 if SGData['SGLaue'] in ['-1',]: … … 3390 3394 continue 3391 3395 Phase = Phases[phase] 3396 if histogram and histogram not in Phase['Histograms']: 3397 continue 3392 3398 SGData = Phase['General']['SGData'] 3393 3399 SGMT = np.array([ops[0].T for ops in SGData['SGOps']]) … … 3855 3861 dMdvh = None 3856 3862 depDerivDict = None 3857 profArgs = [ 3863 # old approach, create all args prior to use 3864 # profArgs = [ 3865 # (parmDict,x[xB:xF],varylist,Histogram,Phases,rigidbodyDict,calcControls,pawleyLookup,dependentVars, 3866 # i,ncores,histogram) for i in range(ncores)] 3867 # for dmdv,depDerivs in MPpool.imap_unordered(getPowderProfileDervMP,profArgs): 3868 # better, use a generator so arg is created as used 3869 profGenArgs = ( 3858 3870 (parmDict,x[xB:xF],varylist,Histogram,Phases,rigidbodyDict,calcControls,pawleyLookup,dependentVars, 3859 i,ncores ) for i in range(ncores)]3860 for dmdv,depDerivs in MPpool.imap_unordered(getPowderProfileDervMP,prof Args):3871 i,ncores,histogram) for i in range(ncores)) 3872 for dmdv,depDerivs in MPpool.imap_unordered(getPowderProfileDervMP,profGenArgs): 3861 3873 if dMdvh is None: 3862 3874 dMdvh = dmdv … … 3868 3880 else: 3869 3881 dMdvh,depDerivDict = getPowderProfileDervMP([parmDict,x[xB:xF], 3870 varylist,Histogram,Phases,rigidbodyDict,calcControls,pawleyLookup,dependentVars ])3882 varylist,Histogram,Phases,rigidbodyDict,calcControls,pawleyLookup,dependentVars,0,1,histogram]) 3871 3883 #dMdvh = getPowderProfileDerv(parmDict,x[xB:xF], 3872 3884 # varylist,Histogram,Phases,rigidbodyDict,calcControls,pawleyLookup,dependentVars) … … 3950 3962 xF = np.searchsorted(x,Limits[1])+1 3951 3963 yc[xB:xF],yb[xB:xF] = getPowderProfile(parmDict,x[xB:xF], 3952 varylist,Histogram,Phases,calcControls,pawleyLookup )3964 varylist,Histogram,Phases,calcControls,pawleyLookup,histogram) 3953 3965 yc[xB:xF] += yb[xB:xF] 3954 3966 if not np.any(y): #fill dummy data
Note: See TracChangeset
for help on using the changeset viewer.