Changeset 2344


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

add option to correct data on import

Location:
trunk
Files:
1 added
2 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])
  • trunk/help/gsasII.html

    r2338 r2344  
    27722772GSAS-II<b style='mso-bidi-font-weight:normal'> </b>data tree as ‘PWDR file
    27732773name’.<b style='mso-bidi-font-weight:normal'><o:p></o:p></b></p>
    2774 
     2774<p class=MsoListParagraphCxSpMiddle style='margin-left:1.2in;mso-add-space:
     2775auto;text-indent:-.0in;mso-list:l14 level2 lfo1'>
     2776Note that it is possible to apply corrections to the 2-theta,
     2777intensity or weight values by creating a file with Python commands named
     2778G2powdercorrections.txt. See the  G2powdercorrections.txt.sample file
     2779provided in the GSAS-II source directory.
     2780</p>
    27752781<p class=MsoListParagraphCxSpMiddle style='margin-left:1.5in;mso-add-space:
    27762782auto;text-indent:-.25in;mso-list:l14 level3 lfo1;tab-stops:list 1.5in'><![if !supportLists]><b
     
    63876393style='mso-bookmark:Pawley'><o:p>&nbsp;</o:p></span></p>
    63886394
    6389 <p class=MsoNormal><span style='mso-bookmark:Pawley'><!-- hhmts start -->Last modified: Fri Jun 19 16:41:44 CDT 2015 <!-- hhmts end -->
     6395<p class=MsoNormal><span style='mso-bookmark:Pawley'><!-- hhmts start -->Last modified: Sun Jun 26 12:58:26 CDT 2016 <!-- hhmts end -->
    63906396</body>
    63916397
Note: See TracChangeset for help on using the changeset viewer.