Changeset 2344 for trunk/GSASII.py


Ignore:
Timestamp:
Jun 26, 2016 1:04:34 PM (7 years ago)
Author:
toby
Message:

add option to correct data on import

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r2342 r2344  
    15041504                'qPlot':False,'dPlot':False,'sqrtPlot':False
    15051505                }
     1506            # apply user-supplied corrections to powder data
     1507            corrfile = os.path.join(os.path.split(rd.readfilename)[0],'G2powdercorrections.txt')
     1508            if os.path.exists(corrfile):
     1509                print('Applying corrections from file '+corrfile)
     1510                fp = open(corrfile,'r')
     1511                corr = fp.read()
     1512                fp.close()
     1513                try:
     1514                    exec(corr)
     1515                    print('done')
     1516                except Exception as err:
     1517                    print('error: '+str(err))
     1518                    print('with commands '+str(corr))
    15061519            rd.Sample['ranId'] = valuesdict['ranId'] # this should be removed someday
    15071520            self.PatternTree.SetItemPyData(Id,[valuesdict,rd.powderdata])
Note: See TracChangeset for help on using the changeset viewer.