Changeset 2018


Ignore:
Timestamp:
Oct 20, 2015 11:37:34 AM (6 years ago)
Author:
toby
Message:

fix export bugs; prevent exception if Cancel is used when locating a missing image

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r2015 r2018  
    35263526    '''
    35273527    plotNo = G2frame.G2plotNB.nb.GetSelection()
     3528    if plotNo < 0: return # no plots
    35283529    if G2frame.G2plotNB.nb.GetPageText(plotNo) == '2D Powder Image':
    35293530        PlotImage(G2frame,newPlot,event,newImage=True)
  • trunk/exports/G2export_FIT2D.py

    r1997 r2018  
    2525import GSASIIpwd as G2pwd
    2626
    27 class ExportPowderCSV(G2IO.ExportBaseclass):
    28     '''Used to create a csv file for a powder data set
     27class ExportPowderCHI(G2IO.ExportBaseclass):
     28    '''Used to create a CHI file for a powder data set
    2929
    3030    :param wx.Frame G2frame: reference to main GSAS-II frame
     
    4343        self.OpenFile(filename)
    4444        histblk = self.Histograms[TreeName]
    45         self.Write(os.path.split(self.fullpath)[1])
     45        self.Write(str(TreeName)[5:]) # drop 'PWDR '
    4646        self.Write("2-Theta Angle (Degrees)")
    4747        self.Write("Intensity")
  • trunk/exports/G2export_pwdr.py

    r1997 r2018  
    106106                self.filename= os.path.splitext(self.filename)[0] + self.extension
    107107
    108             prmname = self.WriteInstFile(TreeName,histblk['Instrument Parameters'][0])
     108            histblk = self.Histograms[hist]
     109            prmname = self.WriteInstFile(hist,histblk['Instrument Parameters'][0])
    109110            self.Writer(hist,prmname=prmname)
    110111            print('Histogram '+str(hist)+' written to file '+str(self.fullpath))
Note: See TracChangeset for help on using the changeset viewer.