Changeset 5342
- Timestamp:
- Oct 2, 2022 10:39:19 AM (8 months ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIdataGUI.py
r5336 r5342 3147 3147 self.HKL = [] 3148 3148 self.Extinct = [] 3149 self.PlotOpts = {} # new place to put plotting options 3149 3150 self.Lines = [] # lines used for data limits & excluded regions 3150 3151 self.MagLines = [] # lines used for plot magnification -
trunk/GSASIIplot.py
r5332 r5342 192 192 except TypeError: 193 193 pass 194 if '2' in platform.python_version_tuple()[0]: 195 GkDelta = unichr(0x0394) 196 Gkrho = unichr(0x03C1) 197 super2 = unichr(0xb2) 198 Angstr = unichr(0x00c5) 199 Pwrm1 = unichr(0x207b)+unichr(0x0b9) 200 else: 201 GkDelta = chr(0x0394) 202 Gkrho = chr(0x03C1) 203 super2 = chr(0xb2) 204 Angstr = chr(0x00c5) 205 Pwrm1 = chr(0x207b)+chr(0x0b9) 194 if '2' not in platform.python_version_tuple()[0]: 195 unichr = chr 196 GkDelta = unichr(0x0394) 197 Gkrho = unichr(0x03C1) 198 super2 = unichr(0xb2) 199 Angstr = unichr(0x00c5) 200 Pwrm1 = unichr(0x207b)+unichr(0x0b9) 206 201 # misc global vars 207 202 nxs = np.newaxis … … 3801 3796 for hkl in G2frame.HKL: 3802 3797 clr = orange 3798 dash = (3,3) 3803 3799 if len(hkl) > 6 and hkl[3]: 3804 3800 clr = 'g' 3801 hklind = G2frame.PlotOpts.get('hklHighlight',0) 3802 if hklind != 0: # highlight selected classes of reflections 3803 if hkl[hklind-1] != 0: 3804 clr = 'b' 3805 dash = (5,2) 3805 3806 if Page.plotStyle['qPlot']: 3806 Plot.axvline(2.*np.pi/G2lat.Pos2dsp(Parms,hkl[-2]),color=clr,dashes= (3,3),lw=1.5)3807 Plot.axvline(2.*np.pi/G2lat.Pos2dsp(Parms,hkl[-2]),color=clr,dashes=dash,lw=1.5) 3807 3808 elif Page.plotStyle['dPlot']: 3808 Plot.axvline(G2lat.Pos2dsp(Parms,hkl[-2]),color=clr,dashes= (3,3),lw=1.5)3809 Plot.axvline(G2lat.Pos2dsp(Parms,hkl[-2]),color=clr,dashes=dash,lw=1.5) 3809 3810 else: 3810 Plot.axvline(hkl[-2],color=clr,dashes= (3,3),lw=1.5)3811 Plot.axvline(hkl[-2],color=clr,dashes=dash,lw=1.5) 3811 3812 for hkl in G2frame.Extinct: # plot extinct reflections 3812 3813 clr = 'b' … … 4314 4315 layr.lt_exec('set {} -w 1000'.format(pname)) 4315 4316 4316 import itertools # delay this since not commonly called or needed4317 #import itertools # delay this since not commonly called or needed 4317 4318 4318 4319 try: … … 4410 4411 valueList.append([l.get_text(),l.get_position()[0]]) 4411 4412 # invert lists into columns, use iterator for all values 4412 if hasattr(itertools,'zip_longest'): #Python 3+4413 invertIter = itertools.zip_longest(*valueList,fillvalue=' ')4414 else:4415 invertIter = itertools.izip_longest(*valueList,fillvalue=' ')4413 #if hasattr(itertools,'zip_longest'): #Python 3+ 4414 # invertIter = itertools.zip_longest(*valueList,fillvalue=' ') 4415 #else: 4416 # invertIter = itertools.izip_longest(*valueList,fillvalue=' ') 4416 4417 4417 4418 # Start Origin instance -
trunk/GSASIIpwdGUI.py
r5338 r5342 57 57 VERY_LIGHT_GREY = wx.Colour(235,235,235) 58 58 WACV = wx.ALIGN_CENTER_VERTICAL 59 if '2' in platform.python_version_tuple()[0]: 60 GkDelta = unichr(0x0394) 61 GkSigma = unichr(0x03a3) 62 GkTheta = unichr(0x03f4) 63 Gklambda = unichr(0x03bb) 64 Pwr10 = unichr(0x0b9)+unichr(0x2070) 65 Pwr20 = unichr(0x0b2)+unichr(0x2070) 66 Pwrm1 = unichr(0x207b)+unichr(0x0b9) 67 Pwrm2 = unichr(0x207b)+unichr(0x0b2) 68 Pwrm6 = unichr(0x207b)+unichr(0x2076) 69 Pwrm4 = unichr(0x207b)+unichr(0x2074) 70 Angstr = unichr(0x00c5) 71 superMinusOne = unichr(0xaf)+unichr(0xb9) 72 else: 73 GkDelta = chr(0x0394) 74 GkSigma = chr(0x03a3) 75 GkTheta = chr(0x03f4) 76 Gklambda = chr(0x03bb) 77 Pwr10 = chr(0x0b9)+chr(0x2070) 78 Pwr20 = chr(0x0b2)+chr(0x2070) 79 Pwrm1 = chr(0x207b)+chr(0x0b9) 80 Pwrm2 = chr(0x207b)+chr(0x0b2) 81 Pwrm6 = chr(0x207b)+chr(0x2076) 82 Pwrm4 = chr(0x207b)+chr(0x2074) 83 Angstr = chr(0x00c5) 84 superMinusOne = chr(0xaf)+chr(0xb9) 59 if '2' not in platform.python_version_tuple()[0]: 60 unichr = chr 61 GkDelta = unichr(0x0394) 62 GkSigma = unichr(0x03a3) 63 GkTheta = unichr(0x03f4) 64 Gklambda = unichr(0x03bb) 65 Pwr10 = unichr(0x0b9)+unichr(0x2070) 66 Pwr20 = unichr(0x0b2)+unichr(0x2070) 67 Pwrm1 = unichr(0x207b)+unichr(0x0b9) 68 Pwrm2 = unichr(0x207b)+unichr(0x0b2) 69 Pwrm6 = unichr(0x207b)+unichr(0x2076) 70 Pwrm4 = unichr(0x207b)+unichr(0x2074) 71 Angstr = unichr(0x00c5) 72 superMinusOne = unichr(0xaf)+unichr(0xb9) 73 notEq0 = unichr(0x2260)+'0' 85 74 # trig functions in degrees 86 75 sind = lambda x: math.sin(x*math.pi/180.) … … 3530 3519 vec = ssopt['ModVec'] 3531 3520 print(' Trying: %s %s modulation vector = %.3f %.3f %.3f'%(controls[13],ssopt['ssSymb'],vec[0],vec[1],vec[2])) 3532 OnHklShow( None)3521 OnHklShow() 3533 3522 wx.CallAfter(UpdateUnitCellsGrid,G2frame,data) 3534 3523 … … 3666 3655 #G2plt.PlotPatterns(G2frame,extraKeys=KeyList) 3667 3656 3668 def OnHklShow(event ):3657 def OnHklShow(event=None): 3669 3658 PatternId = G2frame.PatternId 3670 3659 peaks = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,PatternId, 'Index Peak List')) … … 3762 3751 G2frame.dataWindow.RunSubGroups.Enable(True) 3763 3752 G2frame.GPXtree.SetItemPyData(UnitCellsId,data) 3764 OnHklShow( None)3753 OnHklShow() 3765 3754 wx.CallAfter(UpdateUnitCellsGrid,G2frame,data) 3766 3755 … … 3839 3828 G2frame.GPXtree.SetItemPyData(UnitCellsId,data) 3840 3829 G2frame.dataWindow.RefineCell.Enable(True) 3841 OnHklShow( None)3830 OnHklShow() 3842 3831 wx.CallAfter(UpdateUnitCellsGrid,G2frame,data) 3843 3832 … … 3864 3853 # G2frame.dataWindow.RunSubGroups.Enable(True) 3865 3854 G2frame.dataWindow.RefineCell.Enable(True) 3866 OnHklShow( None)3855 OnHklShow() 3867 3856 wx.CallAfter(UpdateUnitCellsGrid,G2frame,data) 3868 3857 … … 4256 4245 del SGData['MagSpGrp'] 4257 4246 ssopt['SGData'] = SGData 4258 OnHklShow( None)4247 OnHklShow() 4259 4248 wx.CallAfter(UpdateUnitCellsGrid,G2frame,data) 4260 4249 … … 4271 4260 SGData['SpnFlp'] = SpnFlp 4272 4261 SGData['MagSpGrp'] = G2spc.MagSGSym(SGData) 4273 OnHklShow( None)4262 OnHklShow() 4274 4263 4275 4264 def OnBNSlatt(event): … … 4289 4278 OprNames,SpnFlp = G2spc.GenMagOps(SGData) 4290 4279 SGData['SpnFlp'] = SpnFlp 4291 OnHklShow( None)4280 OnHklShow() 4292 4281 4293 4282 def OnShowSpins(event): … … 4321 4310 finally: 4322 4311 dlg.Destroy() 4323 OnHklShow( None)4312 OnHklShow() 4324 4313 wx.CallAfter(UpdateUnitCellsGrid,G2frame,data) 4325 4314 … … 4346 4335 dlg.Destroy() 4347 4336 return 4348 import SUBGROUPS as kSUB4337 #import SUBGROUPS as kSUB 4349 4338 wx.BeginBusyCursor() 4350 4339 wx.MessageBox(''' For use of PSEUDOLATTICE, please cite: … … 4368 4357 4369 4358 def OnRunSubs(event): 4370 import SUBGROUPS as kSUB4359 #import SUBGROUPS as kSUB 4371 4360 G2frame.dataWindow.RunSubGroupsMag.Enable(False) 4372 4361 pUCid = G2gd.GetGPXtreeItemId(G2frame,G2frame.PatternId, 'Unit Cells List') … … 4468 4457 4469 4458 def OnRunSubsMag(event): 4470 import SUBGROUPS as kSUB4459 #import SUBGROUPS as kSUB 4471 4460 G2frame.dataWindow.RunSubGroups.Enable(False) 4472 4461 pUCid = G2gd.GetGPXtreeItemId(G2frame,G2frame.PatternId, 'Unit Cells List') … … 4714 4703 shiftSel.SetSelection(3) 4715 4704 littleSizer.Add(shiftSel) 4705 4706 littleSizer.Add(wx.StaticText(G2frame.dataWindow,label=' highlight ', 4707 style=wx.ALIGN_RIGHT),0,WACV) 4708 G2frame.PlotOpts['hklHighlight'] = G2frame.PlotOpts.get('hklHighlight',0) 4709 Sel = G2G.G2ChoiceButton(G2frame.dataWindow, 4710 [ 'None',] + [c+notEq0 for c in ('h','k','l')], 4711 indLoc=G2frame.PlotOpts,indKey='hklHighlight', 4712 onChoice=OnHklShow) 4713 littleSizer.Add(Sel,0,WACV) 4714 4716 4715 mainSizer.Add(littleSizer,0) 4717 4716 … … 4759 4758 zeroVar.Bind(wx.EVT_CHECKBOX,OnZeroVar) 4760 4759 littleSizer.Add(zeroVar,0,WACV) 4760 4761 4761 mainSizer.Add(littleSizer,0) 4762 4762 mainSizer.Add((5,5),0)
Note: See TracChangeset
for help on using the changeset viewer.