Changeset 2362


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

fix bug due to addition of CorrectionCode? to InstParms?

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

    r2344 r2362  
    27752775auto;text-indent:-.0in;mso-list:l14 level2 lfo1'>
    27762776Note that it is possible to apply corrections to the 2-theta,
    2777 intensity or weight values by creating a file with Python commands named
    2778 G2powdercorrections.txt. See the  G2powdercorrections.txt.sample file
    2779 provided in the GSAS-II source directory.
     2777intensity or weight values by creating a adding Python command(s) to
     2778the instrument (.instprm) parameter with a variable named
     2779CorrectionCode. See the CorrectionCode.instprm.sample file
     2780provided in the GSAS-II source directory for an example of how this
     2781is done.
    27802782</p>
    27812783<p class=MsoListParagraphCxSpMiddle style='margin-left:1.5in;mso-add-space:
     
    63936395style='mso-bookmark:Pawley'><o:p>&nbsp;</o:p></span></p>
    63946396
    6395 <p class=MsoNormal><span style='mso-bookmark:Pawley'><!-- hhmts start -->Last modified: Sun Jun 26 12:58:26 CDT 2016 <!-- hhmts end -->
     6397<p class=MsoNormal><span style='mso-bookmark:Pawley'><!-- hhmts start -->Last modified: Mon Jul  4 09:03:37 EDT 2016 <!-- hhmts end -->
    63966398</body>
    63976399
Note: See TracChangeset for help on using the changeset viewer.