Ignore:
Timestamp:
Feb 18, 2016 1:01:27 PM (6 years ago)
Author:
vondreele
Message:

all PWDR exporters will make file name from histogram name
allow read of multibank data
alert user to duplicate histograms (by name)
rename data will not change Bank or Azm part of histogram name
fix L&R plotting commands for TOF data

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/exports/G2export_pwdr.py

    r2026 r2152  
    9797        filenamelist = []
    9898        for hist in self.histnam:
    99             if len(self.histnam) > 1:
    100                 # multiple files: create a unique name from the histogram
    101                 fileroot = G2obj.MakeUniqueLabel(self.MakePWDRfilename(hist),filenamelist)
    102                 # create an instrument parameter file
    103                 self.filename = os.path.join(self.dirname,fileroot + self.extension)
    104             else:
    105                 # use the supplied name, but force the extension
    106                 self.filename= os.path.splitext(self.filename)[0] + self.extension
    107 
     99            # multiple files: create a unique name from the histogram
     100            fileroot = G2obj.MakeUniqueLabel(self.MakePWDRfilename(hist),filenamelist)
     101            # create an instrument parameter file
     102            self.filename = os.path.join(self.dirname,fileroot + self.extension)
    108103            histblk = self.Histograms[hist]
    109104            prmname = self.WriteInstFile(hist,histblk['Instrument Parameters'][0])
    110105            self.Writer(hist,prmname=prmname)
    111106            print('Histogram '+str(hist)+' written to file '+str(self.fullpath))
    112 
    113107
    114108class ExportPowderXYE(G2IO.ExportBaseclass):
     
    157151        filenamelist = []
    158152        for hist in self.histnam:
    159             if len(self.histnam) > 1:
    160                 # multiple files: create a unique name from the histogram
    161                 fileroot = G2obj.MakeUniqueLabel(self.MakePWDRfilename(hist),filenamelist)
    162                 # create an instrument parameter file
    163                 self.filename = os.path.join(self.dirname,fileroot + self.extension)
    164             else:
    165                 # use the supplied name, but force the extension
    166                 self.filename= os.path.splitext(self.filename)[0] + self.extension
    167 
     153            # multiple files: create a unique name from the histogram
     154            fileroot = G2obj.MakeUniqueLabel(self.MakePWDRfilename(hist),filenamelist)
     155            # create an instrument parameter file
     156            self.filename = os.path.join(self.dirname,fileroot + self.extension)
    168157            self.Writer(hist)
    169158            print('Histogram '+str(hist)+' written to file '+str(self.fullpath))
Note: See TracChangeset for help on using the changeset viewer.