Changeset 1232
- Timestamp:
- Feb 26, 2014 12:41:28 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASII.py
r1224 r1232 2051 2051 Data['fullIntegrate'] = False 2052 2052 Data['setRings'] = False 2053 Data['background image'] = ['',1.0] 2053 Data['background image'] = ['',-1.0] 2054 Data['dark image'] = ['',-1.0] 2054 2055 Data['setDefault'] = False 2055 2056 Data['range'] = [(Imin,Imax),[Imin,Imax]] -
trunk/GSASIIgrid.py
r1221 r1232 135 135 136 136 [ wxID_MODELCOPY,wxID_MODELFIT,wxID_ELEMENTADD,wxID_ELEMENTDELETE,wxID_ADDSUBSTANCE, 137 wxID_LOADSUBSTANCE,wxID_DELETESUBSTANCE, 138 ] = [wx.NewId() for item in range( 7)]137 wxID_LOADSUBSTANCE,wxID_DELETESUBSTANCE,wxID_COPYSUBSTANCE, 138 ] = [wx.NewId() for item in range(8)] 139 139 140 140 [ wxID_SELECTPHASE, … … 2550 2550 self.SubstanceEdit.Append(id=wxID_ADDSUBSTANCE, kind=wx.ITEM_NORMAL,text='Add substance', 2551 2551 help='Add new substance to list') 2552 self.SubstanceEdit.Append(id=wxID_COPYSUBSTANCE, kind=wx.ITEM_NORMAL,text='Copy substances', 2553 help='Copy substances') 2552 2554 self.SubstanceEdit.Append(id=wxID_DELETESUBSTANCE, kind=wx.ITEM_NORMAL,text='Delete substance', 2553 2555 help='Delete substance from list') -
trunk/GSASIIimage.py
r1229 r1232 883 883 H0 /= G2pwd.Oblique(data['Oblique'][0],H2[:-1]) 884 884 if 'SASD' in data['type'] and data['PolaVal'][1]: 885 H0 /= np.array([G2pwd.Polarization(data['PolaVal'][0],H2[:-1],Azm=azm)[0] for azm in (H1[:-1]+np.diff(H1)/2.)]) 885 #NB: in G2pwd.Polarization azm is defined from plane of polarization, not image x axis! 886 H0 /= np.array([G2pwd.Polarization(data['PolaVal'][0],H2[:-1],Azm=azm-90.)[0] for azm in (H1[:-1]+np.diff(H1)/2.)]) 886 887 Nup += 1 887 888 if dlg: -
trunk/GSASIIplot.py
r1231 r1232 857 857 elif 'SASD' in plottype: 858 858 D = xye[4]-Ymax*G2frame.delOffset 859 Plot.set_yscale("log",nonposy='mask') 860 Plot.set_ylim(bottom=np.min(np.trim_zeros(Y))/2.,top=np.max(Y)*2.) 859 861 if G2frame.logPlot: 860 862 if 'PWDR' in plottype: … … 889 891 if G2frame.logPlot: 890 892 Plot.set_yscale("log",nonposy='mask') 891 Plot.set_ylim(bottom=np.min(np.trim_zeros(Y))/2. )893 Plot.set_ylim(bottom=np.min(np.trim_zeros(Y))/2.,top=np.max(Y)*2.) 892 894 if 'PWDR' in plottype: 893 895 Plot.plot(X,W,colors[(N+2)%6],picker=False) … … 922 924 elif 'SASD' in plottype: 923 925 Plot.semilogy(X,Y,colors[N%6],picker=False,nonposy='mask') 924 Plot.set_ylim(bottom=np.min(np.trim_zeros(Y))/2. )926 Plot.set_ylim(bottom=np.min(np.trim_zeros(Y))/2.,top=np.max(Y)*2.) 925 927 if G2frame.logPlot: 926 Plot.set_ylim(bottom=np.min(np.trim_zeros(Y))/2. )928 Plot.set_ylim(bottom=np.min(np.trim_zeros(Y))/2.,top=np.max(Y)*2.) 927 929 if PickId and not G2frame.Contour: 928 930 Parms,Parms2 = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,PatternId, 'Instrument Parameters')) … … 2308 2310 G2frame.MaskKey = event.key 2309 2311 OnStartMask(G2frame) 2312 PlotImage(G2frame,newPlot=False) 2310 2313 2311 2314 elif PickName == 'Stress/Strain': … … 2313 2316 G2frame.StrainKey = event.key 2314 2317 OnStartNewDzero(G2frame) 2318 PlotImage(G2frame,newPlot=False) 2315 2319 2316 2320 elif PickName == 'Image Controls': … … 2327 2331 Data['center'] = [Xpos,Ypos] 2328 2332 G2imG.UpdateImageControls(G2frame,Data,Masks) 2333 PlotImage(G2frame,newPlot=False) 2329 2334 finally: 2330 2335 dlg.Destroy() 2336 return 2331 2337 elif event.key == 'l': 2332 2338 G2frame.logPlot = not G2frame.logPlot … … 2335 2341 elif event.key in ['y',]: 2336 2342 Data['invert_y'] = not Data['invert_y'] 2337 PlotImage(G2frame,newPlot=False)2343 PlotImage(G2frame,newPlot=True) 2338 2344 2339 2345 def OnKeyBox(event): -
trunk/GSASIIpwdGUI.py
r1231 r1232 2185 2185 2186 2186 UpdateSubstanceGrid(G2frame,data) 2187 2188 def OnCopySubstance(event): 2189 histList = ['All',]+G2gd.GetPatternTreeDataNames(G2frame,['SASD',]) 2190 copyList = [] 2191 dlg = wx.MultiChoiceDialog(G2frame, 2192 'Copy substances to which histograms?', 'Copy substances', 2193 histList, wx.CHOICEDLG_STYLE) 2194 try: 2195 if dlg.ShowModal() == wx.ID_OK: 2196 result = dlg.GetSelections() 2197 for i in result: 2198 copyList.append(histList[i]) 2199 if 'All' in copyList: 2200 copyList = histList[1:] 2201 for item in copyList: 2202 Id = G2gd.GetPatternTreeItemId(G2frame,G2frame.root,item) 2203 G2frame.PatternTree.SetItemPyData(G2gd.GetPatternTreeItemId(G2frame,Id,'Substances'), 2204 copy.copy(data)) 2205 finally: 2206 dlg.Destroy() 2187 2207 2188 2208 def OnAddSubstance(event): … … 2383 2403 G2frame.dataFrame.SetLabel('Substances') 2384 2404 G2frame.dataFrame.Bind(wx.EVT_MENU, OnLoadSubstance, id=G2gd.wxID_LOADSUBSTANCE) 2385 G2frame.dataFrame.Bind(wx.EVT_MENU, OnAddSubstance, id=G2gd.wxID_ADDSUBSTANCE) 2405 G2frame.dataFrame.Bind(wx.EVT_MENU, OnAddSubstance, id=G2gd.wxID_ADDSUBSTANCE) 2406 G2frame.dataFrame.Bind(wx.EVT_MENU, OnCopySubstance, id=G2gd.wxID_COPYSUBSTANCE) 2386 2407 G2frame.dataFrame.Bind(wx.EVT_MENU, OnDeleteSubstance, id=G2gd.wxID_DELETESUBSTANCE) 2387 2408 G2frame.dataFrame.Bind(wx.EVT_MENU, OnAddElement, id=G2gd.wxID_ELEMENTADD) … … 2422 2443 G2frame.dataFrame.Bind(wx.EVT_MENU, OnFitModel, id=G2gd.wxID_MODELFIT) 2423 2444 mainSizer = wx.BoxSizer(wx.VERTICAL) 2445 print data 2424 2446 2425 2447 mainSizer.Layout()
Note: See TracChangeset
for help on using the changeset viewer.