- Timestamp:
- Mar 10, 2015 11:35:24 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/GSASII.py ¶
r1688 r1694 1325 1325 'Dummy':False, 1326 1326 'ranId':ran.randint(0,sys.maxint), 1327 'Offset':[0.0,0.0],'delOffset':0.02,'refOffset':-1.0,'refDelt':0.01, 1328 'qPlot':False,'dPlot':False,'sqrtPlot':False 1327 1329 } 1328 1330 rd.Sample['ranId'] = valuesdict['ranId'] # this should be removed someday … … 1498 1500 'Dummy':True, 1499 1501 'ranId':ran.randint(0,sys.maxint), 1502 'Offset':[0.0,0.0],'delOffset':0.02,'refOffset':-1.0,'refDelt':0.01, 1503 'qPlot':False,'dPlot':False,'sqrtPlot':False 1500 1504 } 1501 1505 self.PatternTree.SetItemPyData(Id,[valuesdict,rd.powderdata]) -
TabularUnified trunk/GSASIIIO.py ¶
r1671 r1694 35 35 import GSASIIlattice as G2lat 36 36 import GSASIIpwdGUI as G2pdG 37 import GSASIIimage as G2img 37 38 import GSASIIElem as G2el 38 39 import GSASIIstrIO as G2stIO … … 1040 1041 else: 1041 1042 for i,azm in enumerate(azms[:-1]): 1042 Azms.append( (azms[i+1]+azm)/2.)1043 Azms.append(G2img.meanAzm(azm,azms[i+1])) 1043 1044 for i,azm in enumerate(azms[:-1]): 1044 1045 Aname = name+" Azm= %.2f"%(Azms[i]) … … 1088 1089 'Dummy':False, 1089 1090 'ranId':ran.randint(0,sys.maxint), 1091 'Offset':[0.0,0.0],'delOffset':0.02,'refOffset':-1.0,'refDelt':0.01, 1092 'qPlot':False,'dPlot':False,'sqrtPlot':False 1090 1093 } 1091 1094 G2frame.PatternTree.SetItemPyData( -
TabularUnified trunk/GSASIIimage.py ¶
r1665 r1694 49 49 npatand = lambda x: 180.*np.arctan(x)/np.pi 50 50 npatan2d = lambda y,x: 180.*np.arctan2(y,x)/np.pi 51 52 51 debug = False 53 52 … … 428 427 'Give azimuth value for detector x,y position; calibration info in data' 429 428 return GetTthAzmDsp(x,y,data)[1] 429 430 def meanAzm(a,b): 431 AZM = lambda a,b: npacosd(0.5*(npsind(2.*b)-npsind(2.*a))/(np.pi*(b-a)/180.))/2. 432 azm = AZM(a,b) 433 quad = int((a+b)/180.) 434 if quad == 1: 435 azm = 180.-azm 436 elif quad == 2: 437 azm += 180. 438 elif quad == 3: 439 azm = 360-azm 440 return azm 430 441 431 442 def ImageCompress(image,scale): -
TabularUnified trunk/GSASIIphsGUI.py ¶
r1691 r1694 2182 2182 else: 2183 2183 names = Names[:2] 2184 Waves = wx.FlexGridSizer( 1,4,5,5)2184 Waves = wx.FlexGridSizer(0,4,5,5) 2185 2185 elif Stype == 'Spos': 2186 2186 if waveType in ['ZigZag','Sawtooth'] and not iwave: 2187 2187 names = Names[6:] 2188 Waves = wx.FlexGridSizer( 1,6,5,5)2188 Waves = wx.FlexGridSizer(0,6,5,5) 2189 2189 waveName = waveType 2190 2190 else: 2191 2191 names = Names[:6] 2192 Waves = wx.FlexGridSizer( 1,8,5,5)2192 Waves = wx.FlexGridSizer(0,8,5,5) 2193 2193 else: 2194 2194 names = Names 2195 Waves = wx.FlexGridSizer( 1,8,5,5)2195 Waves = wx.FlexGridSizer(0,8,5,5) 2196 2196 waveSizer.Add(wx.StaticText(waveData,label=' %s parameters: %s'%(waveName,str(names).rstrip(']').lstrip('[').replace("'",''))),0,WACV) 2197 2197 for ival,val in enumerate(wave[0]): -
TabularUnified trunk/GSASIIplot.py ¶
r1672 r1694 340 340 elif event.key == 'd': 341 341 Data['Scale'] /= 1.1 342 elif event.key == '+':342 elif event.key in ['+','=']: 343 343 Data['Layer'] = min(Data['Layer']+1,HKLmax[i]) 344 344 elif event.key == '-': … … 592 592 elif key in 'B': 593 593 ifBox = not ifBox 594 elif key == '+':594 elif key in ['+','=']: 595 595 Data['Scale'] *= 1.25 596 596 elif key == '-': … … 1047 1047 G2frame.SinglePlot = not G2frame.SinglePlot 1048 1048 newPlot = True 1049 elif event.key == '+':1049 elif event.key in ['+','=']: 1050 1050 if G2frame.PickId: 1051 1051 G2frame.PickId = False … … 1424 1424 Ymax = max(Ymax,max(xye[1])) 1425 1425 if Ymax is None: return # nothing to plot 1426 offset = Pattern[0]['Offset'][0]*Ymax/100.0 1426 offsetX = Pattern[0]['Offset'][1] 1427 offsetY = Pattern[0]['Offset'][0] 1427 1428 if G2frame.logPlot: 1428 1429 Title = 'log('+Title+')' … … 1501 1502 np.seterr(invalid=olderr['invalid']) 1502 1503 else: 1503 Y = xye[1]+offset *N1504 Y = xye[1]+offsetY*N*Ymax/100.0 1504 1505 elif 'SASD' in plottype: 1505 1506 B = xye[5] 1506 1507 if G2frame.sqPlot: 1507 Y = xye[1]*Sample['Scale'][0]*(1.05)**( Pattern[0]['Offset'][0]*N)*X**41508 Y = xye[1]*Sample['Scale'][0]*(1.05)**(offsetY*N)*X**4 1508 1509 else: 1509 Y = xye[1]*Sample['Scale'][0]*(1.05)**( Pattern[0]['Offset'][0]*N)1510 Y = xye[1]*Sample['Scale'][0]*(1.05)**(offsetY*N) 1510 1511 if LimitId and ifpicked: 1511 1512 limits = np.array(G2frame.PatternTree.GetItemPyData(LimitId)) … … 1533 1534 else: 1534 1535 if 'SASD' in plottype and G2frame.logPlot: 1535 X *= (1.01)**( Pattern[0]['Offset'][1]*N)1536 X *= (1.01)**(offsetX*N) 1536 1537 else: 1537 X += Pattern[0]['Offset'][1]*.005*N1538 X += offsetX*.005*N 1538 1539 Xum = ma.getdata(X) 1539 1540 DifLine = [''] … … 1544 1545 np.seterr(invalid=olderr['invalid']) 1545 1546 else: 1546 Z = xye[3]+offset *N1547 Z = xye[3]+offsetY*N*Ymax/100.0 1547 1548 if 'PWDR' in plottype: 1548 1549 if Pattern[0]['sqrtPlot']: … … 1552 1553 D = np.where(xye[5],(Y-Z),0.)-Ymax*Pattern[0]['delOffset'] 1553 1554 else: 1554 W = xye[4]+offset *N1555 W = xye[4]+offsetY*N*Ymax/100.0 1555 1556 D = xye[5]-Ymax*Pattern[0]['delOffset'] #powder background 1556 1557 elif 'SASD' in plottype: … … 2809 2810 def OnPlotKeyPress(event): 2810 2811 global Off,Atom,Ax 2811 newPlot = False 2812 newPlot = False 2812 2813 if event.key == '0': 2813 2814 Off = 0 2814 elif event.key == '+':2815 elif event.key in ['+','=']: 2815 2816 Off += 1 2816 2817 elif event.key == '-': … … 4237 4238 SetPeakRoll(dirDict[key]) 4238 4239 SetMapPeaksText(mapPeaks) 4239 elif key in ['+','-',' 0'] and generalData['Type'] in ['modulated','magnetic']:4240 elif key in ['+','-','=','0'] and generalData['Type'] in ['modulated','magnetic']: 4240 4241 if key == '0': 4241 4242 G2frame.tau = 0. 4242 elif key =='+':4243 elif key in ['+','=']: 4243 4244 G2frame.tau += 0.05 4244 elif key == '-':4245 elif key == '-': 4245 4246 G2frame.tau -= 0.05 4246 4247 G2frame.tau %= 1. #force 0-1 range
Note: See TracChangeset
for help on using the changeset viewer.