Changeset 2628


Ignore:
Timestamp:
Jan 12, 2017 3:50:49 PM (5 years ago)
Author:
toby
Message:

force selection of new instparm when data limits/number of points changes when multiple files are read

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r2619 r2628  
    15021502        lastdatafile = ''
    15031503        newHistList = []
     1504        lastVals = []
    15041505        self.EnablePlot = False
    15051506        for rd in rdlist:
    1506             if 'Instrument Parameters' not in rd.pwdparms:
     1507            if 'Instrument Parameters' in rd.pwdparms:
     1508                Iparm1,Iparm2 = rd.pwdparms['Instrument Parameters']
     1509            else:
    15071510                # get instrument parameters for each dataset, unless already set
     1511                if lastIparmfile:  # is this histogram like previous?
     1512                    if lastVals != (rd.powderdata[0].min(),rd.powderdata[0].max(),len(rd.powderdata[0])):
     1513                        lastIparmfile = ''
    15081514                Iparms = self.GetPowderIparm(rd, Iparm, lastIparmfile, lastdatafile)
    15091515                if not Iparms:  #may have bailed out
     
    15131519                if rd.repeat_instparm:
    15141520                    lastIparmfile = rd.instfile
     1521                    lastVals = (rd.powderdata[0].min(),rd.powderdata[0].max(),len(rd.powderdata[0]))
    15151522                # override any keys in read instrument parameters with ones set in import
    15161523                for key in Iparm1: 
    15171524                    if key in rd.instdict:
    15181525                        Iparm1[key] = rd.instdict[key]
    1519             else:
    1520                 Iparm1,Iparm2 = rd.pwdparms['Instrument Parameters']
    15211526            lastdatafile = rd.powderentry[0]
    15221527            HistName = rd.idstring
     
    16941699        self.CheckNotebook()
    16951700        Iparm = None
    1696         lastIparmfile = ''
    16971701        lastdatafile = ''
    16981702        self.zipfile = None
    16991703        # get instrument parameters for it
    1700         Iparm1,Iparm2 = self.GetPowderIparm(rd, Iparm, lastIparmfile, lastdatafile)
     1704        Iparm1,Iparm2 = self.GetPowderIparm(rd, Iparm, '', lastdatafile)
    17011705        if 'T' in Iparm1['Type'][0]:
    17021706            print('TOF simulation not supported yet')
Note: See TracChangeset for help on using the changeset viewer.