Changeset 612
- Timestamp:
- May 11, 2012 10:35:51 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Exercises/PbSO4/INST_XRY.PRM
r603 r612 1 123456789012345678901234567890123456789012345678901234567890 1 123456789012345678901234567890123456789012345678901234567890 2 2 INS BANK 1 3 3 INS HTYPE PXCR 4 4 INS 1 IRAD 3 5 5 INS 1 ICONS 1.540500 1.544300 0.0 0 0.7 0 0.5 6 INS 1I HEAD DUMMY INCIDENT SPECTRUM FOR X-RAY DIFFRACTOMETER 6 INS 1I HEAD DUMMY INCIDENT SPECTRUM FOR X-RAY DIFFRACTOMETER 7 7 INS 1I ITYP 0 0.0000 180.0000 1 8 8 INS 1PRCF1 3 8 0.01 9 9 INS 1PRCF11 2.000000E+00 -2.000000E+00 5.000000E+00 0.100000E+00 10 10 INS 1PRCF12 0.000000E+00 0.000000E+00 0.150000E-01 0.150000E-01 11 INS 1PRCF2 2 6 0.0112 INS 1PRCF21 2.000000E+00 -2.000000E+00 5.000000E+00 0.100000E+0113 INS 1PRCF22 0.100000E+01 0.000000E+0014 INS 1PRCF3 4 12 0.0115 INS 1PRCF31 2.000000E+00 -2.000000E+00 5.000000E+00 0.000000E+0016 INS 1PRCF32 0.100000E+00 0.000000E+00 0.000000E+00 0.000000E+0017 INS 1PRCF33 0.000000E+00 0.150000E-01 0.150000E-01 0.750000E+00 -
trunk/GSASII.py
r609 r612 84 84 pass 85 85 # print "MKL module not present" 86 __version__ = '0. 1.5'86 __version__ = '0.2.0' 87 87 G2gd.__version__ = __version__ 88 88 print "This is GSAS-II version: ",__version__ -
trunk/GSASIIgrid.py
r610 r612 143 143 frame.Bind(wx.EVT_MENU, self.OnHelpById, helpobj) 144 144 self.HelpById[helpobj.GetId()] = helpType 145 self.Append(help='', id=wx.ID_ABOUT, kind=wx.ITEM_NORMAL,146 text='&About GSAS-II')147 frame.Bind(wx.EVT_MENU, self.OnHelpAbout, id=wx.ID_ABOUT)148 145 for lbl,indx in morehelpitems: 149 146 helpobj = self.Append(text=lbl, … … 151 148 frame.Bind(wx.EVT_MENU, self.OnHelpById, helpobj) 152 149 self.HelpById[helpobj.GetId()] = indx 150 self.Append(help='', id=wx.ID_ABOUT, kind=wx.ITEM_NORMAL, 151 text='&About GSAS-II') 152 frame.Bind(wx.EVT_MENU, self.OnHelpAbout, id=wx.ID_ABOUT) 153 153 154 154 def OnHelpById(self,event): -
trunk/GSASIIphsGUI.py
r609 r612 1442 1442 # elif generalData['Type'] == 'modulated': 1443 1443 # ????? for future 1444 if not drawingData ['Atoms']:1444 if not drawingData.get('Atoms'): 1445 1445 for atom in atomData: 1446 1446 DrawAtomAdd(drawingData,atom) … … 1782 1782 dlg.Destroy() 1783 1783 G2frame.dataFrame.SetStatusText('') 1784 G2plt.PlotStructure(G2frame,data) 1784 1785 1785 1786 def ResetAtomColors(event): … … 3644 3645 mapData['Flip'] = False 3645 3646 mapSig = np.std(mapData['rho']) 3647 if not data['Drawing']: #if new drawing - no drawing data! 3648 SetupDrawingData() 3646 3649 data['Drawing']['contourLevel'] = 1. 3647 3650 data['Drawing']['mapSize'] = 10. 3648 3651 print mapData['MapType']+' computed: rhomax = %.3f rhomin = %.3f sigma = %.3f'%(np.max(mapData['rho']),np.min(mapData['rho']),mapSig) 3652 UpdateDrawAtoms() 3649 3653 G2plt.PlotStructure(G2frame,data) 3650 3654 … … 3701 3705 G2frame.dataFrame.Bind(wx.EVT_MENU, OnPeaksMove, id=G2gd.wxID_PEAKSMOVE) 3702 3706 G2frame.dataFrame.Bind(wx.EVT_MENU, OnPeaksClear, id=G2gd.wxID_PEAKSCLEAR) 3707 UpdateDrawAtoms() 3703 3708 FillMapPeaksGrid() 3704 3709 G2plt.PlotStructure(G2frame,data) -
trunk/GSASIIplot.py
r584 r612 425 425 wave = Parms['Lam1'] 426 426 if G2frame.qPlot: 427 xpos = 2.0*asind(xpos*wave/(4*math.pi)) 427 try: 428 xpos = 2.0*asind(xpos*wave/(4*math.pi)) 429 except ValueError: #avoid bad value in asin beyond upper limit 430 pass 428 431 dsp = 0.0 429 432 if abs(xpos) > 0.: #avoid possible singularity at beam center … … 550 553 Phases = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,PatternId,'Reflection Lists')) 551 554 pick = str(G2frame.itemPicked).split('(')[1].strip(')') 552 if ' Line' not in pick: #avoid data points, etc.555 if 'line' not in pick: #avoid data points, etc. 553 556 num = Phases.keys().index(pick) 554 557 if num: … … 750 753 for pId,phase in enumerate(Phases): 751 754 peaks = Phases[phase] 755 if not peaks: 756 continue 752 757 peak = np.array([[peak[4],peak[5]] for peak in peaks]) 753 758 pos = G2frame.refOffset-pId*Ymax*G2frame.refDelt*np.ones_like(peak) … … 758 763 if len(Phases): 759 764 handles,legends = Plot.get_legend_handles_labels() #got double entries in the legends for some reason 760 Plot.legend(handles[::2],legends[::2],title='Phases',loc='best') #skip every other one 765 if handles: 766 Plot.legend(handles[::2],legends[::2],title='Phases',loc='best') #skip every other one 761 767 762 768 if G2frame.Contour: -
trunk/GSASIIstruct.py
r609 r612 2306 2306 Dij = parmDict[phfx+'D11']*h**2+parmDict[phfx+'D22']*k**2+parmDict[phfx+'D33']*l**2+ \ 2307 2307 parmDict[phfx+'D12']*h*k+parmDict[phfx+'D13']*h*l+parmDict[phfx+'D23']*k*l 2308 return Dij*refl[4]**2*tand(refl[5]/2.0)2308 return -Dij*refl[4]**2*tand(refl[5]/2.0) 2309 2309 2310 2310 def GetHStrainShiftDerv(refl,SGData,phfx): … … 2336 2336 phfx+'D12':h*k,phfx+'D13':h*l,phfx+'D23':k*l} 2337 2337 for item in dDijDict: 2338 dDijDict[item] *= refl[4]**2*tand(refl[5]/2.0)2338 dDijDict[item] *= -refl[4]**2*tand(refl[5]/2.0) 2339 2339 return dDijDict 2340 2340 … … 2394 2394 Wd,fmin,fmax = G2pwd.getWidths(refl[5],refl[6],refl[7],shl) 2395 2395 iBeg = max(xB,np.searchsorted(x,refl[5]-fmin)) 2396 iFin = m in(np.searchsorted(x,refl[5]+fmax),xF)2396 iFin = max(xB,min(np.searchsorted(x,refl[5]+fmax),xF)) 2397 2397 iFin2 = iFin 2398 2398 yp[iBeg:iFin] = refl[13]*refl[9]*G2pwd.getFCJVoigt3(refl[5],refl[6],refl[7],shl,x[iBeg:iFin]) #>90% of time spent here … … 2400 2400 pos2 = refl[5]+lamRatio*tand(refl[5]/2.0) # + 360/pi * Dlam/lam * tan(th) 2401 2401 Wd,fmin,fmax = G2pwd.getWidths(pos2,refl[6],refl[7],shl) 2402 iBeg2 = max(xB,np.searchsorted(x[xB:xF],pos2-fmin)) 2403 iFin2 = min(np.searchsorted(x[xB:xF],pos2+fmax),xF) 2402 iBeg2 = max(xB,np.searchsorted(x,pos2-fmin)) 2403 iFin2 = min(np.searchsorted(x,pos2+fmax),xF) 2404 if not iBeg2+iFin2: #peak below low limit - skip peak 2405 continue 2406 elif not iBeg2-iFin2: #peak above high limit - done 2407 break 2404 2408 yp[iBeg2:iFin2] += refl[13]*refl[9]*kRatio*G2pwd.getFCJVoigt3(pos2,refl[6],refl[7],shl,x[iBeg2:iFin2]) #and here 2405 2409 refl[8] = np.sum(np.where(ratio[iBeg:iFin2]>0.,yp[iBeg:iFin2]*ratio[iBeg:iFin2]/(refl[13]*(1.+kRatio)),0.0))
Note: See TracChangeset
for help on using the changeset viewer.