Advertisement
Guest User

Untitled

a guest
Dec 21st, 2014
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.95 KB | None | 0 0
  1. [Theta] = .24;
  2. sourcex = 5.57;
  3. energysource = 1.35;
  4. energysoft = .48;
  5. energyhard = 2.8;
  6. iterations = 12;
  7. tg = Table[
  8. Arg[Conjugate[
  9. FSg[j, [Theta], sourcex, energysoft, energysource,
  10. iterations]]*
  11. FHg[j, [Theta], sourcex, energyhard, energysource,
  12. iterations]]/wRs[[j]], {j, 1, 12}];
  13. freq = {.000075, .00015, .00025, .0003, .0007, .001, .0015, .0022,
  14. .0032, .0045, .007, .01};
  15. comp = Thread[{freq, tg}];
  16. source = {{.000075, 65}, {.00015, 165}, {.00025, 125}, {.0003,
  17. 35}, {.0007, -10}, {.001, -20}, {.0015, -30}, {.0022, -15},
  18. {.0032, -20}, {.0045, -5}, {.007, -3}, {.01, -8}};
  19. ListLogLinearPlot[{comp, source}, PlotRange -> {{10^(-5), .02}, All},
  20. PlotStyle -> {Red, Black}, InterpolationOrder -> 1, Frame -> True,
  21. PlotLegend -> {"theory", "observations"},
  22. LegendPosition -> {-.7, -.3}, LegendSize -> {.6, .2},
  23. PlotMarkers -> Automatic, LegendShadow -> None,
  24. FrameLabel -> {"Temporal Frequency (Hz)", "Lag(s)"},
  25. ]]]
  26.  
  27. For[j = 1, j < 12, j++,
  28. FSg[j_, theta_, r0_, energys_, energy0_, nmax_] :=
  29. Module[{stuffs, zetamins, zetamaxs, finalvals, zetas, zeta0, sums,
  30. terms, [Mu], [Kappa]},
  31. zetas = energys/511.25/theta; zeta0 = energy0/511.25/theta;
  32. zetamins = Min[zetas, zeta0];
  33. zetamaxs = Max[zetas, zeta0]; [Kappa] =
  34. 1/2*((3*khat*vhat)/(2*theta) + 4);
  35. stuffs = (-3*N0*khat*Exp[(I*wtilda[[j]]*y0)]*
  36. Exp[((zeta0 - zetas)/2)]*zetas^([Kappa] - 4))/(2*[Pi]*
  37. theta^4*(8.19*10^(-7))^3*(r0)^(1/2)*(Rs)^3*zeta0^([Kappa]));
  38. sums = 0;
  39. Do[
  40. [Mu] =
  41. 1/2*((3 - (3*khat*vhat)/(2*theta))^2 +
  42. 4*(3*khat*vhat)/(2*theta)*(2*sdal[[j, n]])/vhat)^.5;
  43. terms =
  44. Gamma[[Mu] - [Kappa] + 1/2]/(IMH[[j, n]]*Gamma[1 + 2*[Mu]])*
  45. listhOUT[j, n, r0]*listhOUT[j, n, NRs]*
  46. WhittakerM[[Kappa], [Mu], zetamins]*
  47. WhittakerW[[Kappa], [Mu], zetamaxs];
  48. sums = sums + terms,
  49. {n, 1, nmax}];
  50. finalvals = sums*stuffs; finalvals
  51. ]]
  52.  
  53. For[j = 1, j < 13, j++,
  54. FHg[j_, theta_, r0_, energyh_, energy0_, nmax_] :=
  55. Module[{stuffh, zetaminh, zetamaxh, finalvalh, zetah, zeta0, sumh,
  56. termh, [Mu], [Kappa]},
  57. zetah = energyh/511.25/theta; zeta0 = energy0/511.25/theta;
  58. zetaminh = Min[zetah, zeta0];
  59. zetamaxh = Max[zetah, zeta0]; [Kappa] =
  60. 1/2*((3*khat*vhat)/(2*theta) + 4);
  61. stuffh = (-3*N0*khat*Exp[(I*wtilda[[j]]*y0)]*
  62. Exp[((zeta0 - zetah)/2)]*zetah^([Kappa] - 4))/(2*[Pi]*
  63. theta^4*(8.19*10^(-7))^3*(r0)^(1/2)*(Rs)^3*zeta0^([Kappa]));
  64. sumh = 0;
  65. Do[
  66. [Mu] =
  67. 1/2*((3 - (3*khat*vhat)/(2*theta))^2 +
  68. 4*(3*khat*vhat)/(2*theta)*(2*sdal[[j, n]])/vhat)^.5;
  69. termh =
  70. Gamma[[Mu] - [Kappa] + 1/2]/(IMH[[j, n]]*Gamma[1 + 2*[Mu]])*
  71. listhOUT[j, n, r0]*listhOUT[j, n, NRs]*
  72. WhittakerM[[Kappa], [Mu], zetaminh]*
  73. WhittakerW[[Kappa], [Mu], zetamaxh];
  74. sumh = sumh + termh,
  75. {n, 1, nmax}];
  76. finalvalh = sumh*stuffh; finalvalh
  77. ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement