Changeset 4843


Ignore:
Timestamp:
Mar 7, 2021 5:46:32 PM (8 months ago)
Author:
toby
Message:

fix Le Bail issues: LB before refinement; bug for combined fits; LeBail? -> Le Bail

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIdataGUI.py

    r4841 r4843  
    760760        self.Refine.append(item)
    761761        self.Bind(wx.EVT_MENU, self.OnRefine, id=item.GetId())
    762         item = parent.Append(wx.ID_ANY,'&LeBail fit\tCTRL+B','Fit LeBail intensities only')
     762        item = parent.Append(wx.ID_ANY,'&Le Bail fit\tCTRL+B','Fit Le Bail intensities only')
    763763        item.Enable(state)
    764764        self.Refine.append(item)
     
    802802           
    803803        for item in self.Refine:
    804             if 'LeBail' in item.GetItemLabel():
     804            if 'Le Bail' in item.GetItemLabel():
    805805                if seqSetting: item.Enable(False)
    806806            elif seqSetting:
     
    52605260        item = GetGPXtreeItemId(self,self.root,'Covariance')
    52615261        covData = self.GPXtree.GetItemPyData(item)
    5262         GOF0 = covData['Rvals']['GOF']
     5262        try:
     5263            rChi2initial = '{:.3f}'.format(covData['Rvals']['GOF']**2)
     5264        except:
     5265            rChi2initial = '?'
    52635266       
    52645267        dlg = wx.ProgressDialog('Residual','All data Rw =',101.0,
     
    52835286        if OK:
    52845287            text = ''
    5285             rtext = 'LeBail+only fit done. '
     5288            rtext = 'Le Bail-only fit done. '
    52865289            Rwp = Rvals.get('Rwp','?')
    52875290            if 'GOF' in Rvals:
    5288                 txt = 'Final Reduced Chi^2: {:.3f} (before ref: {:.3f})\n'.format(
    5289                     Rvals['GOF']**2,GOF0**2)
     5291                txt = 'Final Reduced Chi^2: {:.3f} (before ref: {})\n'.format(
     5292                    Rvals['GOF']**2,rChi2initial)
    52905293                text += txt
    52915294                rtext += txt
    52925295            text += '\nLoad new result?'
    5293             dlg2 = wx.MessageDialog(self,text,'LeBail fit: Rwp={:.3f}'
     5296            dlg2 = wx.MessageDialog(self,text,'Le Bail fit: Rwp={:.3f}'
    52945297                                            .format(Rwp),wx.OK|wx.CANCEL)
    52955298            dlg2.CenterOnParent()
     
    53035306                dlg2.Destroy()
    53045307        else:
    5305             self.ErrorDialog('LeBail error',Rvals['msg'])
     5308            self.ErrorDialog('Le Bail error',Rvals['msg'])
    53065309           
    53075310    def reloadFromGPX(self,rtext=None):
  • trunk/GSASIIddataGUI.py

    r4839 r4843  
    842842            if not UseList[G2frame.hist]['LeBail']:
    843843                UseList[G2frame.hist]['newLeBail'] = True
    844                 Obj.SetLabel('Do new LeBail extraction?')
     844                Obj.SetLabel('Do new Le Bail extraction?')
    845845            UseList[G2frame.hist]['LeBail'] = Obj.GetValue()
    846846
     
    909909        useBox.Add(useData,0,WACV)
    910910        if not generalData['doPawley'] and 'PWDR' in G2frame.hist[:4]:
    911             lbLabel = 'Redo LeBail extraction?   '
     911            lbLabel = 'Redo Le Bail extraction?   '
    912912            if UseList[G2frame.hist]['newLeBail']:
    913                 lbLabel = 'Do new LeBail extraction?'
     913                lbLabel = 'Do new Le Bail extraction?'
    914914            lebail = wx.CheckBox(DData,wx.ID_ANY,label=lbLabel)
    915915            lebail.Bind(wx.EVT_CHECKBOX, OnLeBail)
     
    917917            useBox.Add(lebail,0,WACV)
    918918            if UseList[G2frame.hist]['LeBail']:
    919                 G2frame.SetStatusText('To reset LeBail, cycle LeBail check box.',1)
     919                G2frame.SetStatusText('To reset Le Bail, cycle Le Bail check box.',1)
    920920        bottomSizer.Add(useBox,0,wx.TOP|wx.BOTTOM|wx.LEFT,5)
    921921        if G2frame.testSeqRefineMode():
  • trunk/GSASIIstrMain.py

    r4840 r4843  
    299299    if IfOK:
    300300        if CheckLeBail(Phases):   # only needed for LeBail extraction
    301             G2stMth.errRefine(values,[Histograms,Phases,restraintDict,rigidbodyDict],
    302                                 parmDict,varyList,calcControls,pawleyLookup,dlg)
    303 
     301            G2stMth.errRefine([],[Histograms,Phases,restraintDict,rigidbodyDict],
     302                                parmDict,[],calcControls,pawleyLookup,dlg)
    304303        G2stMth.GetFobsSq(Histograms,Phases,parmDict,calcControls)
    305304    if chisq0 is not None:
     
    562561    parmDict.update(histDict)
    563562    G2stIO.GetFprime(calcControls,Histograms)
    564     parmFrozenList = Controls['parmFrozen']['FrozenList']
    565563    try:
    566564        for i in range(cycles):
     
    580578                       'freshCOV':True}
    581579       
    582         G2stIO.SetUsedHistogramsAndPhases(GPXfile,Histograms,Phases,rigidbodyDict,covData,parmFrozenList,True)
     580        G2stIO.SetUsedHistogramsAndPhases(GPXfile,Histograms,Phases,rigidbodyDict,covData,[],True)
    583581        G2fil.G2Print (' ***** LeBail fit completed *****')
    584582        return True,Rvals
Note: See TracChangeset for help on using the changeset viewer.