c There are 5 fortran functions: c txfit_rf(x,m) c delta_rf(x,m) c theta_rf(x,m) c phi_rf(x,m) c y00_rf(x,m) c c Calling convention is as follows. c x is an array in which x(1->5) are xf, thetaf, yf, phif, and x0 c (the detector coordinates in the transport coordinate system and c the vertical position of the beam at the target). c For txfit_rf m=1 for all others m=5. c c Procedure: c Convert theta to a new orthogonalized theta' as follows: c theta'=theta-txfit_rf(x,1) c Put the new theta' into your x array c (or x(2)=x(2)-txfit_rf(x,1) should work) c Then it's self-explanitory: c delta0 = delta_rf(x,5) c theta0 = theta_rf(x,5) c phi0 = phi_rf(x,5) c y0 = y00_rf(x,5) function txfit_rf (x,m) dimension x(m) dimension xmin(10),xmax(10),scale(10),xmean(10) dimension coeff( 4) data ncoeff/ 3/ data avdat/ 0.1039723E-01/ data xmin/ 1 -0.48648E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00, 2 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00/ data xmax/ 1 0.58180E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00, 2 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00/ data scale /10*0./ data coeff/ + -0.14794517E-02, 0.99861376E-01,-0.72111655E-03, + 0. / data ientry/0/ c if (ientry.ne.0) go to 10 ientry=1 do 5 i=1,m if (xmin(i).eq.xmax(i)) go to 5 scale(i)=2./(xmax(i)-xmin(i)) 5 continue c 10 continue c normalize variables between -1 and +1 x1 =1.+(x( 1)-xmax( 1))*scale( 1) c set up monomials functions x11 = x1 x12 = x11*x1 c c function c txfit_rf =avdat 1 +coeff( 1) 2 +coeff( 2)*x11 3 +coeff( 3)*x12 c return end function phi_rf (x,m) dimension x(m) dimension xmin(10),xmax(10),scale(10),xmean(10) dimension coeff( 81) data ncoeff/ 80/ data avdat/ 0.0000000E+00/ data xmin/ 1 -0.72655E+00,-0.18765E-01,-0.17204E+00,-0.80504E-01,-0.99929E-03, 2 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00/ data xmax/ 1 0.72809E+00, 0.16756E-01, 0.17204E+00, 0.80504E-01, 0.99947E-03, 2 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00/ data scale /10*0./ data coeff/ + -0.61504204E-01, 0.26040878E-01, 0.71205154E-01,-0.79675719E-01, + -0.59451699E-01,-0.25010388E-02, 0.83609903E-02, 0.41003197E+00, + -0.13196471E+01, 0.15643893E-01, 0.85047193E-01,-0.62478550E-01, + 0.54132100E-01, 0.58489176E-02, 0.41398950E-01,-0.45220457E-01, + 0.52123242E-02, 0.13142318E-02,-0.19542419E+01,-0.15890591E-01, + -0.85730124E+00, 0.22477858E+01, 0.56290567E+00, 0.33051495E-02, + -0.17855026E-01, 0.16270127E-01, 0.13899279E+01, 0.99086985E-02, + 0.10212412E-01,-0.30290044E-02,-0.12068338E-01,-0.83033945E-02, + -0.48244908E+00,-0.50117890E-02, 0.98957280E-02,-0.53772205E-02, + 0.43724367E+00, 0.29047092E-01, 0.70659970E-02, 0.21011967E-01, + 0.49749576E-02, 0.13672642E-01, 0.47929338E-02,-0.12521343E-01, + -0.14476544E-01, 0.67307986E-02,-0.17466184E+01, 0.21397250E+01, + 0.24950109E+00,-0.83429068E+00,-0.80697909E-02,-0.54025110E-02, + -0.11980391E-01, 0.68918215E-02, 0.34848345E-02,-0.80564022E-02, + 0.19701623E-04, 0.22623637E+00,-0.98294832E-01,-0.49038967E+00, + 0.77396438E-01,-0.72503448E-02,-0.10035997E-02,-0.25116591E-03, + 0.10925854E-02,-0.25743232E-02,-0.35327033E-03, 0.32653657E-02, + 0.56075380E-03,-0.94995095E-03, 0.14916490E-03,-0.80599729E-03, + 0.93790330E-03,-0.76013902E-03,-0.44333311E-02, 0.90375841E-02, + -0.45539052E-02, 0.54809765E-03, 0.37043141E-02,-0.17588423E-02, + 0. / data ientry/0/ c if (ientry.ne.0) go to 10 ientry=1 do 5 i=1,m if (xmin(i).eq.xmax(i)) go to 5 scale(i)=2./(xmax(i)-xmin(i)) 5 continue c 10 continue c normalize variables between -1 and +1 x1 =1.+(x( 1)-xmax( 1))*scale( 1) x2 =1.+(x( 2)-xmax( 2))*scale( 2) x3 =1.+(x( 3)-xmax( 3))*scale( 3) x4 =1.+(x( 4)-xmax( 4))*scale( 4) x5 =1.+(x( 5)-xmax( 5))*scale( 5) c set up monomials functions x11 = x1 x12 = x11*x1 x13 = x12*x1 x14 = x13*x1 x21 = x2 x22 = x21*x2 x23 = x22*x2 x24 = x23*x2 x31 = x3 x32 = x31*x3 x33 = x32*x3 x34 = x33*x3 x41 = x4 x42 = x41*x4 x43 = x42*x4 x51 = x5 x52 = x51*x5 x53 = x52*x5 c c function c phi_rf =avdat 1 +coeff( 1) *x31 2 +coeff( 2) *x41 3 +coeff( 3) *x21*x31 4 +coeff( 4)*x11 *x41 5 +coeff( 5) *x21 *x41 6 +coeff( 6)*x12 *x31 7 +coeff( 7)*x12 *x41 8 +coeff( 8)*x11 *x33 phi_rf = phi_rf 9 +coeff( 9)*x11 *x32*x41 1 +coeff( 10)*x12 *x33 2 +coeff( 11)*x11 *x31 3 +coeff( 12) *x22*x31 4 +coeff( 13) *x22 *x41 5 +coeff( 14)*x13 *x31 6 +coeff( 15)*x11*x22*x31 7 +coeff( 16)*x11*x22 *x41 8 +coeff( 17)*x11*x21*x31 phi_rf = phi_rf 9 +coeff( 18)*x11*x21 *x41 1 +coeff( 19) *x31*x42 2 +coeff( 20)*x12*x22*x31 3 +coeff( 21) *x33 4 +coeff( 22) *x32*x41 5 +coeff( 23) *x43 6 +coeff( 24) *x21*x31 *x51 7 +coeff( 25) *x23*x31 8 +coeff( 26) *x23 *x41 phi_rf = phi_rf 9 +coeff( 27)*x11 *x31*x42 1 +coeff( 28)*x11*x23*x31 2 +coeff( 29)*x14*x21*x31 3 +coeff( 30) *x21 *x41*x51 4 +coeff( 31)*x12*x21*x31 5 +coeff( 32)*x13 *x41 6 +coeff( 33)*x11 *x43 7 +coeff( 34)*x14 *x31 8 +coeff( 35)*x13*x21*x31 phi_rf = phi_rf 9 +coeff( 36) *x24*x31 1 +coeff( 37)*x11*x21*x33 2 +coeff( 38) *x22*x33 3 +coeff( 39)*x14 *x41 4 +coeff( 40)*x12*x22 *x41 5 +coeff( 41) *x23*x33 6 +coeff( 42)*x12*x21 *x41 7 +coeff( 43) *x21 *x43 8 +coeff( 44)*x13*x21 *x41 phi_rf = phi_rf 9 +coeff( 45)*x11*x23 *x41 1 +coeff( 46) *x24 *x41 2 +coeff( 47)*x11*x21*x32*x41 3 +coeff( 48)*x11*x21*x31*x42 4 +coeff( 49)*x12 *x43 5 +coeff( 50)*x11*x21 *x43 6 +coeff( 51)*x13*x22*x31 7 +coeff( 52)*x12*x23*x31 8 +coeff( 53)*x14*x21 *x41 phi_rf = phi_rf 9 +coeff( 54)*x12*x23 *x41 1 +coeff( 55) *x21*x32*x41 2 +coeff( 56) *x21*x31*x42 3 +coeff( 57)*x11*x21 *x41*x51 4 +coeff( 58)*x12 *x32*x41 5 +coeff( 59) *x22*x32*x41 6 +coeff( 60)*x12 *x31*x42 7 +coeff( 61) *x22*x31*x42 8 +coeff( 62) *x22 *x43 phi_rf = phi_rf 9 +coeff( 63)*x11*x22*x31 *x51 1 +coeff( 64)*x12*x21 *x41*x51 2 +coeff( 65)*x11*x22 *x41*x51 3 +coeff( 66) *x22*x31 *x52 4 +coeff( 67)*x11*x21 *x41*x52 5 +coeff( 68) *x22 *x41*x52 6 +coeff( 69) *x32*x41*x52 7 +coeff( 70) *x31*x42*x52 8 +coeff( 71) *x43*x52 phi_rf = phi_rf 9 +coeff( 72)*x11 *x31 *x53 1 +coeff( 73)*x11 *x41*x53 2 +coeff( 74)*x11*x24*x31 3 +coeff( 75)*x12*x21*x33 4 +coeff( 76)*x13*x22 *x41 5 +coeff( 77) *x23*x32*x41 6 +coeff( 78)*x11 *x34*x41 7 +coeff( 79)*x12*x21*x31*x42 8 +coeff( 80) *x23*x31*x42 c return end function y00_rf (x,m) dimension x(m) dimension xmin(10),xmax(10),scale(10),xmean(10) dimension coeff( 25) data ncoeff/ 24/ data avdat/ 0.0000000E+00/ data xmin/ 1 -0.72655E+00,-0.18765E-01,-0.17204E+00,-0.80504E-01,-0.99929E-03, 2 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00/ data xmax/ 1 0.72809E+00, 0.16756E-01, 0.17204E+00, 0.80504E-01, 0.99947E-03, 2 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00/ data scale /10*0./ data coeff/ + -0.34957442E+00, 0.36489710E+00,-0.16426376E+00, 0.12193345E+00, + -0.18950799E+00, 0.16410024E+00,-0.18097481E-01, 0.12068398E+00, + -0.97218148E-01, 0.19383105E-02,-0.45601153E-02, 0.28542211E-01, + 0.14791440E-02,-0.35308313E-01,-0.89874994E-02, 0.20731180E-02, + 0.16911514E-02, 0.10910737E-01, 0.38328007E-01,-0.20291224E-01, + -0.69836300E-03, 0.47539398E-02,-0.17161918E-02,-0.50939834E-02, + 0. / data ientry/0/ c if (ientry.ne.0) go to 10 ientry=1 do 5 i=1,m if (xmin(i).eq.xmax(i)) go to 5 scale(i)=2./(xmax(i)-xmin(i)) 5 continue c 10 continue c normalize variables between -1 and +1 x1 =1.+(x( 1)-xmax( 1))*scale( 1) x2 =1.+(x( 2)-xmax( 2))*scale( 2) x3 =1.+(x( 3)-xmax( 3))*scale( 3) x4 =1.+(x( 4)-xmax( 4))*scale( 4) x5 =1.+(x( 5)-xmax( 5))*scale( 5) c set up monomials functions x11 = x1 x12 = x11*x1 x13 = x12*x1 x14 = x13*x1 x21 = x2 x22 = x21*x2 x23 = x22*x2 x31 = x3 x32 = x31*x3 x33 = x32*x3 x41 = x4 x42 = x41*x4 x51 = x5 c c function c y00_rf =avdat 1 +coeff( 1) *x31 2 +coeff( 2) *x41 3 +coeff( 3)*x11 *x31 4 +coeff( 4)*x11 *x41 5 +coeff( 5) *x21*x31 6 +coeff( 6) *x21 *x41 7 +coeff( 7)*x11*x21*x31 8 +coeff( 8) *x22*x31 y00_rf = y00_rf 9 +coeff( 9) *x22 *x41 1 +coeff( 10)*x12 *x31 2 +coeff( 11)*x13 *x31 3 +coeff( 12) *x23*x31 4 +coeff( 13) *x31*x42 5 +coeff( 14)*x11*x22*x31 6 +coeff( 15)*x12 *x41 7 +coeff( 16)*x11 *x33 8 +coeff( 17) *x21*x33 y00_rf = y00_rf 9 +coeff( 18)*x13 *x41 1 +coeff( 19)*x11*x22 *x41 2 +coeff( 20) *x23 *x41 3 +coeff( 21) *x33 *x51 4 +coeff( 22)*x14 *x31 5 +coeff( 23)*x13*x21*x31 6 +coeff( 24)*x12*x22*x31 c return end function delta_rf(x,m) dimension x(m) dimension xmin(10),xmax(10),scale(10),xmean(10) dimension coeff( 55) data ncoeff/ 54/ data avdat/ -0.6735801E-04/ data xmin/ 1 -0.72655E+00,-0.18765E-01,-0.17204E+00,-0.80504E-01,-0.99929E-03, 2 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00/ data xmax/ 1 0.72809E+00, 0.16756E-01, 0.17204E+00, 0.80504E-01, 0.99947E-03, 2 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00/ data scale /10*0./ data coeff/ + 0.94650663E-04, 0.42164844E-01, 0.44381039E-03, 0.42638739E-03, + 0.31515697E-02, 0.53843218E-02,-0.26773564E-02, 0.51265631E-01, + -0.89941941E-01, 0.39313052E-01,-0.52087958E-04, 0.10909876E-03, + -0.11291412E-04,-0.33207431E-04, 0.12545909E-02,-0.12764951E-02, + -0.34761694E-02,-0.80216810E-01, 0.14558681E-01, 0.13796192E+00, + -0.10340601E-01,-0.59580367E-01, 0.13339475E-02,-0.56841087E-04, + 0.71013331E-01,-0.86881906E-01,-0.14746004E+00, 0.15867934E+00, + 0.75907908E-01,-0.72933890E-01,-0.48062854E-03, 0.55398799E-01, + -0.14280993E+00,-0.12310029E+00, 0.26735350E+00,-0.12504657E+00, + -0.84317486E-04, 0.97084176E-02, 0.23246853E-05, 0.16204089E-03, + -0.30485130E-03, 0.57585293E-03, 0.64709455E-01, 0.67965724E-02, + -0.16370192E-01,-0.21796948E+00, 0.52090389E+00, 0.48289038E-01, + -0.30880284E+00,-0.14796358E-01,-0.10127518E+00, 0.75187492E-02, + 0.18213086E-01, 0.53686034E-01, + 0. / data ientry/0/ c if (ientry.ne.0) go to 10 ientry=1 do 5 i=1,m if (xmin(i).eq.xmax(i)) go to 5 scale(i)=2./(xmax(i)-xmin(i)) 5 continue c 10 continue c normalize variables between -1 and +1 x1 =1.+(x( 1)-xmax( 1))*scale( 1) x2 =1.+(x( 2)-xmax( 2))*scale( 2) x3 =1.+(x( 3)-xmax( 3))*scale( 3) x4 =1.+(x( 4)-xmax( 4))*scale( 4) x5 =1.+(x( 5)-xmax( 5))*scale( 5) c set up monomials functions x11 = x1 x12 = x11*x1 x13 = x12*x1 x14 = x13*x1 x21 = x2 x22 = x21*x2 x23 = x22*x2 x24 = x23*x2 x31 = x3 x32 = x31*x3 x33 = x32*x3 x34 = x33*x3 x41 = x4 x42 = x41*x4 x43 = x42*x4 x44 = x43*x4 x51 = x5 x52 = x51*x5 c c function c delta_rf=avdat 1 +coeff( 1) 2 +coeff( 2)*x11 3 +coeff( 3) *x21 4 +coeff( 4) *x51 5 +coeff( 5)*x12 6 +coeff( 6)*x11*x21 7 +coeff( 7) *x22 8 +coeff( 8) *x32 delta_rf= delta_rf 9 +coeff( 9) *x31*x41 1 +coeff( 10) *x42 2 +coeff( 11)*x11 *x51 3 +coeff( 12) *x21 *x51 4 +coeff( 13) *x52 5 +coeff( 14)*x12*x21 6 +coeff( 15)*x11*x22 7 +coeff( 16) *x23 8 +coeff( 17)*x11 *x32 delta_rf= delta_rf 9 +coeff( 18) *x21*x32 1 +coeff( 19)*x11 *x31*x41 2 +coeff( 20) *x21*x31*x41 3 +coeff( 21)*x11 *x42 4 +coeff( 22) *x21 *x42 5 +coeff( 23)*x11*x23 6 +coeff( 24) *x24 7 +coeff( 25)*x11*x21*x32 8 +coeff( 26) *x22*x32 delta_rf= delta_rf 9 +coeff( 27)*x11*x21*x31*x41 1 +coeff( 28) *x22*x31*x41 2 +coeff( 29)*x11*x21 *x42 3 +coeff( 30) *x22 *x42 4 +coeff( 31)*x12*x23 5 +coeff( 32)*x11*x22*x32 6 +coeff( 33) *x23*x32 7 +coeff( 34)*x11*x22*x31*x41 8 +coeff( 35) *x23*x31*x41 delta_rf= delta_rf 9 +coeff( 36) *x23 *x42 1 +coeff( 37) *x24 *x51 2 +coeff( 38)*x14 *x42 3 +coeff( 39)*x13 4 +coeff( 40) *x22 *x51 5 +coeff( 41)*x12*x22 6 +coeff( 42)*x11*x24 7 +coeff( 43)*x11*x22 *x42 8 +coeff( 44)*x14 *x32 delta_rf= delta_rf 9 +coeff( 45)*x14 *x31*x41 1 +coeff( 46)*x12*x21*x34 2 +coeff( 47)*x12*x21*x33*x41 3 +coeff( 48)*x13 *x32*x42 4 +coeff( 49)*x12*x21*x32*x42 5 +coeff( 50)*x11*x22*x32*x42 6 +coeff( 51)*x13 *x31*x43 7 +coeff( 52)*x12*x21*x31*x43 8 +coeff( 53)*x11*x22*x31*x43 delta_rf= delta_rf 9 +coeff( 54)*x13 *x44 c return end function theta_rf(x,m) dimension x(m) dimension xmin(10),xmax(10),scale(10),xmean(10) dimension coeff( 81) data ncoeff/ 80/ data avdat/ -0.1223248E-02/ data xmin/ 1 -0.72655E+00,-0.18765E-01,-0.17204E+00,-0.80504E-01,-0.99929E-03, 2 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00/ data xmax/ 1 0.72809E+00, 0.16756E-01, 0.17204E+00, 0.80504E-01, 0.99947E-03, 2 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00/ data scale /10*0./ data coeff/ + 0.84282877E-02,-0.17529078E-02,-0.12782937E+00, 0.35868979E-02, + 0.11312192E-03, 0.28238079E-01,-0.53655435E-02, 0.66523120E-01, + -0.11005105E-02, 0.42717147E-03,-0.63435611E-04,-0.77734345E-04, + -0.17276884E-02, 0.43289666E-02,-0.11308055E-01, 0.25460331E-01, + -0.45674133E+00,-0.45877833E-01, 0.80879390E+00, 0.20523489E-01, + -0.35214207E+00,-0.59319318E-04, 0.11349227E-02, 0.45486123E-03, + 0.16129535E-01, 0.61728805E+00,-0.37902406E+00, 0.18697372E-02, + -0.12406263E+01, 0.72590464E+00,-0.17807210E-02, 0.62283415E+00, + -0.34808737E+00,-0.81533368E-03, 0.20232031E-02,-0.11550877E-01, + -0.10689741E+00,-0.93514942E-01, 0.24779561E+00, 0.21996699E+00, + 0.22451913E+00,-0.55660415E+00,-0.11609615E+00,-0.13553032E+00, + 0.30639303E+00, 0.27845518E-02, 0.74573238E-02,-0.44561392E-02, + -0.26573017E-02, 0.53249826E-02, 0.25736508E-02,-0.71130786E-02, + -0.11994915E+00, 0.55380873E-01,-0.46774489E-03,-0.16744423E-03, + 0.54703630E-03,-0.34165871E-02,-0.40020989E-02,-0.42771315E-02, + 0.55687642E-02,-0.10964745E+01,-0.25554875E+00, 0.20097253E+01, + -0.92781723E+00, 0.92698437E+00,-0.81619573E+00, 0.14165118E+00, + 0.60844509E-03,-0.97530350E-01, 0.83633453E-01, 0.34485900E-03, + 0.11113134E-02, 0.13383297E-01,-0.10848354E-01, 0.20895287E+00, + -0.26857847E+00, 0.74611612E-01,-0.49366951E-01, 0.57830494E-01, + 0. / data ientry/0/ c if (ientry.ne.0) go to 10 ientry=1 do 5 i=1,m if (xmin(i).eq.xmax(i)) go to 5 scale(i)=2./(xmax(i)-xmin(i)) 5 continue c 10 continue c normalize variables between -1 and +1 x1 =1.+(x( 1)-xmax( 1))*scale( 1) x2 =1.+(x( 2)-xmax( 2))*scale( 2) x3 =1.+(x( 3)-xmax( 3))*scale( 3) x4 =1.+(x( 4)-xmax( 4))*scale( 4) x5 =1.+(x( 5)-xmax( 5))*scale( 5) c set up monomials functions x11 = x1 x12 = x11*x1 x13 = x12*x1 x14 = x13*x1 x21 = x2 x22 = x21*x2 x23 = x22*x2 x24 = x23*x2 x31 = x3 x32 = x31*x3 x33 = x32*x3 x34 = x33*x3 x41 = x4 x42 = x41*x4 x43 = x42*x4 x44 = x43*x4 x51 = x5 x52 = x51*x5 x53 = x52*x5 c c function c theta_rf=avdat 1 +coeff( 1) 2 +coeff( 2)*x11 3 +coeff( 3) *x21 4 +coeff( 4) *x51 5 +coeff( 5)*x12 6 +coeff( 6)*x11*x21 7 +coeff( 7) *x22 8 +coeff( 8) *x32 theta_rf= theta_rf 9 +coeff( 9)*x11 *x51 1 +coeff( 10) *x21 *x51 2 +coeff( 11) *x52 3 +coeff( 12)*x13 4 +coeff( 13)*x12*x21 5 +coeff( 14)*x11*x22 6 +coeff( 15) *x23 7 +coeff( 16)*x11 *x32 8 +coeff( 17) *x21*x32 theta_rf= theta_rf 9 +coeff( 18)*x11 *x31*x41 1 +coeff( 19) *x21*x31*x41 2 +coeff( 20)*x11 *x42 3 +coeff( 21) *x21 *x42 4 +coeff( 22)*x12 *x51 5 +coeff( 23) *x22 *x51 6 +coeff( 24)*x14 7 +coeff( 25)*x11*x23 8 +coeff( 26)*x11*x21*x32 theta_rf= theta_rf 9 +coeff( 27) *x22*x32 1 +coeff( 28)*x12 *x31*x41 2 +coeff( 29)*x11*x21*x31*x41 3 +coeff( 30) *x22*x31*x41 4 +coeff( 31)*x12 *x42 5 +coeff( 32)*x11*x21 *x42 6 +coeff( 33) *x22 *x42 7 +coeff( 34)*x12*x21 *x51 8 +coeff( 35)*x13*x22 theta_rf= theta_rf 9 +coeff( 36)*x12*x23 1 +coeff( 37)*x13 *x32 2 +coeff( 38)*x12*x21*x32 3 +coeff( 39)*x11*x22*x32 4 +coeff( 40)*x13 *x31*x41 5 +coeff( 41)*x12*x21*x31*x41 6 +coeff( 42)*x11*x22*x31*x41 7 +coeff( 43)*x13 *x42 8 +coeff( 44)*x12*x21 *x42 theta_rf= theta_rf 9 +coeff( 45)*x11*x22 *x42 1 +coeff( 46)*x14*x22 2 +coeff( 47)*x13*x23 3 +coeff( 48)*x12*x24 4 +coeff( 49)*x13*x22 *x51 5 +coeff( 50)*x13*x24 6 +coeff( 51)*x14*x22 *x51 7 +coeff( 52)*x14*x24 8 +coeff( 53) *x31*x41 theta_rf= theta_rf 9 +coeff( 54) *x42 1 +coeff( 55)*x11*x21 *x51 2 +coeff( 56) *x21 *x52 3 +coeff( 57)*x13*x21 4 +coeff( 58)*x12*x22 5 +coeff( 59) *x24 6 +coeff( 60)*x14*x21 7 +coeff( 61)*x11*x24 8 +coeff( 62) *x23*x32 theta_rf= theta_rf 9 +coeff( 63) *x21*x34 1 +coeff( 64) *x23*x31*x41 2 +coeff( 65) *x23 *x42 3 +coeff( 66) *x21*x32*x42 4 +coeff( 67) *x21*x31*x43 5 +coeff( 68) *x21 *x44 6 +coeff( 69)*x11*x22 *x52 7 +coeff( 70)*x11*x23*x32 8 +coeff( 71)*x11*x23*x31*x41 theta_rf= theta_rf 9 +coeff( 72)*x13 *x53 1 +coeff( 73)*x12*x21 *x53 2 +coeff( 74)*x14*x21*x32 3 +coeff( 75)*x13*x22*x32 4 +coeff( 76)*x12*x23*x32 5 +coeff( 77)*x12*x23*x31*x41 6 +coeff( 78)*x12*x23 *x42 7 +coeff( 79) *x23*x32*x42 8 +coeff( 80) *x23*x31*x43 c return end