This project has moved. For the latest updates, please go here.

Convergence/divergence angle

Apr 2, 2013 at 2: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:

1.2.1.2. CustomCircularSource(thetaConvOrDiv , innerRadius, outerRadius, sourceProfile,
newDirectionOfPrincipalSourceAxis, translationFromOrigin,
beamRotationFromInwardNormal, initialTissueRegionIndex) User can set polar angle
range and azimuthal angle range (polarAngleEmissionRange and
azimuthalAngleEmissionRange).

I tried to specify this as:
<SourceInput i:type="CustomCircularSourceInput">
    <AzimuthalAngleEmissionRange xmlns:a="http://schemas.datacontract.org/2004/07/Vts.Common">
        <Count xmlns="http://schemas.datacontract.org/2004/07/Vts">2</Count>
        <Start xmlns="http://schemas.datacontract.org/2004/07/Vts">0</Start>
        <Stop xmlns="http://schemas.datacontract.org/2004/07/Vts">0</Stop>
    </AzimuthalAngleEmissionRange>
    <BeamRotationFromInwardNormal xmlns:a="http://schemas.datacontract.org/2004/07/Vts.MonteCarlo.Helpers">
        <a:Phi>0</a:Phi>
        <a:Theta>0</a:Theta>
    </BeamRotationFromInwardNormal>
    <InitialTissueRegionIndex>0</InitialTissueRegionIndex>
    <InnerRadius>0</InnerRadius>
    <NewDirectionOfPrincipalSourceAxis xmlns:a="http://schemas.datacontract.org/2004/07/Vts.Common">
        <a:Ux>0</a:Ux>
        <a:Uy>0</a:Uy>
        <a:Uz>1</a:Uz>
    </NewDirectionOfPrincipalSourceAxis>
    <OuterRadius>1.5</OuterRadius>
    <PolarAngleEmissionRange xmlns:a="http://schemas.datacontract.org/2004/07/Vts.Common">
        <Count xmlns="http://schemas.datacontract.org/2004/07/Vts">2</Count>
        <Start xmlns="http://schemas.datacontract.org/2004/07/Vts">0</Start>
        <Stop xmlns="http://schemas.datacontract.org/2004/07/Vts">0</Stop>
    </PolarAngleEmissionRange>
    <SourceProfile i:type="a:GaussianSourceProfile" xmlns:a="http://schemas.datacontract.org/2004/07/Vts.MonteCarlo.Sources.SourceProfiles">
        <a:BeamDiaFWHM>1.5</a:BeamDiaFWHM>
    </SourceProfile>
    <SourceType>CustomCircular</SourceType>
    <ThetaConvOrDiv>-0.5</ThetaConvOrDiv>
    <TranslationFromOrigin xmlns:a="http://schemas.datacontract.org/2004/07/Vts.Common">
        <a:X>0</a:X>
        <a:Y>0</a:Y>
        <a:Z>0</a:Z>
    </TranslationFromOrigin>
</SourceInput>
Unfortunately changing the option did not affect the simulation results. Could you tell me how to specify the convergence/divergence angles?

Thanks,

Martijn
Apr 2, 2013 at 4: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?

Thanks,

Martijn
Developer
Apr 2, 2013 at 10: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.

Janaka
Apr 2, 2013 at 11:09 PM
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?

Thanks,

Martijn


Developer
Apr 2, 2013 at 11:27 PM
Hi Martijn

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

Janaka