Changeset 3887 for trunk/GSASIIstrIO.py


Ignore:
Timestamp:
Apr 10, 2019 5:52:53 PM (3 years ago)
Author:
toby
Message:

Fix restore of seq results after crash

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIstrIO.py

    r3886 r3887  
    783783            hist.seek(histIndex[datum[0]])
    784784            hdata = cPickleLoad(hist)
    785             if GSASIIpath.GetConfigValue('debug'):
    786                 print('Updating {} with {}'.format(data[0][0],hdata[0][0]))
     785            if data[0][0] != hdata[0][0]:
     786                print('Error! Updating {} with {}'.format(data[0][0],hdata[0][0]))
     787            data[0] = hdata[0]
    787788            xferItems = ['Background','Instrument Parameters','Sample Parameters','Reflection Lists']
    788789            hItems = {name:j+1 for j,(name,val) in enumerate(hdata[1:]) if name in xferItems}
     
    790791                if name not in xferItems: continue
    791792                data[j+1][1] = hdata[hItems[name]][1]
    792             data[0] = hdata[0]
    793             # old code update from Histograms array
    794             #histogram = Histograms[datum[0]]
    795             #data[0][1][1] = list(histogram['Data'])
    796             #for datus in data[1:]:
    797             #    if datus[0] in
    798             #        datus[1] = histogram[datus[0]]
    799793        cPickle.dump(data,outfile,1)
    800794    hist.close()
Note: See TracChangeset for help on using the changeset viewer.