Rev | Line | |
---|
[2362] | 1 | #GSAS-II instrument parameter file; manually edited by B.H.Toby to show how to use CorrectionCode |
---|
| 2 | Lam:0.72768 |
---|
| 3 | SH/L:0.002 |
---|
| 4 | Azimuth:45.814 |
---|
| 5 | X:0.0 |
---|
| 6 | Source: |
---|
| 7 | Zero:0.0 |
---|
| 8 | U:1.0 |
---|
| 9 | W:0.4 |
---|
| 10 | V:-0.1 |
---|
| 11 | Y:0.0 |
---|
| 12 | Polariz.:0.99 |
---|
| 13 | Type:PXC |
---|
| 14 | Bank:1 |
---|
| 15 | CorrectionCode:'''# Example 2theta correction (applied via numpy array correction; fast!) |
---|
| 16 | print '2theta before', rd.powderdata[0][:3],'...',rd.powderdata[0][-2:] |
---|
| 17 | TT = rd.powderdata[0] |
---|
| 18 | rd.powderdata[0] += 0.06038972 - 0.001500277 * TT + 7.389e-06 * TT**2 |
---|
| 19 | print '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.