Changeset 4909


Ignore:
Timestamp:
May 19, 2021 9:32:00 PM (3 years ago)
Author:
toby
Message:

fix CIF exports

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIctrlGUI.py

    r4899 r4909  
    14621462                if sizevals[i]: kargs['size']=sizevals[i]
    14631463            if CopyButton:
    1464                 import wx.lib.colourselect as wscs  # is there a way to test?
    1465                 but = wscs.ColourSelect(label='v', # would like to use u'\u2193' or u'\u25BC' but not in WinXP
    1466                     parent=panel,colour=(255,255,200),size=wx.Size(30,23),
    1467                     style=wx.RAISED_BORDER)
    1468                 but.Bind(wx.EVT_BUTTON, self._OnCopyButton)
    1469                 if 'phoenix' in wx.version():
    1470                     but.SetToolTip('Press to copy adjacent value to all rows below')
     1464                if i+1 == len(dictlst):
     1465                    but = (-1,-1)
    14711466                else:
    1472                     but.SetToolTipString('Press to copy adjacent value to all rows below')
    1473                 self.ButtonIndex[but] = i
     1467                    import wx.lib.colourselect as wscs  # is there a way to test?
     1468                    but = wscs.ColourSelect(label='v', # would like to use u'\u2193' or u'\u25BC' but not in WinXP
     1469                                            parent=panel,colour=(255,255,200),size=wx.Size(30,23),
     1470                                            style=wx.RAISED_BORDER)
     1471                    but.Bind(wx.EVT_BUTTON, self._OnCopyButton)
     1472                    if 'phoenix' in wx.version():
     1473                        but.SetToolTip('Press to copy adjacent value to all rows below')
     1474                    else:
     1475                        but.SetToolTipString('Press to copy adjacent value to all rows below')
     1476                    self.ButtonIndex[but] = i
    14741477                subSizer.Add(but)
    14751478            # create the validated TextCrtl, store it and add it to the sizer
  • trunk/exports/G2export_CIF.py

    r4888 r4909  
    13121312                    pass
    13131313                WriteCIFitem(self.fp,"_cell_measurement_temperature",T)
    1314                 for h in phasedict['Histograms']:
     1314                for h in self.Histograms:
    13151315                    if self.Histograms[h]['ranId'] == hRanId:
    13161316                        pId = phasedict['pId']
     
    17371737                        s = ""
    17381738                    elif zero:
    1739                         s = PutInCol(G2mth.ValEsd(x.data-zero,-0.00009),10)
     1739                        s = PutInCol(G2mth.ValEsd(x-zero,-0.00009),10)
    17401740                    else:
    1741                         s = PutInCol(G2mth.ValEsd(x.data,-0.00009),10)
     1741                        s = PutInCol(G2mth.ValEsd(x,-0.00009),10)
    17421742                    s += PutInCol(Yfmt(ndec,yobs),12)
    17431743                    s += PutInCol(Yfmt(ndec,ycalc),12)
     
    21932193        self.CIFname = s
    21942194       
    2195         self.InitExport(event)
    2196         # load all of the tree into a set of dicts
    2197         self.loadTree()
    2198         # load saved CIF author name
    2199         self.author = self.OverallParms['Controls'].get("Author",'?').strip()
    2200         # initialize dict for Selection of Hist for unit cell reporting
    2201         self.OverallParms['Controls']['CellHistSelection'] = self.OverallParms[
    2202             'Controls'].get('CellHistSelection',{})
    2203         self.CellHistSelection = self.OverallParms['Controls']['CellHistSelection']
    22042195        #=================================================================
    22052196        # write quick CIFs
     
    22362227        # the export process for a full CIF starts here
    22372228        #===============================================================================
     2229        # load saved CIF author name
     2230        self.author = self.OverallParms['Controls'].get("Author",'?').strip()
     2231        # initialize dict for Selection of Hist for unit cell reporting
     2232        self.OverallParms['Controls']['CellHistSelection'] = self.OverallParms[
     2233            'Controls'].get('CellHistSelection',{})
     2234        self.CellHistSelection = self.OverallParms['Controls']['CellHistSelection']
    22382235        # create a dict with refined values and their uncertainties
    22392236        self.loadParmDict()
     
    26072604
    26082605    def Exporter(self,event=None):
     2606        self.InitExport(event)
     2607        # load all of the tree into a set of dicts
     2608        self.loadTree()
    26092609        self._Exporter(event=event)
    26102610        self.CloseFile()
Note: See TracChangeset for help on using the changeset viewer.