convolution for optical broad-beam responses in scattering media convolution for optical broad-beam responses in scattering media photon transport theories in physics, medicine, and statistics (such as the monte carlo method), are commonly used to model light propagation in tissue. the responses to a pencil beam incident on a scattering medium are referred to as green's functions or impulse responses. photon transport methods can be directly used to compute broad-beam responses by distributing photons over the cross section of the beam. however, convolution can be used in certain cases to improve computational efficiency. general convolution formulas in order for convolution to be used to calculate a broad-beam response, a system must be time invariant, linear, and translation invariant. time invariance implies that a photon beam delayed by a given time produces a response shifted by the same delay. linearity indicates that a given response will increase by the same amount if the input is scaled and obeys the property of superposition. translational invariance means that if a beam is shifted to a new location on the tissue surface, its response is also shifted in the same direction by the same distance. here, only spatial convolution is considered. responses from photon transport methods can be physical quantities such as absorption, fluence, reflectance, or transmittance. given a specific physical quantity, g(x,y,z), from a pencil beam in cartesian space and a collimated light source with beam profile s(x,y), a broad-beam response can be calculated using the following 2-d convolution formula: c ( x , y , z ) = ∫ − ∞ ∞ ∫ − ∞ ∞ g ( x − x ′ , y − y ′ , z ) s ( x ′ , y ′ ) d x ′ d y ′ . ( 1 ) ^\int _^\ g(x-x',y-y',z)s(x',y')\,dx'\,dy'.\qquad (1)} similar to 1-d convolution, 2-d convolution is commutative between g and s with a change of variables x ″ = x − x ′ and y ″ = y − y ′ : c ( x , y , z ) = ∫ − ∞ ∞ ∫ − ∞ ∞ g ( x ″ , y ″ , z ) s ( x − x ″ , y − y ″ ) d x ″ d y ″ . ( 2 ) ^\!\int _^\ g(x'',y'',z)s(x-x'',y-y'')\,dx''\,dy''.\qquad (2)} because the broad-beam response c ( x , y , z ) has cylindrical symmetry, its convolution integrals can be rewritten as: c ( r , z ) = ∫ 0 ∞ s ( r ′ ) r ′ [ ∫ 0 2 π g ( r 2 + r ′ 2 − 2 r r ′ c o s ϕ ′ , z ) d ϕ ′ ] d r ′ ( 3 ) ^\ s(r')r'\leftdr'\qquad (3)} c ( r , z ) = ∫ 0 ∞ g ( r ″ , z ) r ″ [ ∫ 0 2 π s ( r 2 + r ″ 2 − 2 r r ″ c o s ϕ ″ ) d ϕ ″ ] d r ″ ( 4 ) ^g(r'',z)r''\leftdr''\qquad (4)} where r ′ = x ′ 2 + y ′ 2 +y'^ . because the inner integration of equation 4 is independent of z, it only needs to be calculated once for all depths. thus this form of the broad-beam response is more computationally advantageous. common beam profiles gaussian beam for a gaussian beam, the intensity profile is given by s ( r ′ ) = s 0 exp ⁡ [ − 2 ( r ′ r ) 2 ] . ( 5 ) \exp \left.\qquad (5)} here, r denotes the 1 e 2 \,} radius of the beam, and s0 denotes the intensity at the center of the beam. s0 is related to the total power p0 by s 0 = 2 p 0 π r 2 . ( 6 ) =.\qquad (6)} substituting eq. 5 into eq. 4, we obtain c ( r , z ) = 2 π s ( r ) ∫ 0 ∞ g ( r ″ , z ) exp ⁡ [ − 2 ( r ″ r ) 2 ] i 0 ( 4 r r ″ r 2 ) r ″ d r ″ , ( 7 ) ^g(r'',z)\exp \lefti_\left(\right)r''\,dr'',\qquad (7)} where i0 is the zeroth-order modified bessel function. top-hat beam for a top-hat beam of radius r, the source function becomes s ( r ′ ) = { s 0 , if r ′ ≤ r 0 , if r ′ > r ( 8 ) s_,&r'\leq r\\\,0,&r'>r\end\qquad (8)} where s0 denotes the intensity inside the beam. s0 is related to the total beam power p0 by s 0 = p 0 π r 2 . ( 9 ) =.\qquad (9)} substituting eq. 8 into eq. 4, we obtain c ( r , z ) = 2 π s 0 ∫ 0 ∞ g ( r ″ , z ) i ϕ ( r , r ″ ) r ″ d r ″ , ( 10 ) \int _^g(r'',z)i_(r,r'')r''\,dr'',\qquad (10)} where i ϕ ( r , r ″ ) = { 1 , if r ≥ r + r ″ , 1 π cos − 1 ⁡ ( r 2 + r ″ 2 − r 2 2 r r ″ ) , if | r − r ″ | ≤ r < r + r ″ , 0 , if r < | r + r ″ | . ( 11 ) (r,r'')=1,&r\geq r+r'',\\\cos ^\left(+r''^-r^\right),&\left|r-r''\right|\leq r<r+r'',\\0,&r<\left|r+r''\right|.\end\qquad (11)} errors in numerical evaluation first interactions first photon-tissue interactions always occur on the z axis and hence contribute to the specific absorption or related physical quantities as a dirac delta function. errors will result if absorption due to the first interactions is not recorded separately from absorption due to subsequent interactions. the total impulse response can be expressed in two parts: c ( r , z ) = g 1 ( 0 , z ) δ ( r ) 2 π r + g 2 ( r , z ) , ( 12 ) (0,z)+g_(r,z),\qquad (12)} where the first term results from the first interactions and the second, from subsequent interactions. for a gaussian beam, we have c ( r , z ) = g 1 ( 0 , z ) s ( r ) + 2 π s 0 ∫ 0 ∞ g 2 ( r ″ , z ) e x p [ − 2 ( r ″ − r r ) 2 ] i 0 e ( 4 r r ″ r 2 ) r ″ d r ″ . ( 13 ) (0,z)s(r)+2\pi s_\int _^g_(r'',z)\,exp\lefti_\left(\right)r''\,dr''.\qquad (13)} for a top-hat beam, we have c ( r , z ) = g 1 ( 0 , z ) s ( r ) + 2 π s 0 ∫ 0 ∞ g 2 ( r ″ , z ) i ϕ ( r , r ″ ) r ″ d r ″ . ( 14 ) (0,z)s(r)+2\pi s_\int _^g_(r'',z)i_(r,r'')r''\,dr''.\qquad (14)} truncation error for a top-hat beam, the upper integration limits may be bounded by rmax, such that r ≤ rmax − r. thus, the limited grid coverage in the r direction does not affect the convolution. to convolve reliably for physical quantities at r in response to a top-hat beam, we must ensure that rmax in photon transport methods is large enough that r ≤ rmax − r holds. for a gaussian beam, no simple upper integration limits exist because it theoretically extends to infinity. at r >> r, a gaussian beam and a top-hat beam of the same r and s0 have comparable convolution results. therefore, r ≤ rmax − r can be used approximately for gaussian beams as well. implementation of convolution there are two common methods used to implement discrete convolution: the definition of convolution and fast fourier transformation (fft and ifft) according to the convolution theorem. to calculate the optical broad-beam response, the impulse response of a pencil beam is convolved with the beam function. as shown by equation 4, this is a 2-d convolution. to calculate the response of a light beam on a plane perpendicular to the z axis, the beam function (represented by a b × b matrix) is convolved with the impulse response on that plane (represented by an a × a matrix). normally a is greater than b. the calculation efficiency of these two methods depends largely on b, the size of the light beam. in direct convolution, the solution matrix is of the size (a + b − 1) × (a + b − 1). the calculation of each of these elements (except those near boundaries) includes b × b multiplications and b × b − 1 additions, so the time complexity is o. using the fft method, the major steps are the fft and ifft of (a + b − 1) × (a + b − 1) matrices, so the time complexity is o. comparing o and o, it is apparent that direct convolution will be faster if b is much smaller than a, but the fft method will be faster if b is relatively large.