Changeset 3681
- Timestamp:
- Oct 17, 2018 1:37:42 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIdataGUI.py
r3674 r3681 2785 2785 self.ErrorBars = False 2786 2786 self.Contour = False 2787 self.TforYaxis = False 2787 2788 self.Legend = False 2788 2789 self.SinglePlot = True … … 5123 5124 # PDR / Unit Cells List 5124 5125 G2G.Define_wxId('wxID_INDEXPEAKS', 'wxID_REFINECELL', 'wxID_COPYCELL', 'wxID_MAKENEWPHASE', 5125 'wxID_EXPORTCELLS','wxID_LOADCELL','wxID_IMPORTCELL','wxID_TRANSFORMCELL','wxID_RUNSUB MAG')5126 'wxID_EXPORTCELLS','wxID_LOADCELL','wxID_IMPORTCELL','wxID_TRANSFORMCELL','wxID_RUNSUB','wxID_RUNSUBMAG') 5126 5127 self.IndexMenu = wx.MenuBar() 5127 5128 self.PrefillDataMenu(self.IndexMenu) … … 5130 5131 self.IndexPeaks = self.IndexEdit.Append(G2G.wxID_INDEXPEAKS,'Index Cell', 5131 5132 'Find cells that index fitted peaks') 5133 self.RunSubGroups = self.IndexEdit.Append(G2G.wxID_RUNSUB,'Run SUBGROUPS', 5134 'If disabled, do Load Cell first') 5132 5135 self.RunSubGroupsMag = self.IndexEdit.Append(G2G.wxID_RUNSUBMAG,'Run k-SUBGROUPMAG', 5133 5136 'If disabled, do Load Cell first') … … 5147 5150 self.PostfillDataMenu() 5148 5151 self.IndexPeaks.Enable(False) 5152 self.RunSubGroups.Enable(False) 5149 5153 self.RunSubGroupsMag.Enable(False) 5150 5154 self.CopyCell.Enable(False) -
trunk/GSASIIphsGUI.py
r3658 r3681 4974 4974 if waveTyp in ['ZigZag','Block','SawTooth','Crenel']: 4975 4975 nx = 1 4976 CSI = G2spc.GetSSfxuinel(waveTyp,Stype,1,xyz,SGData,SSGData )4976 CSI = G2spc.GetSSfxuinel(waveTyp,Stype,1,xyz,SGData,SSGData,debug=True)[0] 4977 4977 else: 4978 4978 CSI = G2spc.GetSSfxuinel('Fourier',Stype,iwave+1-nx,xyz,SGData,SSGData) -
trunk/GSASIIplot.py
r3652 r3681 1620 1620 global DifLine # BHT: probably does not need to be global 1621 1621 global Ymax 1622 global Pattern,mcolors,Plot,Page 1622 global Pattern,mcolors,Plot,Page,imgAx,Temps 1623 1623 plottype = plotType 1624 1624 … … 1766 1766 Page.plotStyle['sqPlot'] = not Page.plotStyle['sqPlot'] 1767 1767 elif event.key == 't' and 'PWDR' in plottype: 1768 Page.plotStyle['dPlot'] = not Page.plotStyle['dPlot'] 1769 if Page.plotStyle['dPlot']: 1770 G2frame.Contour = False 1771 G2frame.Weight = False 1772 Page.plotStyle['qPlot'] = False 1773 newPlot = True 1768 if G2frame.Contour: 1769 G2frame.TforYaxis = not G2frame.TforYaxis 1770 else: 1771 Page.plotStyle['dPlot'] = not Page.plotStyle['dPlot'] 1772 if Page.plotStyle['dPlot']: 1773 G2frame.Contour = False 1774 G2frame.Weight = False 1775 Page.plotStyle['qPlot'] = False 1776 newPlot = True 1774 1777 elif event.key == 'm': 1775 1778 Page.plotStyle['sqrtPlot'] = False … … 1817 1820 1818 1821 def OnMotion(event): 1822 if event.button and G2frame.Contour and G2frame.TforYaxis: 1823 ytics = imgAx.get_yticks() 1824 ytics = np.where(ytics<len(Temps),ytics,-1) 1825 ylabs = [np.where(0<=i ,Temps[int(i)],' ') for i in ytics] 1826 imgAx.set_yticklabels(ylabs) 1819 1827 xpos = event.xdata 1820 1828 if xpos is None: return #avoid out of frame mouse position … … 2386 2394 if G2frame.Contour: 2387 2395 Page.Choice = (' key press','d: lower contour max','u: raise contour max','o: reset contour max', 2388 'i: interpolation method','s: color scheme','c: contour off' )2396 'i: interpolation method','s: color scheme','c: contour off','t: temperature for y-axis') 2389 2397 else: 2390 2398 if Page.plotStyle['logPlot']: … … 2469 2477 ParmList = [] 2470 2478 SampleList = [] 2479 Temps = [] 2471 2480 if G2frame.selections is None: 2472 2481 choices = G2gd.GetGPXtreeDataNames(G2frame,plotType) … … 2491 2500 SampleList.append(G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame, 2492 2501 id, 'Sample Parameters'))) 2502 Temps.append('%.1fK'%SampleList[-1]['Temperature']) 2493 2503 if not G2frame.Contour: 2494 2504 PlotList.reverse() … … 2497 2507 lenX = 0 2498 2508 Ymax = None 2499 for Pattern in PlotList:2509 for ip,Pattern in enumerate(PlotList): 2500 2510 xye = Pattern[1] 2501 2511 bxye = G2pdG.GetFileBackground(G2frame,xye,Pattern) … … 2682 2692 ContourX = range(lenX) 2683 2693 Nseq += 1 2684 Plot.set_ylabel('Data sequence',fontsize=12) 2694 if G2frame.TforYaxis: 2695 Plot.set_ylabel('Temperature',fontsize=14) 2696 else: 2697 Plot.set_ylabel('Data sequence',fontsize=14) 2685 2698 else: 2686 2699 if G2frame.plusPlot: … … 2899 2912 Img = Plot.imshow(ContourZ,cmap=acolor,vmin=0,vmax=Ymax*G2frame.Cmax,interpolation=G2frame.Interpolate, 2900 2913 extent=[ContourX[0],ContourX[-1],ContourY[0],ContourY[-1]],aspect='auto',origin='lower') 2914 if G2frame.TforYaxis: 2915 imgAx = Img.axes 2916 ytics = imgAx.get_yticks() 2917 ylabs = [Temps[int(i)] for i in ytics[:-1]] 2918 imgAx.set_yticklabels(ylabs) 2901 2919 Page.figure.colorbar(Img) 2902 2920 else: -
trunk/GSASIIpwdGUI.py
r3673 r3681 3117 3117 ssopt['SGData'] = SGData 3118 3118 data = [controls,bravais,cells,dminx,ssopt,magcells] 3119 G2frame.dataWindow.RunSubGroups.Enable(True) 3119 3120 G2frame.GPXtree.SetItemPyData(UnitCellsId,data) 3120 3121 OnHklShow(None) … … 3162 3163 if not ssopt.get('Use',False): 3163 3164 G2frame.dataWindow.RunSubGroupsMag.Enable(True) 3165 G2frame.dataWindow.RunSubGroups.Enable(True) 3164 3166 G2frame.GPXtree.SetItemPyData(UnitCellsId,data) 3165 3167 G2frame.dataWindow.RefineCell.Enable(True) … … 3187 3189 controls[13] = SGData['SpGrp'] 3188 3190 # G2frame.GPXtree.SetItemPyData(UnitCellsId,[controls,bravais,cells,dmin,ssopt]) 3191 G2frame.dataWindow.RunSubGroups.Enable(True) 3189 3192 G2frame.dataWindow.RefineCell.Enable(True) 3190 3193 OnHklShow(None) … … 3627 3630 phase['Keep'] = False 3628 3631 return uAtms 3632 3633 def OnRunSubs(event): 3634 # import SUBGROUPS as kSUB 3635 G2frame.dataWindow.RunSubGroupsMag.Enable(False) 3636 pUCid = G2gd.GetGPXtreeItemId(G2frame,G2frame.PatternId, 'Unit Cells List') 3637 controls,bravais,cells,dminx,ssopt,magcells = G2frame.GPXtree.GetItemPyData(pUCid) 3638 E,SGData = G2spc.SpcGroup(controls[13]) 3639 kvec = ['0','0','0',' ',' ',' ',' ',' ',' ',' '] 3640 Kx = [' ','0','1/2','-1/2','1/3','-1/3','2/3','1'] 3641 Ky = [' ','0','1/2','1/3','2/3','1'] 3642 Kz = [' ','0','1/2','3/2','1/3','2/3','1'] 3643 dlg = G2G.MultiDataDialog(G2frame,title='SUBGROUPS options', 3644 prompts=[' kx1 as fr.',' ky1 as fr.',' kz1 as fr.',' kx2 as fr.',' ky2 as fr.',' kz2 as fr.', \ 3645 ' kx3 as fr.',' ky3 as fr.',' kz3 as fr.', \ 3646 ' Use whole star',' Filter by','preserve axes','max unique'], 3647 values=kvec[:9]+[False,'',True,100], 3648 limits=[Kx[1:],Ky[1:],Kz[1:],Kx,Ky,Kz,Kx,Ky,Kz,[True,False],['',' Landau transition',' Only maximal subgroups',], 3649 [True,False],[1,100]], 3650 formats=['choice','choice','choice','choice','choice','choice','choice','choice','choice','bool','choice', 3651 'bool','%d',]) 3652 if dlg.ShowModal() == wx.ID_OK: 3653 subcells = [] 3654 newVals = dlg.GetValues() 3655 kvec[:9] = newVals[:9] 3656 nkvec = kvec.index(' ') 3657 star = newVals[9] 3658 filterby = newVals[10] 3659 keepaxes = newVals[11] 3660 maxequiv = newVals[12] 3661 if 'maximal' in filterby: 3662 maximal = True 3663 Landau = False 3664 elif 'Landau' in filterby: 3665 maximal = False 3666 Landau = True 3667 else: 3668 maximal = False 3669 Landau = False 3670 if nkvec not in [0,3,6,9]: 3671 wx.MessageBox('Error: check your propagation vector(s)', 3672 caption='Bilbao SUBGROUPS setup error',style=wx.ICON_EXCLAMATION) 3673 return 3674 if nkvec in [6,9] and Landau: 3675 wx.MessageBox('Error, multi k-vectors & Landau not compatible', 3676 caption='Bilbao SUBGROUPS setup error',style=wx.ICON_EXCLAMATION) 3677 return 3678 print('run Bilbao SUBGROUPS - TBD') 3629 3679 3630 3680 def OnRunSubsMag(event): 3631 3681 import kSUBGROUPSMAG as kMAG 3682 G2frame.dataWindow.RunSubGroups.Enable(False) 3632 3683 pUCid = G2gd.GetGPXtreeItemId(G2frame,G2frame.PatternId, 'Unit Cells List') 3633 3684 controls,bravais,cells,dminx,ssopt,magcells = G2frame.GPXtree.GetItemPyData(pUCid) … … 3731 3782 G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.IndexMenu) 3732 3783 G2frame.Bind(wx.EVT_MENU, OnIndexPeaks, id=G2G.wxID_INDEXPEAKS) 3784 G2frame.Bind(wx.EVT_MENU, OnRunSubs, id=G2G.wxID_RUNSUB) 3733 3785 G2frame.Bind(wx.EVT_MENU, OnRunSubsMag, id=G2G.wxID_RUNSUBMAG) 3734 3786 G2frame.Bind(wx.EVT_MENU, CopyUnitCell, id=G2G.wxID_COPYCELL) -
trunk/GSASIIspc.py
r3676 r3681 2830 2830 2831 2831 def DoMag(): 2832 dM = [] 2833 dMTP = [] 2832 2834 CSI = [[1,0,0],[2,0,0],[3,0,0], [4,0,0],[5,0,0],[6,0,0]],6*[[1.,0.,0.],] 2833 2835 if siteSym == '1': … … 2836 2838 CSI = 3*[[0,0,0],]+[[1,0,0],[2,0,0],[3,0,0]],3*[[0.,0.,0.],]+3*[[1.,0.,0.],] 2837 2839 else: 2840 tau = np.linspace(0,1,49,True) 2838 2841 delt6 = np.eye(6)*0.001 2839 2842 dM = posFourier(tau,nH,delt6[:3],delt6[3:]) #+np.array(Mxyz)[:,nxs,nxs] … … 2906 2909 CSI[1][i][0] = 1.0 2907 2910 2908 return CSI,None,None2911 return list(CSI),dM,dMTP 2909 2912 2910 2913 if debug: print ('super space group: '+SSGData['SSpGrp']) … … 2948 2951 elif Stype == 'Smag': 2949 2952 CSI,dF,dFTP = DoMag() 2950 2953 2951 2954 if debug: 2952 2955 return CSI,dF,dFTP … … 3481 3484 NA += len(SGOps) 3482 3485 M,T = SGOps[nA] 3483 if SGData['SGGray']: #no nonzero moments for gray groups!3486 if SGData['SGGray']: 3484 3487 newMom = -np.inner(Mom,M).T*nl.det(M)*SGData['SpnFlp'][NA+nC] 3485 3488 else: -
trunk/imports/G2pwd_Panalytical.py
r3136 r3681 62 62 sample = self.root.find(tag+'sample') 63 63 self.idstring = ospath.basename(filename) + ' Scan '+str(blockNum) 64 data = self.root.find(tag+'xrdMeasurement') 64 blks = self.root.findall(tag+'xrdMeasurement') 65 scans = [] 66 for data in blks: 67 scans += data.findall(tag+'scan') 68 data = self.root.find(tag+'xrdMeasurement') 65 69 wave = data.find(tag+'usedWavelength') 66 70 incident = data.find(tag+'incidentBeamPath') 67 71 radius = float(incident.find(tag+'radius').text) 68 72 tube = incident.find(tag+'xRayTube') 69 scans = data.findall(tag+'scan')70 73 if len(scans) > 1: 71 74 self.repeat = True … … 108 111 ] 109 112 conditions = scan.find(tag+'nonAmbientPoints') 110 if conditions :113 if conditions is not None: 111 114 kind = conditions.attrib['type'] 112 115 if kind == 'Temperature':
Note: See TracChangeset
for help on using the changeset viewer.