background_polynomial
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
background_polynomial [2011/01/07 14:20] – created johnsoevans | background_polynomial [2022/11/03 15:08] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Background Polynomial ====== | ||
+ | |||
+ | Chebyshev polynomials of the first kind as described at http:// | ||
+ | |||
+ | A Chebychev Polynomial, say order 5, written as: | ||
+ | |||
+ | <code topas> | ||
+ | |||
+ | can be coded as a fit_obj as follows: | ||
+ | |||
+ | <code topas> | ||
+ | prm c1 140.27403` | ||
+ | prm c2 67.32100` | ||
+ | prm c3 21.05784` | ||
+ | prm c4 11.34432` | ||
+ | prm c5 -4.46399` | ||
+ | |||
+ | prm !xm = X2 - X1; | ||
+ | prm !xp = X2 + X1; | ||
+ | prm x = (2 X - xp) / xm; | ||
+ | |||
+ | prm tn2 = 2 x x - 1; | ||
+ | prm tn3 = 2 x tn2 - x; | ||
+ | prm tn4 = 2 x tn3 - tn2; | ||
+ | prm tn5 = 2 x tn4 - tn3; | ||
+ | |||
+ | fit_obj = | ||
+ | c0 + | ||
+ | c1 x + | ||
+ | c2 tn2 + | ||
+ | c3 tn3 + | ||
+ | c4 tn4 + | ||
+ | c5 tn5 | ||
+ | ;</ | ||
+ | |||
+ | |||
+ | Note that X1 and X2 are reserved parameter names that correspond to the start and end of the x-axis. | ||
+ | |||
+ | --- // | ||