Changeset 5058
- Timestamp:
- Oct 29, 2021 4:20:04 PM (2 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIconstrGUI.py
r5057 r5058 3847 3847 ISO = data['ISODISTORT'] 3848 3848 mainSizer.Add(wx.StaticText(dlg,wx.ID_ANY, 3849 'ISODISTORT mode computation for co rdinates in phase '+str(data['General'].get('Name'))))3849 'ISODISTORT mode computation for coordinates in phase '+str(data['General'].get('Name')))) 3850 3850 aSizer = wx.BoxSizer(wx.HORIZONTAL) 3851 3851 panel1 = wxscroll.ScrolledPanel( -
trunk/GSASIImath.py
r5015 r5058 2069 2069 drawatom[dcx+3:dcx+6] = M 2070 2070 return drawAtoms,Fade 2071 2072 def ApplyModeDisp(data): 2073 ''' Applies ISODISTORT mode displacements to drawing atoms 2074 ''' 2075 return 2076 # generalData = data['General'] 2077 # cell = generalData['Cell'][1:7] 2078 # G,g = G2lat.cell2Gmat(cell) 2079 # SGData = generalData['SGData'] 2080 # cx,ct,cs,cia = getAtomPtrs(data) 2081 # drawingData = data['Drawing'] 2082 # dcx,dct,dcs,dci = getAtomPtrs(data,True) 2083 # atoms = data['Atoms'] 2084 # drawAtoms = drawingData['Atoms'] 2085 # for atom in atoms: 2086 # atxyz = np.array(atom[cx:cx+3]) 2087 # indx = FindAtomIndexByIDs(drawAtoms,dci,[atom[cia+8],],True) 2088 # for ind in indx: 2089 # drawatom = drawAtoms[ind] 2090 # opr = drawatom[dcs-1] 2091 # X = G2spc.ApplyStringOps(opr,SGData,atxyz+wave) 2092 # drawatom[dcx:dcx+3] = X 2093 2071 2094 2072 2095 # gauleg.py Gauss Legendre numerical quadrature, x and w computation -
trunk/GSASIIphsGUI.py
r5057 r5058 6651 6651 modeDisp[idsp] = (Obj.GetValue()-100)/1000. 6652 6652 dispVal.SetValue(modeDisp[idsp]) 6653 6654 6655 Indx = {} 6653 G2mth.ApplyModeDisp(data) 6654 G2plt.PlotStructure(G2frame,data) 6655 6656 def OnDispVal(invalid,value,tc): 6657 idsp,displ = Indx[tc.GetId()] 6658 displ.SetValue(int(value*1000)+100) 6659 G2mth.ApplyModeDisp(data) 6660 G2plt.PlotStructure(G2frame,data) 6661 6662 def OnReset(event): 6663 data['ISODISTORT']['modeDispl'] = np.zeros(len(data['ISODISTORT']['G2ModeList'])) 6664 G2mth.ApplyModeDisp(data) 6665 G2plt.PlotStructure(G2frame,data) 6666 UpdateISODISTORT() 6667 6668 Indx = {} 6656 6669 if 'radio' not in data['ISODISTORT']: 6657 6670 if not data['ISODISTORT']: … … 6660 6673 SetPhaseWindow(ISODIST,mainSizer,Scroll=Scroll) 6661 6674 return 6675 #patch 6676 if 'modeDispl' not in data['ISODISTORT']: 6677 data['ISODISTORT']['modeDispl'] = np.zeros(len(data['ISODISTORT']['G2ModeList'])) 6678 #end patch 6662 6679 mainSizer = wx.BoxSizer(wx.VERTICAL) 6663 6680 topSizer = wx.BoxSizer(wx.VERTICAL) … … 6670 6687 J. Appl. Cryst. 39, 607-614 (2006). 6671 6688 '''),0,WACV) 6672 topSizer.Add(wx.StaticText(ISODIST,label=' Adjust magnitude of distortion modes (-0.1 to +0.1):')) 6689 lineSizer = wx.BoxSizer(wx.HORIZONTAL) 6690 lineSizer.Add(wx.StaticText(ISODIST,label=' Adjust magnitude of distortion modes (-0.1 to +0.1): '),0,WACV) 6691 reset = wx.Button(ISODIST,label='Reset modes') 6692 reset.Bind(wx.EVT_BUTTON,OnReset) 6693 lineSizer.Add(reset,0,WACV) 6694 topSizer.Add(lineSizer,0,WACV) 6673 6695 slideSizer = wx.FlexGridSizer(0,3,0,0) 6674 6696 slideSizer.AddGrowableCol(2,1) 6675 modeDisp = np.zeros(len(data['ISODISTORT']['G2ModeList']))6697 modeDisp = data['ISODISTORT']['modeDispl'] 6676 6698 for idsp,item in enumerate(data['ISODISTORT']['G2ModeList']): 6677 6699 slideSizer.Add(wx.StaticText(ISODIST,label=item.name),0,WACV) 6678 dispVal = G2G.ValidatedTxtCtrl(ISODIST,modeDisp,idsp,xmin=-0.1,xmax=0.1,size=(50,20) )6700 dispVal = G2G.ValidatedTxtCtrl(ISODIST,modeDisp,idsp,xmin=-0.1,xmax=0.1,size=(50,20),OnLeave=OnDispVal) 6679 6701 slideSizer.Add(dispVal,0,WACV) 6680 6702 displ = wx.Slider(ISODIST,style=wx.SL_HORIZONTAL,value=int(modeDisp[idsp]*1000)+100) … … 6682 6704 displ.Bind(wx.EVT_SLIDER, OnDispl) 6683 6705 Indx[displ.GetId()] = [idsp,dispVal] 6706 Indx[dispVal.GetId()] = [idsp,displ] 6684 6707 slideSizer.Add(displ,1,wx.EXPAND|wx.RIGHT) 6708 slideSizer.SetMinSize(wx.Size(350,10)) 6685 6709 topSizer.Add(slideSizer) 6686 6710 mainSizer.Add(topSizer) -
trunk/GSASIIpwd.py
r5054 r5058 3442 3442 return np.array(bondAngles) 3443 3443 3444 3444 3445 #### Reflectometry calculations ################################################################################ 3445 3446 def REFDRefine(Profile,ProfDict,Inst,Limits,Substances,data): -
trunk/imports/G2phase_CIF.py
r5057 r5058 785 785 # create the constraints 786 786 modeVarList = [] 787 modeDispl = [] 787 788 for i,row in enumerate(displacivemodeInvmatrix): 788 789 constraint = [] … … 795 796 constraint += [modeVar,False,'f'] 796 797 self.Constraints.append(constraint) 798 modeDispl.append(0.0) 797 799 # normilization constants 798 800 normlist = [] … … 820 822 'Var2ModeMatrix' : displacivemodeInvmatrix, 821 823 'Mode2VarMatrix' : displacivemodematrix, 824 'modeDispl' : modeDispl 822 825 }) 823 826 # make explaination dictionary
Note: See TracChangeset
for help on using the changeset viewer.