- Timestamp:
- Jan 26, 2021 12:48:52 PM (2 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIctrlGUI.py
r4764 r4783 2752 2752 :param wx.Frame parent: name of parent frame 2753 2753 :param str title: title string for dialog 2754 :param str prompts: strings to tell usewhat they are inputting2755 :param str values:default input values, if any2754 :param list prompts: list of strings to tell user what they are inputting 2755 :param list values: list of str default input values, if any 2756 2756 :param int size: length of the input box in pixels 2757 2757 :param bool addRows: if True, users can add rows to the table … … 2759 2759 :param str hlp: if supplied, a help button is added to the dialog that 2760 2760 can be used to display the supplied help text in this variable. 2761 :param str lbl: label placed at top of dialog 2762 :returns: a wx.Dialog instance 2761 2763 ''' 2762 2764 def __init__(self,parent,title,prompts,values=[],size=-1, 2763 addRows=False,hlp=None ):2765 addRows=False,hlp=None, lbl=None): 2764 2766 wx.Dialog.__init__(self,parent,wx.ID_ANY,title, 2765 2767 pos=wx.DefaultPosition, … … 2769 2771 self.addRows = addRows 2770 2772 self.size = size 2771 self.hlp = hlp 2773 self.hlp = StripIndents(hlp,True) 2774 self.lbl = lbl 2772 2775 self.CenterOnParent() 2773 2776 self.Paint() … … 2779 2782 if self.hlp: 2780 2783 btnsizer = wx.BoxSizer(wx.HORIZONTAL) 2781 hlp = HelpButton(self, self.hlp)2784 hlp = HelpButton(self, self.hlp, wrap=450) 2782 2785 btnsizer.Add((-1,-1),1, wx.EXPAND, 1) 2783 2786 btnsizer.Add(hlp,0,wx.ALIGN_RIGHT|wx.ALL) 2784 2787 mainSizer.Add(btnsizer,0,wx.EXPAND) 2788 if self.lbl: 2789 mainSizer.Add(wx.StaticText(self,wx.ID_ANY,self.lbl),0,WACV,0) 2790 mainSizer.Add((-1,15)) 2785 2791 promptSizer = wx.FlexGridSizer(0,2,5,5) 2786 2792 promptSizer.AddGrowableCol(1,1) … … 2822 2828 def Show(self): 2823 2829 '''Use this method after creating the dialog to post it 2830 2824 2831 :returns: True if the user pressed OK; False if the User pressed Cancel 2825 2832 ''' … … 2830 2837 2831 2838 def GetValues(self): 2832 '''Use this method to get the value entered by the user 2833 :returns: string entered by user 2839 '''Use this method to get the value(s) entered by the user 2840 2841 :returns: a list of strings entered by user 2834 2842 ''' 2835 2843 return self.values -
trunk/GSASIIddataGUI.py
r4764 r4783 979 979 textJ = G2lat.textureIndex(POData[5]) 980 980 poSizer.Add(wx.StaticText(DData,wx.ID_ANY,' Spherical harmonic coefficients: '+'Texture index: %.3f'%(textJ)) 981 ,0, WACV|wx.TOP|wx.BOTTOM,5)981 ,0,wx.TOP|wx.BOTTOM,5) 982 982 poSizer.Add(SHDataSizer(POData),0,wx.TOP|wx.BOTTOM,5) 983 983 poSizer.Add(SHPenalty(POData),0,wx.TOP|wx.BOTTOM,5) -
trunk/GSASIIphsGUI.py
r4763 r4783 9398 9398 mainSizer.Add((0,5),0) 9399 9399 if textureData['SHShow']: 9400 mainSizer.Add(wx.StaticText(Texture,-1,' Spherical harmonic coefficients: ') ,0,WACV)9400 mainSizer.Add(wx.StaticText(Texture,-1,' Spherical harmonic coefficients: ')) 9401 9401 mainSizer.Add((0,5),0) 9402 9402 ODFSizer = wx.FlexGridSizer(0,8,2,2) … … 9407 9407 ODFval = G2G.ValidatedTxtCtrl(Texture,textureData['SH Coeff'][1],item,nDig=(8,3),OnLeave=OnODFValue) 9408 9408 ODFSizer.Add(ODFval,0,WACV) 9409 mainSizer.Add(ODFSizer,0 ,WACV)9409 mainSizer.Add(ODFSizer,0) 9410 9410 mainSizer.Add((0,5),0) 9411 9411 mainSizer.Add((0,5),0) -
trunk/GSASIIscriptable.py
r4782 r4783 168 168 :meth:`G2PwdrData.add_peak` Adds a peak to the peak list. Also see :ref:`PeakRefine`. 169 169 :meth:`G2PwdrData.set_peakFlags` Sets refinement flags for peaks 170 :meth:`G2PwdrData.refine_peaks` Starts a peak/background fitting cycle 170 :meth:`G2PwdrData.refine_peaks` Starts a peak/background fitting cycle, returns refinement results 171 171 :attr:`G2PwdrData.Peaks` Provides access to the peak list data structure 172 172 :attr:`G2PwdrData.PeakList` Provides the peak list parameter values … … 810 810 hist.refine_peaks() 811 811 hist.set_peakFlags(area=True, pos=True, sig=True, gam=True) 812 hist.refine_peaks()812 res = hist.refine_peaks() 813 813 print('peak positions: ',[i[0] for i in hist.PeakList]) 814 814 for i in range(len(hist.Peaks['peaks'])): … … 4244 4244 def refine_peaks(self): 4245 4245 '''Causes a refinement of peak position, background and instrument parameters 4246 4247 :returns: a list of dicts with refinement results. Element 0 has uncertainties 4248 on refined values (also placed in self.data['Peak List']['sigDict']) 4249 element 1 has the peak fit result, element 2 has the peak fit uncertainties 4250 and element 3 has r-factors from the fit. 4251 (These are generated in :meth:`GSASIIpwd.DoPeakFit`). 4246 4252 ''' 4247 4253 import GSASIIpwd as G2pwd … … 4255 4261 limits = self.data['Limits'][1] 4256 4262 bxye = np.zeros(len(self.data['data'][1][1])) 4257 peaks['sigDict']= G2pwd.DoPeakFit('LSQ',peaks['peaks'],background,limits,4263 result = G2pwd.DoPeakFit('LSQ',peaks['peaks'],background,limits, 4258 4264 Parms,Parms2,self.data['data'][1],bxye,[], 4259 oneCycle=False,controls=controls,dlg=None)[0] 4260 4265 oneCycle=False,controls=controls,dlg=None) 4266 peaks['sigDict'] = result[0] 4267 return result 4268 4261 4269 @property 4262 4270 def Peaks(self): -
trunk/GSASIIstrMain.py
r4780 r4783 727 727 rigidbodyDict,parmDict,varyList,calcControls,pawleyLookup,ifSeq,printFile,dlg, 728 728 refPlotUpdate=refPlotUpdate) 729 G2fil.G2Print (' wR = %7.2f%%, chi**2 = %12.6g, reduced chi**2 = %6.2f, last delta chi = %.4f, last shft/sig = %.4f'%( 730 Rvals['Rwp'],Rvals['chisq'],Rvals['GOF']**2,Rvals['DelChi2'],Rvals.get('Max shft/sig',np.nan))) 729 try: 730 shft = '%.4f'% Rvals['Max shft/sig'] 731 except: 732 shft = '?' 733 G2fil.G2Print (' wR = %7.2f%%, chi**2 = %12.6g, reduced chi**2 = %6.2f, last delta chi = %.4f, last shft/sig = %s'%( 734 Rvals['Rwp'],Rvals['chisq'],Rvals['GOF']**2,Rvals['DelChi2'],shft)) 731 735 if Rvals.get('lamMax',0) >= 10.: 732 736 msgs['steepestNum'] += 1 -
trunk/exports/G2export_CIF.py
r4759 r4783 120 120 '\n _atom_site_adp_type'+ 121 121 '\n _atom_site_U_iso_or_equiv'+ 122 '\n _atom_site_s ymmetry_multiplicity')122 '\n _atom_site_site_symmetry_multiplicity') 123 123 124 124 varnames = {cx:'Ax',cx+1:'Ay',cx+2:'Az',cx+3:'Afrac', … … 298 298 '\n _atom_site_adp_type'+ 299 299 '\n _atom_site_U_iso_or_equiv'+ 300 '\n _atom_site_s ymmetry_multiplicity')300 '\n _atom_site_site_symmetry_multiplicity') 301 301 302 302 varnames = {cx:'Ax',cx+1:'Ay',cx+2:'Az',cx+3:'Afrac', -
trunk/help/gsasII.html
r4682 r4783 6522 6522 X-ray/CW-neutron refinement of PbSO4 tutorial</a>. 6523 6523 6524 <dt><B>Preferred orientation</B><dd> is treated in one of two 6524 <dt><a name="Preferred_orientation"> 6525 <B>Preferred orientation</B></a> 6526 <dd> is treated in one of two 6525 6527 ways. Intensity corrections can be added to the model here or a full 6526 6528 texture model is possible with the "texture" tab (which usually … … 7249 7251 7250 7252 <h4 style='margin-left:0.25in'><a name="Texture">Texture </a></h4> 7253 <p class=MsoNormal style='margin-left:.5in'> 7254 This tab is used to control settings used for a texture (pole figure) 7255 study of a material. This type of characterization requires 7256 diffraction data recorded with multiple detector orientations (the 7257 number of orientations will depend on sample and material 7258 symmetry). Do not confuse this with applying a 7259 <a href="#Preferred_orientation">preferred orientation correction</a> 7260 (found in the <a href="#Data">"Data" tab</A>) in a structural study. The sample 7261 orientation relative to the detector axes is specified here and the 7262 detector orientation is specified for each histogram as goniometer 7263 omega, chi, phi and azimuth values. These values must be specified. 7264 </P> 7265 <p class=MsoNormal style='margin-left:.5in'> 7266 Texture is modeled for different types of sample treatment, where grain 7267 orientation can have symmetry: cylindrical, rolling, shear or none 7268 (ordered from highest to lowest). 7269 The number of spherical harmonics coefficients is determined by the 7270 harmonic order and the symmetry setting. 7271 </P> 7251 7272 7252 7273 <h5 style='margin-left:.5in'><span><span … … 7254 7275 class=MsoHyperlink><span style='color:#4F4FFF;text-decoration:none;text-underline: 7255 7276 none'><o:p></o:p></span></span></span></span></h5> 7277 <p class=MsoNormal style='margin-left:0.75in'> 7278 The refined texture coefficients can be plotted in different ways: 7279 <UL style='margin-left:1.0in'> 7280 <LI> 7281 as an "Axial pole 7282 distribution" which simulates the intensity of a reflection during a 7283 phi scan. 7284 <LI>as a "pole figure" or "inverse pole figure" 7285 which shows the intensity of a reflection as 7286 a function of sample orientation 7287 <LI>as a "3D pole distribution" that shows the probability of 7288 finding a crystallite with a given orientation. 7289 </UL> 7290 </P> 7291 7292 7256 7293 7257 7294 <h4 style='margin-left:0.25in'><a name="Map_peaks">Map peaks</a></h4> … … 7503 7540 <hr size=2 width="100%" align=center> 7504 7541 7505 <!-- hhmts start -->Last modified: T hu Dec 10 19:31:56 CST 2020<!-- hhmts end -->7542 <!-- hhmts start -->Last modified: Tue Jan 26 12:36:18 CST 2021 <!-- hhmts end --> 7506 7543 7507 7544 </div>
Note: See TracChangeset
for help on using the changeset viewer.