Changeset 3780


Ignore:
Timestamp:
Jan 11, 2019 1:51:15 PM (3 years ago)
Author:
toby
Message:

fix typos; error in CIF Dij reporting; improve generalized restraint GUI

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • Tutorials/FPAfit/FPAfit.htm

    r3718 r3780  
    663663<p class=MsoNormal style='margin-bottom:12.0pt;line-height:15.0pt;mso-pagination:
    664664none;mso-layout-grid-align:none;text-autospace:none'><span style='font-size:
    665 14.0pt'>The FPA peak shapes are computed with the NIST FPA Python code (</span><b><span
    666 style='font-size:13.0pt;font-family:Times;mso-fareast-font-family:"\FF2D\FF33 \660E\671D";
    667 mso-fareast-theme-font:minor-fareast;mso-bidi-font-family:Times;color:blue'>http://dx.doi.org/10.6028/jres.120.014.c</span></b><span
    668 style='font-size:14.0pt'>), which should be cited using ÒH. Mendenhall, Marcus
    669 &amp; Mullen, Katharine &amp; P. Cline, James. (2015)<span class=GramE>. <i
    670 style='mso-bidi-font-style:normal'>An Implementation of the Fundamental
    671 Parameters Approach for Analysis of X-ray Powder Diffraction Line Profiles</i>.</span>
    672 <span class=GramE>Journal of Research of the National Institute of Standards
    673 and Technology.</span> <b style='mso-bidi-font-weight:normal'>120</b> 223-251. <a
     665  14.0pt'>The FPA peak shapes are computed with the NIST FPA Python code
     666  </span>
     667  (<A
     668  HREF="http://dx.doi.org/10.6028/jres.120.014.c">http://dx.doi.org/10.6028/jres.120.014.c</A>),
     669  <span style='font-size:14.0pt'>which should be cited using "Mendenhall, Marcus H.;
     670Mullen, Katharine; &amp; Cline, James P.; <B>(2015)</B>. <i>
     671An Implementation of the Fundamental
     672Parameters Approach for Analysis of X-ray Powder Diffraction Line Profiles</i>.<Journal of Research of the National Institute of Standards
     673and Technology.
     674<b style='mso-bidi-font-weight:normal'>120</b> 223-251. <a
    674675href="http://dx.doi.org/10.6028/jres.120.014"
    675 title="Link to Mendenhall et al paper">10.6028/jres.120.014</a>,Ó if this
     676title="Link to Mendenhall et al paper">10.6028/jres.120.014</a>," if this
    676677capability is used within GSAS-II. This code is used to generate a pattern with
    677678isolated peaks. The profile of these peaks is fit using profile parameters U,
     
    685686
    686687<p class=MsoNormal><span style='font-size:14.0pt'>To invoke this capability,
    687 the ÒImport/Powder Data/Fit instr. profile from fundamental <span class=SpellE>parms</span>ÉÓ
     688the "Import/Powder Data/Fit instr. profile from fundamental <span class=SpellE>parms</span>É"
    688689menu command is used. This opens a dialog, as below <o:p></o:p></span></p>
    689690
     
    743744input in one of two ways. They can be read from a file, which can be
    744745hand-edited to access the full range of capabilities in the NIST FPA Python
    745 code (discussed further in Ò7. Supplying NIST FPA input manuallyÓ below) or can
    746 be input from another dialog window. Press the ÒInput FP <span class=SpellE>vals</span>Ó
     746code (discussed further in "7. Supplying NIST FPA input manually" below) or can
     747be input from another dialog window. Press the "Input FP <span class=SpellE>vals</span>"
    747748button, which opens the window shown below:<o:p></o:p></span></p>
    748749
     
    777778<p class=MsoNormal><span style='font-size:14.0pt'><o:p>&nbsp;</o:p></span></p>
    778779
    779 <p class=MsoNormal><span style='font-size:14.0pt'>The ÒPlot peakÓ button at the
     780<p class=MsoNormal><span style='font-size:14.0pt'>The "Plot peak" button at the
    780781bottom of the window can be used to visualize the resulting peak shape at any
    781782position in 2-theta, as well as all the contributions to <span class=GramE>the</span>
     
    800801components in the peak convolution functions plot can be difficult. Clicking on
    801802an entry in the legend changes the display of that component, as shown below
    802 where ÒemissionÓ in the legend was clicked:<o:p></o:p></span></p>
     803where "emission" in the legend was clicked:<o:p></o:p></span></p>
    803804
    804805<p class=MsoNormal><span style='font-size:14.0pt;mso-fareast-language:EN-US;
     
    845846
    846847<p class=MsoNormal><span style='font-size:14.0pt'>Also note that after values
    847 have been entered, the ÒSave FPA <span class=SpellE>dict</span>Ó button is now
     848have been entered, the "Save FPA <span class=SpellE>dict</span>" button is now
    848849available. <o:p></o:p></span></p>
    849850
     
    851852
    852853<p class=MsoNormal><span style='font-size:14.0pt'>Press OK to start the
    853 computation. A Òplease waitÓ message is displayed<o:p></o:p></span></p>
     854computation. A "please wait" message is displayed<o:p></o:p></span></p>
    854855
    855856<p class=MsoNormal><span style='font-size:14.0pt;mso-fareast-language:EN-US;
     
    901902broadening terms, the Gamma (Lorentz width) terms refine to negative values for
    902903the first few low angle peaks. This can be addressed by setting X to 0.0 and
    903 refining U, V, W, Y and SH/L but not X in the ÒInstrument ParametersÓ tree item.
    904 Then return to the ÒPeak ListÓ tree item to use the Peak Fitting/<span
    905 class=SpellE>Peakfit</span> menu command. Finally, return to ÒInstrument
    906 ParametersÓ and use Operations/Save Profile to write the improved values to <span
     904refining U, V, W, Y and SH/L but not X in the "Instrument Parameters" tree item.
     905Then return to the "Peak List" tree item to use the Peak Fitting/<span
     906class=SpellE>Peakfit</span> menu command. Finally, return to "Instrument
     907Parameters" and use Operations/Save Profile to write the improved values to <span
    907908class=GramE>an .<span class=SpellE>instparm</span></span> file.<o:p></o:p></span></p>
    908909
     
    933934
    934935<p class=MsoNormal><span style='font-size:14.0pt'>Once FPA values have been
    935 entered, the ÒSave FPA <span class=SpellE>dict</span>Ó button can be pressed. <span
     936entered, the "Save FPA <span class=SpellE>dict</span>" button can be pressed. <span
    936937style="mso-spacerun:yes">&nbsp;</span>The <span class=GramE>contents of this
    937938file, slightly reformatted for more easy reading, is</span> shown below. Note
  • Tutorials/FitPeaks/Fit Peaks.htm

    r3718 r3780  
    19641964style='font-family:"Calibri",sans-serif;mso-ascii-theme-font:minor-latin;
    19651965mso-hansi-theme-font:minor-latin;mso-bidi-theme-font:minor-latin'>Cell
    1966 Index/Refine/Refine Cell</span></b> menu option. The M20 improves to ~3600 and <span
    1967 class=GramE>the a</span> cell parameter value shifts from 4.15683 to 4.15691
    1968 when zero is refined. (NB: The certificate value for NIST SRM 660a is 4.15692
     1966Index/Refine/Refine Cell</span></b> menu option. The M20 improves to
     1967~3600 as the <I>a</I> cell parameter value shifts from 4.15683 to 4.15691
     1968because the zero is now refined. (NB: The certificate value for NIST SRM 660a is 4.15692
    19691969Å). Press the <b style='mso-bidi-font-weight:normal'><span style='font-family:
    19701970"Calibri",sans-serif;mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:
  • Tutorials/RietPlot/PublicationPlot.htm

    r3598 r3780  
    14431443of the plot can be customized, as below. Note that as changes are made in the
    14441444controls at the top of the window, these changes are displayed immediately.
    1445 Also note the addition of <span class=GramE>a</span> additional difference plot
     1445Also note the addition of an additional difference plot
    14461446at the bottom. This shows the weighted difference between the observed and
    14471447calculated diffraction pattern ([<span class=SpellE>obs-cal</span>]/sigma); the
     
    15791579<p class=MsoNormal><a href="https://www.wavemetrics.com/products/igorpro">Igor
    15801580Pro</a> is commercial software (and not cheap) but it is widely used in some
    1581 circles and also does a great job for creating high-quality graphics. A free 30-day
    1582 version demo is available. </p>
     1581circles and also does a great job for creating high-quality graphics.
     1582Igor Pro offers inset plots and many other features for creating
     1583figures for publication. 
     1584Note a free 30-day demo version of Igor Pro is available. </p>
    15831585
    15841586<p class=MsoNormal><o:p>&nbsp;</o:p></p>
     
    15881590Below is the Igor window after reading the .<span class=SpellE>itx</span> file.
    15891591Note that it is easy to move the Intensity label and change the text in the
    1590 legend, etc. Inset plots and many other features are available within Igor Pro.
     1592legend, etc.
    15911593</p>
    15921594
  • trunk/GSASIIctrlGUI.py

    r3745 r3780  
    35123512            self.scrolledSizer.Add(wx.StaticText(self.panel,wx.ID_ANY,str(name)))
    35133513            if name in self.varyList:
    3514                 self.scrolledSizer.Add(wx.StaticText(self.panel,label='R',size=(50,-1)))   #TODO? maybe a checkbox for one stop refinemnt flag setting?
     3514                self.scrolledSizer.Add(wx.StaticText(self.panel,label='R',size=(50,-1)))   #TODO? maybe a checkbox for one stop refinement flag setting?
    35153515            elif name in self.fullVaryList:
    35163516                self.scrolledSizer.Add(wx.StaticText(self.panel,label='C',size=(50,-1)))
  • trunk/GSASIIrestrGUI.py

    r3772 r3780  
    187187            restobj = dlg.Show(True)
    188188            if restobj:
    189                 restrData['General'].append([restobj,0.0,1.0])
     189                restrData['General']['General'].append([restobj,0.0,1.0])
    190190                wx.CallAfter(UpdateGeneralRestr,restrData['General'])
    191191           
     
    18621862            parmDict = SetupParmDict(G2frame)
    18631863            dlg = G2exG.ExpressionDialog(G2frame,parmDict,
    1864                             exprObj=generalRestData[n][0],
     1864                            exprObj=generalRestData['General'][n][0],
    18651865                            header="Edit a restraint expression",
    18661866                            fit=False,wildCard=G2frame.testSeqRefineMode())
    18671867            restobj = dlg.Show(True)
    18681868            if restobj:
    1869                 generalRestData[n][0] = restobj
     1869                generalRestData['General'][n][0] = restobj
    18701870                wx.CallAfter(UpdateGeneralRestr,restrData['General'])
    18711871        def OnDelGenRestraint(event):
    18721872            '''Delete a restraint expression'''
    18731873            n = event.GetEventObject().index
    1874             del generalRestData[n]
     1874            del generalRestData['General'][n]
    18751875            wx.CallAfter(UpdateGeneralRestr,restrData['General'])
    18761876           
     
    18781878        mainSizer = wx.BoxSizer(wx.VERTICAL)
    18791879        mainSizer.Add((5,5),0)
    1880         mainSizer.Add(wx.StaticText(GeneralRestr,wx.ID_ANY,'(not implemented yet)'))
     1880        hSizer = wx.BoxSizer(wx.HORIZONTAL)
     1881        hSizer.Add(wx.StaticText(GeneralRestr,wx.ID_ANY,'(not implemented yet)'))
     1882        hSizer.Add((5,5),0)
     1883        hSizer.Add(wx.StaticText(GeneralRestr,wx.ID_ANY,'Weight factor: '))
     1884        hSizer.Add(
     1885                    G2G.ValidatedTxtCtrl(GeneralRestr,generalRestData,
     1886                                'wtFactor',nDig=(10,1),typeHint=float)
     1887                    )
     1888        btn = G2G.G2CheckBox(GeneralRestr,'Use?',generalRestData,'Use')
     1889        hSizer.Add(btn)
     1890        hSizer.Add((5,5),0)
    18811891        btn = wx.Button(GeneralRestr, wx.ID_ANY,"Add restraint")
    18821892        btn.Bind(wx.EVT_BUTTON,OnAddRestraint)
    1883         mainSizer.Add(btn,0,wx.ALIGN_CENTER)
     1893        hSizer.Add(btn,0,wx.ALIGN_CENTER|wx.EXPAND|wx.ALL)
     1894        mainSizer.Add(hSizer,0)
    18841895        mainSizer.Add((5,5),0)
    1885         if generalRestData:
     1896        if generalRestData['General']:
    18861897            parmDict = SetupParmDict(G2frame)
    18871898            GridSiz = wx.FlexGridSizer(0,7,10,2)
    1888             for lbl in ('expression','target\nvalue','current\nvalue','weight'):
     1899            for lbl in ('expression','target\nvalue','current\nvalue','esd'):
    18891900                GridSiz.Add(
    18901901                    wx.StaticText(GeneralRestr,wx.ID_ANY,lbl,style=wx.CENTER),
     
    18951906                    wx.StaticText(GeneralRestr,wx.ID_ANY,'Variables',style=wx.CENTER),
    18961907                    0,wx.ALIGN_CENTER)
    1897             for i,rest in enumerate(generalRestData):
     1908            for i,rest in enumerate(generalRestData['General']):
    18981909                txt = rest[0].expression
    18991910                if len(txt) > 50:
     
    19952006            G2frame.dataWindow.RestraintEdit.Enable(G2G.wxID_RESTRAINTADD,True)
    19962007            G2frame.dataWindow.RestraintEdit.Enable(G2G.wxID_RESRCHANGEVAL,False)
     2008            G2frame.dataWindow.RestraintEdit.Enable(G2G.wxID_RESTCHANGEESD,False)
    19972009            UpdateGeneralRestr(restrData['General'])
    19982010        event.Skip()
     
    20522064    if 'ChemComp' not in restrData:
    20532065        restrData['ChemComp'] = {'wtFactor':1.0,'Sites':[],'Use':True}
    2054     if 'General' not in restrData: restrData['General'] = []
     2066    if 'General' not in restrData:
     2067        restrData['General'] = {'wtFactor':1.0,'General':[], 'Use':True}
    20552068    General = phasedata['General']
    20562069    Cell = General['Cell'][1:7]          #skip flag & volume   
  • trunk/exports/G2export_CIF.py

    r3675 r3780  
    832832                macrostrain = False
    833833                for i in range(len(names)):
    834                     name = phfx+name[i]
    835                     sig = self.sigDict.get(name,-0.009)
     834                    name = phfx+names[i]
     835                    sig = self.sigDict.get(name,-0.000009)
    836836                    s1 += G2mth.ValEsd(hstrain[0][i],sig)+', '
    837837                    if hstrain[0][i]: macrostrain = True
Note: See TracChangeset for help on using the changeset viewer.