Ignore:
Timestamp:
Aug 19, 2020 2:53:47 PM (16 months 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.