source: trunk/CorrectionCode.instprm.sample

Last change on this file was 2362, checked in by toby, 5 years ago

fix bug due to addition of CorrectionCode? to InstParms?

File size: 964 bytes
Line 
1#GSAS-II instrument parameter file; manually edited by B.H.Toby to show how to use CorrectionCode
2Lam:0.72768
3SH/L:0.002
4Azimuth:45.814
5X:0.0
6Source:
7Zero:0.0
8U:1.0
9W:0.4
10V:-0.1
11Y:0.0
12Polariz.:0.99
13Type:PXC
14Bank:1
15CorrectionCode:'''# Example 2theta correction (applied via numpy array correction; fast!)
16print '2theta before', rd.powderdata[0][:3],'...',rd.powderdata[0][-2:]
17TT = rd.powderdata[0]
18rd.powderdata[0] += 0.06038972 - 0.001500277 * TT + 7.389e-06 * TT**2
19print '2theta after', rd.powderdata[0][:3],'...',rd.powderdata[0][-2:]
20'''
21#
22# alternate example. This applies a correction point-by-point in a loop
23#
24#CorrectionCode:'''#apply 2theta correction in a loop
25#print '2T before', rd.powderdata[0][:3],'...',rd.powderdata[0][-3:]
26#for i in range(len(rd.powderdata[0])):
27#    TT = rd.powderdata[0][i]
28#    rd.powderdata[0][i] += 0.06038972 - 0.001500277 * TT + 7.389e-06 * TT**2
29#print '2T after', rd.powderdata[0][:3],'...',rd.powderdata[0][-3:]
30#'''
Note: See TracBrowser for help on using the repository browser.