Changeset 1252 for trunk/GSASIIpwdGUI.py
- Timestamp:
- Mar 18, 2014 1:45:39 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIpwdGUI.py
r1250 r1252 86 86 'logBins':True,'Method':'MaxEnt','Distribution':[], 87 87 'Shape':['Spheroid',1.0],'MaxEnt':{'Niter':100,'Precision':0.01,'Sky':-3}, 88 'IPG':{'Niter':100,'Approach':0.8 },'Reg':{},},88 'IPG':{'Niter':100,'Approach':0.8,'Power':-1},'Reg':{},}, 89 89 'Unified':{'Levels':[],}, 90 90 'Particle':{'Levels':[],}, … … 2475 2475 if isinstance(data['Size']['MaxEnt']['Sky'],float): 2476 2476 data['Size']['MaxEnt']['Sky'] = -3 2477 if 'Power' not in data['Size']['IPG']: 2478 data['Size']['IPG']['Power'] = -1 2477 2479 #end patches 2478 2480 … … 2483 2485 def OnFitModel(event): 2484 2486 print 'fit model for '+data['Current'] 2487 if not any(Sample['Contrast']): 2488 G2frame.ErrorDialog('No contrast; your sample is a vacuum!', 2489 'You need to define a scattering substance!\n'+ \ 2490 ' Do Substances and then Sample parameters') 2491 return 2485 2492 if data['Current'] == 'Size dist.': 2486 2493 G2sasd.SizeDistribution(Profile,ProfDict,Limits,Substances,Sample,data) … … 2501 2508 Obj.SetValue(fmt%(value)) 2502 2509 data[itemKey][ind] = value 2510 if itemKey == 'Back': 2511 Profile[4][:] = value 2512 G2plt.PlotPatterns(G2frame,plotType='SASD',newPlot=True) 2503 2513 2504 2514 def OnCheckBox(event): … … 2587 2597 sizeSizer.Add((5,5),0) 2588 2598 fitSizer = wx.BoxSizer(wx.HORIZONTAL) 2589 methods = ['MaxEnt', 'IPG',]2599 methods = ['MaxEnt',] #'IPG',] 2590 2600 fitSizer.Add(wx.StaticText(G2frame.dataDisplay,label='Fitting method: '),0,WACV) 2591 2601 method = wx.ComboBox(G2frame.dataDisplay,value=data['Size']['Method'],choices=methods, … … 2609 2619 floor.Bind(wx.EVT_COMBOBOX,OnIntVal) 2610 2620 fitSizer.Add(floor,0,WACV) 2621 elif 'IPG' in data['Size']['Method']: 2622 fitSizer.Add(wx.StaticText(G2frame.dataDisplay,label=' Q power weight (-1 for sigma): '),0,WACV) 2623 choices = ['-1','0','1','2','3','4'] 2624 power = wx.ComboBox(G2frame.dataDisplay,value=str(data['Size']['IPG']['Power']),choices=choices, 2625 style=wx.CB_READONLY|wx.CB_DROPDOWN) 2626 Indx[power.GetId()] = [data['Size']['IPG'],'Power',-2] 2627 power.Bind(wx.EVT_COMBOBOX,OnIntVal) 2628 fitSizer.Add(power,0,WACV) 2611 2629 sizeSizer.Add(fitSizer,0) 2612 2630 … … 2668 2686 G2gd.HorizontalLine(mainSizer,G2frame.dataDisplay) 2669 2687 if 'Size' in data['Current']: 2688 if 'MaxEnt' in data['Size']['Method']: 2689 Status.SetStatusText('Size distribution by Maximum entropy') 2690 elif 'IPG' in data['Size']['Method']: 2691 Status.SetStatusText('Size distribution by Interior-Point Gradient') 2670 2692 mainSizer.Add(SizeSizer()) 2671 2693 elif 'Particle' in data['Current']: … … 2681 2703 backVal.Bind(wx.EVT_KILL_FOCUS,OnValueChange) 2682 2704 backSizer.Add(backVal,0,WACV) 2683 backVar = wx.CheckBox(G2frame.dataDisplay,label=' Apply?')2705 backVar = wx.CheckBox(G2frame.dataDisplay,label='Refine?') 2684 2706 Indx[backVar.GetId()] = [data['Back'],1] 2685 2707 backVar.SetValue(data['Back'][1])
Note: See TracChangeset
for help on using the changeset viewer.