This project has moved and is read-only. For the latest updates, please go here.

Convergence/divergence angle

Apr 2, 2013 at 3:39 AM
Hi All,

I was wondering how to specify the thetaConvOrDiv angle in an XML infile as specified in the light sources PDF as: CustomCircularSource(thetaConvOrDiv , innerRadius, outerRadius, sourceProfile,
newDirectionOfPrincipalSourceAxis, translationFromOrigin,
beamRotationFromInwardNormal, initialTissueRegionIndex) User can set polar angle
range and azimuthal angle range (polarAngleEmissionRange and

I tried to specify this as:
<SourceInput i:type="CustomCircularSourceInput">
    <AzimuthalAngleEmissionRange xmlns:a="">
        <Count xmlns="">2</Count>
        <Start xmlns="">0</Start>
        <Stop xmlns="">0</Stop>
    <BeamRotationFromInwardNormal xmlns:a="">
    <NewDirectionOfPrincipalSourceAxis xmlns:a="">
    <PolarAngleEmissionRange xmlns:a="">
        <Count xmlns="">2</Count>
        <Start xmlns="">0</Start>
        <Stop xmlns="">0</Stop>
    <SourceProfile i:type="a:GaussianSourceProfile" xmlns:a="">
    <TranslationFromOrigin xmlns:a="">
Unfortunately changing the option did not affect the simulation results. Could you tell me how to specify the convergence/divergence angles?


Apr 2, 2013 at 5:50 PM
Ah, I see in the source code that this option does not exist for the CustomCircularSource. It works fine for the DirectionalCircularSource. Does the documentation incorrectly specify the thetaConvOrDiv argument or did I incorrectly specify it?


Apr 2, 2013 at 11:35 PM
Hi Martijn

DirectionalCircularSource is a special source to model regular lens (converging sources) and fiber sources (diverging sources). It can also create parallel beams when thetaConvOrDiv is set to zero. This was done by manipulating polar angle value. A negative polar angle creates a diverging source and a positive polar angle creates a converging source.
You can use CustomCircularSource to create converging and diverging beams. CustomCircularSource does not support thetaConvOrDiv. But CustomCircularSource can be used to model your own source by manipulating basic functions. Use polarAngleEmissionRange variable and set your divergence or convergence angle. For example, if you want to create pi/6 divergence beam, set polarAngleEmissionRange to (-pi/6, -pi/6).

Hope this help.

Apr 3, 2013 at 12:09 AM
Hi Janaka,

Thanks for the explanation! Does that also mean that using the azimuthAngleEmissionRange the extent of the cone spanned by polarAngleEmissionRange is adapted, e.g. for an azimuthAngleEmissionRange of (0,pi) photons only come from the right side of the cone?



Apr 3, 2013 at 12:27 AM
Hi Martijn

Yes, you can do that. We used Cartesian coordinates to define polar angles. (0,pi) range is in first two quadrants.