Changeset 2362 for trunk/GSASII.py


Ignore:
Timestamp:
Jul 4, 2016 8:06:22 AM (5 years ago)
Author:
toby
Message:

fix bug due to addition of CorrectionCode? to InstParms?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r2360 r2362  
    15281528                'qPlot':False,'dPlot':False,'sqrtPlot':False
    15291529                }
    1530             # apply user-supplied corrections to powder data (remove this below, also from help)
    1531             # also see https://subversion.xray.aps.anl.gov/trac/pyGSAS/changeset/2344
    1532             corrfile = os.path.join(os.path.split(rd.readfilename)[0],'G2powdercorrections.txt')
    1533             if os.path.exists(corrfile):
    1534                 print('Applying corrections from file '+corrfile)
    1535                 fp = open(corrfile,'r')
    1536                 corr = fp.read()
    1537                 fp.close()
    1538                 try:
    1539                     exec(corr)
    1540                     print('done')
    1541                 except Exception as err:
    1542                     print('error: '+str(err))
    1543                     print('with commands '+str(corr))
    15441530            # apply user-supplied corrections to powder data
    15451531            if 'CorrectionCode' in Iparm1:
     
    15541540                    print(str(corr))
    15551541                    print('---------------------------------')
     1542                finally:
     1543                    del Iparm1['CorrectionCode']
    15561544            rd.Sample['ranId'] = valuesdict['ranId'] # this should be removed someday
    15571545            self.PatternTree.SetItemPyData(Id,[valuesdict,rd.powderdata])
Note: See TracChangeset for help on using the changeset viewer.