Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
background_polynomial [2011/01/07 14:20]
johnsoevans created
background_polynomial [2015/06/16 13:20] (current)
alancoelho
Line 1: Line 1:
 ====== Background Polynomial ====== ====== Background Polynomial ======
  
-Chebyshev polynomials of the first kind as described at http://​mathworld.wolfram.com/​ChebyshevPolynomialoftheFirstKind.html is used by default in Topas. The recurrences relations of Eq. (26) can be used with the x axis normalized ​to be between -1 and 1. Thus your T1(x) should start at -1 for the first data point and end at 1 for the last data point.+Chebyshev polynomials of the first kind as described at http://​mathworld.wolfram.com/​ChebyshevPolynomialoftheFirstKind.html is used by default in Topas. The recurrences relations of Eq. (26) can be used with the x axis normalized between -1 and 1.  
 + 
 +A Chebychev Polynomial, say order 5, written as: 
 + 
 +<code topas>​bkg @  359.793901` ​ 140.27403` ​ 67.3210027` ​ 21.057843` ​ 11.3443248` -4.46398819`</​code>​ 
 + 
 +can be coded as a fit_obj as follows: 
 + 
 +<code topas>​prm c0  359.79390` 
 +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 = (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  
 + ;</​code>​ 
 + 
 +  
 +Note that X1 and X2 are reserved parameter names that correspond to the start and end of the x-axis. 
 + 
 + --- //​[[alan.coelho@bigpond.com|Alan Coelho]] 2011/08/25 19:12//
  
-You can use your own polynomial function by using the fit_obj syntax. 

Personal Tools