Changeset 4549


Ignore:
Timestamp:
Aug 19, 2020 2:53:47 PM (3 years ago)
Author:
vondreele
Message:

use AddToNotebook? in Refine - remove wx.CallAfter? for self.ReloadFrom? GPX so AddToNotebook? would work
Add csv Exporter for reflectometry data
replace all calls to G2py3.FormatValue? with explicit %.6g formats in G2export_csv - FormatValue? screwed up values.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIdataGUI.py

    r4548 r4549  
    50345034        if OK:
    50355035            Rw = Msg['Rwp']
     5036            rtext = 'LS Refinement: Rw = %.3f%%, GOF = %.2f, Nobs = %d, Max delt/sig = %.3f'%(Msg['Rwp'],Msg['GOF'],Msg['Nobs'],Msg['Max shft/sig'])
    50365037            lamMax = Msg.get('lamMax',0.001)
    50375038            lst = os.path.splitext(os.path.abspath(self.GSASprojectfile))[0]
     
    50455046                if dlg2.ShowModal() == wx.ID_OK:
    50465047                    if refPlotUpdate: refPlotUpdate({},restore=True)
    5047                     wx.CallAfter(self.reloadFromGPX)
     5048                    self.reloadFromGPX
    50485049                else:
    50495050                    if refPlotUpdate: refPlotUpdate({},restore=True)
     5051                self.AddToNotebook(rtext)
    50505052            finally:
    50515053                dlg2.Destroy()
  • trunk/exports/G2export_csv.py

    r4548 r4549  
    212212            for val,digits in zip(vallist,digitList):
    213213                if line: line += ','
    214                 line += G2py3.FormatValue(val,digits)
     214                line += '%.6g'%val
     215#                line += G2py3.FormatValue(val,digits)
    215216            self.Write(line)
    216217        self.CloseFile()
     
    284285            for val,digits in zip(vallist,digitList):
    285286                if line: line += ','
    286                 line += G2py3.FormatValue(val,digits)
     287                line += '%.6g'%val
     288#                line += G2py3.FormatValue(val,digits)
    287289            self.Write(line)
    288290        self.CloseFile()
     
    439441            for val,digits in zip(vallist,digitList):
    440442                if line: line += ','
    441                 line += G2py3.FormatValue(val,digits)
     443                line += '%.6g'%val
     444#                line += G2py3.FormatValue(val,digits)
    442445            self.Write(line)
    443446        self.CloseFile()
     
    484487        self.OpenFile(filename)
    485488        histblk = self.Histograms[TreeName]
    486         # if len(self.Histograms[TreeName]['Models']['Size']['Distribution']):
    487         #     self.Write('"Size Distribution"')
    488         #     Distr = np.array(self.Histograms[TreeName]['Models']['Size']['Distribution'])
    489         #     WriteList(self,("bin_pos","bin_width","bin_value"))
    490         #     digitList = 2*((13,3),)+((13,4,'g'),)
    491         #     for bindata in Distr.T:
    492         #         line = ""
    493         #         for val,digits in zip(bindata,digitList):
    494         #             if line: line += ','
    495         #             line += G2py3.FormatValue(val,digits)
    496         #         self.Write(line)           
    497489        self.Write('"Reflectometry data"')
    498490        Parms = self.Histograms[TreeName]['Instrument Parameters'][0]
     
    516508            for val,digits in zip(vallist,digitList):
    517509                if line: line += ','
    518                 line += G2py3.FormatValue(val,digits)
     510                line += '%.6g'%val
     511#                line += G2py3.FormatValue(val,digits)
    519512            self.Write(line)
    520513        self.CloseFile()
Note: See TracChangeset for help on using the changeset viewer.