Some Basic Equations (See: X-Ray Data Booklet)

xi:=y(1+x^2)^(3/2)/2

w[x_,y_]=(1+x^2)^2(BesselK[2/3,xi]^2+x^2BesselK[1/3,xi]^2/(1+x^2))

dwdy[x_,y_]=D[w[x,y],y]

w1[x_]=(1+x^2)^2 (BesselK[2/3,xi]^2+x^2 BesselK[1/3,xi]^2/(1+x^2))

hWidth[yin_]:=Module[{yy=yin},y=yy;NIntegrate[w1[xx],{xx,0,Infinity}]/w1[0]]

dLogHWidth[yin_]:=Module[{yy=yin},y=yin;y (w1[0]NIntegrate[dwdy[xx,y],{xx,0,Infinity}]-dwdy[0,y]NIntegrate[w1[xx],{xx,0,Infinity}])/(w1[0]^2hWidth[y])]

w1[0]

Vertical Angle Spectrum Half Width as a Function of Relative Photon Energy (y)

Half width is defined as HWidth[y] = Integral[0,Infinity] dx W[x,y] / W[0,y].

LogLogPlot[{hWidth[z]},{z,0.00001,1}]

LogLogPlot[{NIntegrate[w[x,t],{x,0,Infinity}],hWidth[t]},{t,0.00001,1}]

nform[num_]:=Print[NumberForm[N[num,8],{10,7},NumberFormat->(SequenceForm[#1,"D",#3]&),ExponentFunction->(#&)]]

integ[y1_,y2_,dy_]:=Module[{yy1=y1,yy2=y2,dyy=dy},nform[Map[hWidth,PowerRange[yy1,yy2,dyy]]];nform[Map[dLogHWidth,PowerRange[yy1,yy2,dyy]]]]

integ[10^-11,0.1,10]

integ[0.1,1,10^(1/10)]

integ[1,10,10^(1/10)]

integ[10,100,10^(1/10)]

Vertical Angle Integrated Probability Formulas

[Integrated Probability is a function of relative photon energy (y) and x = gamma*phi where gamma is energy of emitting particle and phi = vertical angle.]

w1iInf:=NIntegrate[w1[xx],{xx,0,Infinity}]

w1i[x_]:=NIntegrate[w1[xx],{xx,0,x}]/w1iInf

gammaPhi[integProb_]:=N[InverseFunction[w1i][integProb],8]/(w1iInf/w1[0])

dgpX[integProb_,dintegProb_]:=(gammaPhi[integProb+dintegProb]-gammaPhi[integProb])/dintegProb

dgpY[integProbIn_,yIn_,dyIn_]:=Module[{integProb=integProbIn,yy=yIn,dyy=dyIn},
y=yy-dyy;w1iInf=NIntegrate[w1[xx],{xx,0,Infinity}];gammaPhi0=gammaPhi[integProb];y=yy+dyy;w1iInf=NIntegrate[w1[xx],{xx,0,Infinity}];gammaPhi1=gammaPhi[integProb];Return[(gammaPhi1-gammaPhi0)y/(2dyy)]]

dgpXY[integProbIn_,yIn_,dintegProbIn_,dyIn_]:=Module[{integProb=integProbIn,yy=yIn,dintegProb=dintegProbIn,dyy=dyIn},
dgpY0=dgpY[integProb,yy,dyy];
dgpY1=dgpY[integProb+dintegProb,yy,dyy];
Return[(dgpY1-dgpY0)/dintegProb]]

printit[yIn_]:=Module[{yy=yIn},
nform[Map[gammaPhi,rr]];
nform[Map[dgpX[#,del/100]&,rr]];
nform[Map[dgpY[#,yy,yy/100]&,rr]];
nform[Map[dgpXY[#,yy,del/100,yy/100]&,rr]];Print["\n"]]

pOut[{yIn_}]:=Module[{yy=yIn},y=yy;w1iInf=NIntegrate[w1[xx],{xx,0,Infinity}];
del=0.1;rr=Range[0.0,0.9,del];printit[yy];
del=del/10;rr=Range[0.91,0.99,del];printit[yy];
del=del/10;rr=Range[0.991,0.999,del];printit[yy];
del=del/10;rr=Range[0.9991,0.9999,del];printit[yy];
del=del/10;rr=Range[0.99991,0.99999,del];printit[yy];
del=del/10;rr=Range[0.999991,0.999999,del];printit[yy];
del=del/10;rr=Range[0.9999991,0.9999999,del];printit[yy]
]

Integrated Probability For Various y Values

pOut[{0.000001}]

pOut[{0.001}]

pOut[{0.01}]

pOut[{0.1}]

pOut[{1.0}]

pOut[{10.0}]

pOut[{100.0}]