Changeset 5482
- Timestamp:
- Jan 27, 2023 5:45:24 PM (10 months ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIctrlGUI.py
r5480 r5482 8904 8904 colorButton.Bind(wcs.EVT_COLOURSELECT, OnColor) 8905 8905 return colorButton 8906 8906 8907 def NISTlatUse(msgonly=False): 8908 msg = '''Performing cell symmetry search using NIST*LATTICE. Please cite: 8909 V. L. Karen and A. D. Mighell, NIST Technical Note 1290 (1991), 8910 https://nvlpubs.nist.gov/nistpubs/Legacy/TN/nbstechnicalnote1290.pdf 8911 and 8912 V. L. Karen & A. D. Mighell, U.S. Patent 5,235,523, 8913 https://patents.google.com/patent/US5235523A/en?oq=5235523''' 8914 print(msg) 8915 if msgonly: return msg 8916 wx.MessageBox(msg,caption='Using NIST*LATTICE',style=wx.ICON_INFORMATION) 8917 8907 8918 if __name__ == '__main__': 8908 8919 app = wx.App() -
trunk/GSASIIdataGUI.py
r5479 r5482 6597 6597 self.IndexPeaks = self.IndexEdit.Append(G2G.wxID_INDEXPEAKS,'Index Cell', 6598 6598 'Find cells that index fitted peaks') 6599 self.IndexEdit.Append(G2G.wxID_LATSYM,'Cell Symmetry Search ',6599 self.IndexEdit.Append(G2G.wxID_LATSYM,'Cell Symmetry Search-Bilbao', 6600 6600 'Run Bilboa "Lattice Symmetry" to find higher symmetry cells') 6601 G2G.Define_wxId('wxID_NISTLATSYM') 6602 self.IndexEdit.Append(G2G.wxID_NISTLATSYM,'Cell Symmetry Search-NIST*LATTICE', 6603 'Run NIST*LATTICE to find higher symmetry cells') 6601 6604 self.RunSubGroups = self.IndexEdit.Append(G2G.wxID_RUNSUB,'Run SUBGROUPS', 6602 6605 'If disabled, do Load Phase first') -
trunk/GSASIIphsGUI.py
r5478 r5482 343 343 self.kvec = [0.,0.,0.] 344 344 self.Draw() 345 self.CenterOnParent() 345 346 346 347 def Draw(self): -
trunk/GSASIIpwdGUI.py
r5473 r5482 4378 4378 wx.EndBusyCursor() 4379 4379 if not page: return 4380 # while cells: cells.pop() # cells.clear() is much cleaner but not Py2 4380 cells.clear() 4381 4381 for i,(cell,mat) in enumerate(kSUB.parseBilbaoCheckLattice(page)): 4382 4382 cells.append([]) 4383 4383 cells[-1] += [mat,0,16] 4384 4384 cells[-1] += cell 4385 cells[-1] += [G2lat.calc_V(G2lat.cell2A(cell)),False,False] 4385 cells[-1] += [G2lat.calc_V(G2lat.cell2A(cell)),False,False] 4386 G2frame.GPXtree.SetItemPyData(pUCid,data) 4387 G2frame.OnFileSave(event) 4388 wx.CallAfter(UpdateUnitCellsGrid,G2frame,data) 4389 4390 def OnNISTLatSym(event): 4391 'Run NIST*LATTICE cell search' 4392 pUCid = G2gd.GetGPXtreeItemId(G2frame,G2frame.PatternId, 'Unit Cells List') 4393 controls,bravais,cells,dminx,ssopt,magcells = G2frame.GPXtree.GetItemPyData(pUCid) 4394 nistInput=[0.2,1.,2,3] 4395 msg = G2G.NISTlatUse(True) 4396 dlg = wx.Dialog(G2frame,style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER) 4397 sizer = wx.BoxSizer(wx.VERTICAL) 4398 sizer.Add(wx.StaticText(dlg,label='NIST*LATTICE Cell Symmetry Search Settings'), 4399 0,wx.ALIGN_CENTER_HORIZONTAL,0) 4400 sizer.Add((-1,15)) 4401 sizer.Add(wx.StaticText(dlg,label=msg)) 4402 sizer.Add((-1,15)) 4403 tableSizer = wx.FlexGridSizer(0,2,0,0) 4404 tableSizer.Add(wx.StaticText(dlg,label='Cell length tolerance (A) '), 4405 0,WACV|wx.ALIGN_LEFT) 4406 w = G2G.ValidatedTxtCtrl(dlg,nistInput,0,nDig=(6,2)) 4407 tableSizer.Add(w) 4408 tableSizer.Add(wx.StaticText(dlg,label='Cell angle tolerance (deg) '), 4409 0,WACV|wx.ALIGN_LEFT) 4410 w = G2G.ValidatedTxtCtrl(dlg,nistInput,1,nDig=(6,1)) 4411 tableSizer.Add(w) 4412 tableSizer.Add(wx.StaticText(dlg,label='Cell volume range (ratio) '), 4413 0,WACV|wx.ALIGN_LEFT) 4414 w = G2G.ValidatedTxtCtrl(dlg,nistInput,2) 4415 tableSizer.Add(w) 4416 tableSizer.Add(wx.StaticText(dlg,label='Search mode: Generate '), 4417 0,WACV|wx.ALIGN_LEFT) 4418 tableSizer.Add(G2G.EnumSelector(dlg,nistInput,3, 4419 ['supercells', 'subcells', 'sub- and supercells'], 4420 [1,2,3])) 4421 sizer.Add(tableSizer,1,wx.EXPAND) 4422 btnsizer = wx.StdDialogButtonSizer() 4423 btn = wx.Button(dlg, wx.ID_OK) 4424 btn.SetDefault() 4425 btn.Bind(wx.EVT_BUTTON, lambda x: dlg.EndModal(wx.ID_OK)) 4426 btnsizer.AddButton(btn) 4427 btn = wx.Button(dlg, wx.ID_CANCEL) 4428 btn.Bind(wx.EVT_BUTTON, lambda x: dlg.EndModal(wx.ID_CANCEL)) 4429 btnsizer.AddButton(btn) 4430 btnsizer.Realize() 4431 sizer.Add(btnsizer, 0, wx.EXPAND|wx.ALL, 5) 4432 dlg.SetSizer(sizer) 4433 sizer.Fit(dlg) 4434 dlg.CenterOnParent() 4435 if dlg.ShowModal() == wx.ID_OK: 4436 dlg.Destroy() 4437 else: 4438 dlg.Destroy() 4439 return 4440 tol = 3*[nistInput[0]]+3*[nistInput[1]] 4441 cell = controls[6:12] 4442 center = controls[13].strip()[0] 4443 delta = nistInput[2] 4444 mode = nistInput[3] 4445 wx.BeginBusyCursor() 4446 import nistlat 4447 out = nistlat.CellSymSearch(cell, center, tolerance=tol, mode=mode, 4448 deltaV=delta) 4449 wx.EndBusyCursor() 4450 4451 if not out: return 4452 cells.clear() 4453 for o in out: 4454 cells.append([]) 4455 c = o[2][0] 4456 # assign a Laue class 4457 laue = 16 # P1 4458 if c[0] == c[1] == c[2] and c[3] == c[4] == c[5] == 90: 4459 if o[2][1] == 'F': 4460 laue = 0 # Fm3m 4461 elif o[2][1] == 'I': 4462 laue = 1 # Im3m 4463 else: 4464 laue = 2 # Pm3m 4465 elif o[2][1] == 'R': 4466 laue = 3 # R3 4467 elif c[0] == c[1] and c[5] == 120: 4468 laue = 4 # P6/mmm 4469 elif c[0] == c[1] and c[3] == c[4] == c[5] == 90 and o[2][1] == 'I': 4470 laue = 5 # I4/mmm 4471 elif c[0] == c[1] and c[3] == c[4] == c[5] == 90 and o[2][1] == 'P': 4472 laue = 6 # P4/mmm 4473 elif c[3] == c[4] == c[5] == 90 and o[2][1] == 'F': 4474 laue = 7 # 'Fmmm' 4475 elif c[3] == c[4] == c[5] == 90 and o[2][1] == 'I': 4476 laue = 8 # 'Immm' 4477 elif c[3] == c[4] == c[5] == 90 and o[2][1] == 'A': 4478 laue = 9 # 'Ammm' 4479 elif c[3] == c[4] == c[5] == 90 and o[2][1] == 'B': 4480 laue = 10 # 'Bmmm' 4481 elif c[3] == c[4] == c[5] == 90 and o[2][1] == 'C': 4482 laue = 11 # 'Cmmm' 4483 elif c[3] == c[4] == c[5] == 90 and o[2][1] == 'P': 4484 laue = 12 # 'Pmmm' 4485 elif c[3] == c[5] == 90 and o[2][1] == 'C': 4486 laue = 13 # 'C2/m' 4487 elif c[3] == c[5] == 90 and o[2][1] == 'P': 4488 laue = 14 # 'P2/m' 4489 elif o[2][1] == 'C': 4490 laue = 15 # 'C1' 4491 cells[-1] += [o[4],0,laue] 4492 cells[-1] += c 4493 cells[-1] += [G2lat.calc_V(G2lat.cell2A(c)),False,False] 4386 4494 G2frame.GPXtree.SetItemPyData(pUCid,data) 4387 4495 G2frame.OnFileSave(event) … … 4405 4513 formats=[['choice','choice','choice'],['choice','choice','choice'],['choice','choice','choice'],'bool','choice', 4406 4514 'bool','%d',]) 4515 dlg.CenterOnParent() 4407 4516 if dlg.ShowModal() == wx.ID_OK: 4408 4517 magcells = [] … … 4627 4736 G2frame.Bind(wx.EVT_MENU, OnRunSubsMag, id=G2G.wxID_RUNSUBMAG) 4628 4737 G2frame.Bind(wx.EVT_MENU, OnLatSym, id=G2G.wxID_LATSYM) 4738 G2frame.Bind(wx.EVT_MENU, OnNISTLatSym, id=G2G.wxID_NISTLATSYM) 4629 4739 G2frame.Bind(wx.EVT_MENU, CopyUnitCell, id=G2G.wxID_COPYCELL) 4630 4740 G2frame.Bind(wx.EVT_MENU, LoadUnitCell, id=G2G.wxID_LOADCELL) -
trunk/GSASIIseqGUI.py
r5479 r5482 1215 1215 posdict = {} # defines position for each entry in table; for inner 1216 1216 # dict key is column number & value is parameter name 1217 histNumList = [] 1217 1218 for i,name in enumerate(histNames): 1219 if name in Histograms: 1220 histNumList.append(list(Histograms.keys()).index(name)) 1218 1221 # if prevVaryList != data[name]['varyList']: # this refinement has a different refinement list from previous 1219 1222 # prevVaryList = data[name]['varyList'] 1220 1221 1222 1223 1224 1225 1226 1223 posdict[name] = {} 1224 for var in data[name]['varyList']: 1225 svar = striphist(var,'*') 1226 if 'PWL' in svar: 1227 if int(svar.split(':')[-1]) > maxPWL: 1228 continue 1229 posdict[name][combinedVaryList.index(svar)] = svar 1227 1230 ####-- build up the data table by columns ----------------------------------------------- 1228 1231 nRows = len(histNames) 1229 G2frame.colList = [list(range(nRows))] 1232 if len(histNumList) != nRows: 1233 G2frame.colList = [list(range(nRows))] 1234 else: 1235 G2frame.colList = [histNumList] 1230 1236 if len(data.get('Use',[])) != nRows: 1231 1237 data['Use'] = nRows*[True] … … 1565 1571 if histNames[0][:4] not in ['SASD','IMG ','REFD',] and deltaChiCol is not None: 1566 1572 for row,name in enumerate(histNames): 1573 if name not in Controls['Seq Data']: 1574 G2frame.dataDisplay.SetCellTextColour(row,0,wx.Colour(255,0,0)) 1567 1575 deltaChi = G2frame.SeqTable.GetValue(row,deltaChiCol) 1568 1576 try: -
trunk/exports/G2export_CIF.py
r5479 r5482 4734 4734 dlg.Destroy() 4735 4735 if result != wx.ID_YES: return 4736 # import imp4737 # print('reloading ',G2G)4738 # imp.reload(G2G)4739 4736 Trans = np.eye(3) 4740 4737 if 'MagXform' not in self.Phases[MagPhase]: … … 4746 4743 cell2 = self.Phases[ChemPhase]['General']['Cell'][1:7] 4747 4744 cntr2 = self.Phases[ChemPhase]['General']['SGData']['SpGrp'].strip()[0] 4745 G2G.NISTlatUse() 4748 4746 out = nistlat.CompareCell(cell1, cntr1, cell2, cntr2) 4749 4747 #, tolerance=3*[0.2]+3*[1], mode='I', vrange=8, output=None) -
trunk/help/gsasII.html
r5481 r5482 7889 7889 body can be refined.</p> 7890 7890 7891 <h4><a name=Sequential></a><span style='mso-fareast-font-family:"Times New Roman"'>Sequential 7892 refinement results</span></h4> 7893 7894 <p class=MsoNormal>This tree entry is available after a sequential refinement 7895 has been run. (See the <a href="#Controls">Controls tree item</a> to set the 7896 histograms to be used in a sequential refinement and use the 7897 Calculate/Sequential refine menu command to run the refinement.) A number of 7898 other fitting processes within GSAS-II can be done sequentially, each will have 7899 its own differently named set of sequential results When any one is selected, 7900 the window tabulates the sequential refinement results. The columns are the 7891 <h4><a name=Sequential></a><span style='mso-fareast-font-family:"Times 7892 New Roman"'> 7893 Sequential Refinement Results</span></h4> 7894 7895 <p class=MsoNormal>This tree entry becomes available after a 7896 sequential fit has been run. Note there are the following types 7897 of sequential fits: 7898 <OL> 7899 <LI> Rietveld: Sequential results 7900 <LI> PDF: Sequential PDFfit2 results 7901 <LI> Peak fit: Sequential peak fit results 7902 <LI> Small angle: Sequential SASD fit results 7903 <LI> Reflectometry: Sequential REFD results 7904 <LI> Image (strain): Sequential strain fit results 7905 <LI> Image (calibration): Sequential image calibration results 7906 </OL> 7907 Each sequential fitting process within GSAS-II will have 7908 its own differently named set of sequential results, as listed above. 7909 When any of these tree items is selected, 7910 the window tabulates the sequential fit results. The columns are the 7901 7911 parameter names; the naming convention is generally ‘p:h:name:n’ where ‘p’ is 7902 7912 the phase number,’ h’ is the histogram number, ‘name’ is the parameter name, 7903 7913 and ‘n’ (if needed) is the item number (e.g. atom number). The rows are the 7904 7914 data sets used in the sequential refinement.</p> 7915 7916 For a sequential Rietveld refinement, set 7917 the PWDR histograms to be used in the sequential refinement in the 7918 <a href="#Controls">Controls tree item</a>. Note that the 7919 Calculate/Refine menu command will be renamed as "Sequential Refine." 7920 Since not all histograms need be used in a sequential Rietveld 7921 fit, after a sequential fit, histograms that have been fit will be 7922 included in the table. Previously fit histograms will not be removed 7923 unless the table is cleared (in the <a href="#Controls">Controls tree 7924 item</a>). In this way, a large sequential fit may be worked on in 7925 sections. 7926 The first column of the table will list the histogram number and the 7927 number will be shown in red if it was not fit in the last sequential refinement. 7905 7928 7906 7929 <h5><span style='mso-fareast-font-family:"Times New Roman"'>What can I do here?<o:p></o:p></span></h5> … … 11801 11824 </span></div> 11802 11825 11803 <p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><!-- hhmts start -->Last modified: Wed Jan 25 20:20:57CST 2023 <!-- hhmts end -->11826 <p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'><!-- hhmts start -->Last modified: Fri Jan 27 18:42:33 CST 2023 <!-- hhmts end --> 11804 11827 </body> 11805 11828 -
trunk/nistlat.py
r5479 r5482 25 25 https://patents.google.com/patent/US5235523A/en?oq=5235523 if this module 26 26 is used. 27 28 This will be deployed in GSAS-II after a release of updated binary images.29 27 30 28 '''
Note: See TracChangeset
for help on using the changeset viewer.