# Attenuation correction for sample shape

In cases of strongly scattering or absorbing samples, the detected scattering intensity is lower than the 'true' scattering. Moreover, for oddly-shaped samples, the extinction of scattering may be anisotropic: some parts of the detector image are more attenuated than others because of the differing path-lengths through the sample.

## Formulation

In the following, we assume a transmission-scattering (TSAXS) experiment.

The measured scattering, $S_{m}$ , at a particular scattering angle $(\Theta _{o},\chi _{o})$ (where $\Theta _{o}$ is the full ($2\theta$ ) scattering angle between the scattered ray and the incident beam, and $\chi _{o}$ is the azimuthal angle: $\chi =0^{\circ }$ corresponds to the $q_{z}$ axis, whereas $\chi =90^{\circ }$ is along the $q_{r}$ axis) can be computed by summing the scattering contributions for all the elements along the beam path through the sample.

We define a realspace coordinate system $(x,y,z)$ where z points vertically, y points along the beam direction, and x points horizontally with respect to the sample. Let the sample size along the beam direction be L. Defining the point where the beam first enters the sample as $(0,0,0)$ we write:

{\begin{alignedat}{2}S_{m}(\Theta _{o},\chi _{o})=\int \limits _{l=0}^{l=L}S(l)\mathrm {d} l\end{alignedat}} The scattering from a particular location within the sample is affected by two attenuation effects:

1. The beam flux within the sample decreases due to absorption/scattering, such that the flux at position $l$ is not the incident flux, $I_{0}$ but attenuated to:
$I(l)=I_{0}e^{-\alpha l}$ where $\alpha$ is (Beer-Lambert like) extinction coefficient. If the 'true' scattering probability is given by $\sigma$ (i.e. $I_{0}\sigma$ is the scattering observed in the absence of attenuation), then the scattering at $l$ is:
$S(l)=I(l)\sigma =I_{0}e^{-\alpha l}\sigma$ 2. The scattered radiation is itself attenuated as it passes through the sample. Let this path-length (from scattering location $(0,l,0)$ until it exits the sample along the direction $(\Theta _{o},\chi _{o})$ ) be denoted $p(l)$ . In such a case, the scattering that exits the sample is:
{\begin{alignedat}{2}S(l)&=I(l)\sigma \times \mathrm {attenuation} (l)\\&=I_{0}e^{-\alpha l}\sigma e^{-\alpha p(l)}\\&=I_{0}\sigma e^{-\alpha (l+p(l))}\\\end{alignedat}} The measured scattering is thus:

{\begin{alignedat}{2}S_{m}(\Theta _{o},\chi _{o})&=\int \limits _{l=0}^{L}I_{0}\sigma e^{-\alpha (l+p(l))}\mathrm {d} l\\&=I_{0}\sigma \int \limits _{0}^{L}e^{-\alpha (l+p(l))}\mathrm {d} l\\\end{alignedat}} The integral of course depends on the form of $p(l)$ which depends on the sample shape. Note that in the limiting case of weak attenuation ($\alpha \approx 0$ ), we obtain the very simple result:

{\begin{alignedat}{2}S_{m}(\Theta _{o},\chi _{o})&=I_{0}\sigma \int \limits _{0}^{L}e^{0}\mathrm {d} l\\&=I_{0}\sigma L\\\end{alignedat}} As expected, scattering intensity scales with the scattering volume.

## Normalization

To normalize-out the effect of attenuation, one can simply divide by the integral:

{\begin{alignedat}{2}S_{\mathrm {norm} }(\Theta _{o},\chi _{o})&={\frac {S_{m}(\Theta _{o},\chi _{o})}{\int _{0}^{L}e^{-\alpha (l+p(l))}\mathrm {d} l}}\\&=I_{0}\sigma \end{alignedat}} Of course in the case of weak attenuation the integral is simply L, and we are normalizing by the beam-path through the sample.

## Coordinates

For a vector that starts at $(0,0,0)$ and terminates at $(x,y,z)$ , pointing along direction $(\Theta _{o},\chi _{o})$ , the full length is:

$|\mathbf {v} |=v={\sqrt {x^{2}+y^{2}+z^{2}}}$ We can consider triangles in various planes:

1. xz plane (looking along beam):
$\tan(90^{\circ }-\chi _{o})={\frac {z}{x}}$ $\cos(90^{\circ }-\chi _{o})={\frac {x}{\sqrt {x^{2}+z^{2}}}}$ $\sin(90^{\circ }-\chi _{o})={\frac {z}{\sqrt {x^{2}+z^{2}}}}$ $\tan(\chi _{o})={\frac {x}{z}}$ $\cos(\chi _{o})={\frac {z}{\sqrt {x^{2}+z^{2}}}}$ $\sin(\chi _{o})={\frac {x}{\sqrt {x^{2}+z^{2}}}}$ 2. xy plane (looking from above):
$\tan(\omega _{xy})={\frac {x}{y}}$ $\cos(\omega _{xy})={\frac {y}{\sqrt {x^{2}+y^{2}}}}$ $\sin(\omega _{xy})={\frac {x}{\sqrt {x^{2}+y^{2}}}}$ 3. yz plane (looking from side):
$\tan(\omega _{yz})={\frac {z}{y}}$ $\cos(\omega _{yz})={\frac {y}{\sqrt {y^{2}+z^{2}}}}$ $\sin(\omega _{yz})={\frac {z}{\sqrt {y^{2}+z^{2}}}}$ 4. plane of beam elevation:
$\tan(\omega _{\mathrm {elevation} })={\frac {z}{\sqrt {x^{2}+y^{2}}}}$ $\cos(\omega _{\mathrm {elevation} })={\frac {\sqrt {x^{2}+y^{2}}}{\sqrt {x^{2}+y^{2}+z^{2}}}}$ $\sin(\omega _{\mathrm {elevation} })={\frac {z}{\sqrt {x^{2}+y^{2}+z^{2}}}}$ 5. plane of full scattering angle:
$\tan(\Theta _{o})={\frac {\sqrt {x^{2}+z^{2}}}{y}}$ $\cos(\Theta _{o})={\frac {y}{\sqrt {x^{2}+y^{2}+z^{2}}}}$ $\sin(\Theta _{o})={\frac {\sqrt {x^{2}+z^{2}}}{\sqrt {x^{2}+y^{2}+z^{2}}}}$ ### Height Z

If the vector's final point is at height $z=Z$ :

{\begin{alignedat}{2}v_{Z}&={\sqrt {x^{2}+y^{2}+Z^{2}}}\\&={\frac {\sqrt {x^{2}+Z^{2}}}{\sin(\Theta _{o})}}\\&={\frac {1}{\sin(\Theta _{o})}}{\sqrt {\left(Z\tan(\chi _{o})\right)^{2}+Z^{2}}}\\&={\frac {Z}{\sin(\Theta _{o})}}{\sqrt {\tan ^{2}(\chi _{o})+1}}\\&={\frac {Z}{\sin(\Theta _{o})}}\sec(\chi _{o})\\&={\frac {Z}{\sin(\Theta _{o})\cos(\chi _{o})}}\\\end{alignedat}} This has a minimum of $v_{z}=Z$ when $(\Theta _{o},\chi _{o})=(90^{\circ },0^{\circ })$ .

### Depth L

If the vector's final position is at depth $y=L$ :

{\begin{alignedat}{2}v_{Y}&={\sqrt {x^{2}+L^{2}+z^{2}}}\\&={\frac {L}{\cos(\Theta _{o})}}\\\end{alignedat}} This has a minimum of $v_{Y}=L$ when $\Theta _{o}=0^{\circ }$ .

### Width X

If the vector's final position is at width $x=X$ :

{\begin{alignedat}{2}v_{X}&={\sqrt {X^{2}+y^{2}+z^{2}}}\\&={\frac {\sqrt {X^{2}+z^{2}}}{\sin(\Theta _{o})}}\\&={\frac {1}{\sin(\Theta _{o})}}{\sqrt {X^{2}+\left({\frac {X}{\tan(\chi _{o})}}\right)^{2}}}\\&={\frac {|X|}{\sin(\Theta _{o})}}{\sqrt {1+{\frac {1}{\tan ^{2}(\chi _{o})}}}}\\&={\frac {X}{\sin(\Theta _{o})}}{\sqrt {\frac {\tan ^{2}(\chi _{o})+1}{\tan ^{2}(\chi _{o})}}}\\&={\frac {X}{\sin(\Theta _{o})}}{\frac {\sqrt {\tan ^{2}(\chi _{o})+1}}{\sqrt {\tan ^{2}(\chi _{o})}}}\\&={\frac {X}{\sin(\Theta _{o})}}{\frac {\sec(\chi _{o})}{\tan(\chi _{o})}}\\&={\frac {X\cos(\chi _{o})}{\sin(\Theta _{o})\cos(\chi _{o})\sin(\chi _{o})}}\\&={\frac {X}{\sin(\Theta _{o})\sin(\chi _{o})}}\\\end{alignedat}} This has a minimum of $v_{X}=X$ when $(\Theta _{o},\chi _{o})=(90^{\circ },90^{\circ })$ .

## Rectangular prism

If the sample is a rectangular prism with dimensions $(2X,2Y,2Z)=(2X,L,2Z)$ and the beam falls upon the center of the xz front-face, then the beam travels a distance L through the sample, and the scattered radiation in any quadrant passes through the rectangular prism of size $(X,L,Z)$ . The distance from $(0,l,0)$ to the exit-point from the sample is the distance to the closest sample face:

{\begin{alignedat}{2}p\left(l\right)&=\mathrm {min} (d_{\mathrm {top} }(l),d_{\mathrm {back} }(l),d_{\mathrm {side} }(l))\\\end{alignedat}} The distances are:

{\begin{alignedat}{2}d_{\mathrm {top} }(l)&=v_{Z}\\&={\frac {Z}{\sin(\Theta _{o})\cos(\chi _{o})}}\\\end{alignedat}} {\begin{alignedat}{2}d_{\mathrm {back} }(l)&=v_{L-l}\\&={\frac {L-l}{\cos(\Theta _{o})}}\\\end{alignedat}} {\begin{alignedat}{2}d_{\mathrm {side} }(l)&=v_{X}\\&={\frac {X}{\sin(\Theta _{o})\sin(\chi _{o})}}\\\end{alignedat}} 