This page describes how SKIRT implements the effects on the polarization of radiation when it is scattered by spherical entities including dust grains and electrons. To actually enable polarization support in a SKIRT simulation, see Configuring for polarized radiation.
Background
We first present the mathematical background of the formalism used in SKIRT. We employ coordinate-system-independent vector representations for directions and angles. This avoids numerical issues that may arise with angles referring to a fixed coordinate system when the propagation direction is (nearly) parallel to one of the coordinate axes. We further use the IAU conventions for polarization and right-handed coordinate systems.
Reference frames
We consider three different reference frames. The first one is the one describing the grid in which the simulation is set up, the laboratory frame in cartesian coordinates,
The second frame is the beam frame, which describes a right handed orthonormal coordinate system that flies with a beam of photons. The -axis of this coordinate system is along the propagation direction of the beam. The -axis is the vector along which the Stokes parameters (see below) are defined. The -axis of this system is , the normal to and . For practical reasons, we will use for most of the calculations. Since the coordinate system is orthonormal, using and also determines .
The third reference frame is the observer frame, which is used by the observing instrument, with its - and -axis ( ) determined from the instrument's configuration and its -axis is pointing from the model origin towards the observer, . Assuming parallel projection as for all DistantInstrument subclasses, the direction to the observer is perpendicular to the - and the -axis, making the system orthonormal.
The Stokes parameters
Consider a beam of radiation traveling through space in the beam reference frame . The polarization status of the radiation beam is characterized by the Stokes vector
where denotes the total intensity, and describe the linear polarization state relative to (the -axis of the beam reference system), and is the degree of circular polarization. The Stokes vector spans the space of unpolarized, partially polarized and fully polarized light (it does not form a preferred basis for this space, but it is useful because its components can be easily measured and calculated).
Useful quantities that can be derived from the Stokes parameters include the degree of linear polarization,
and the direction of linear polarization , often depicted as
(In order to conserve the quadrant, the atan2 function should be used to calculate ). The degree of total polarization
can be calculated from the Stokes parameters as well. These definitions imply that is the angle, measured clockwise while looking along , between the Stokes vector direction and the major axis of the polarization ellipse. For linearly polarized radiation ( ), the polarization ellipse is a line along for and and from for and .
The relation between the Stokes parameters and the parameters of the polarization ellipse can be presented by considering a 3D space, and looking at the vector with 3D Cartesian coordinates ,
with the shape parameter of the polarization ellipse. In other words, , and are the spherical coordinates of the 3D vector of Cartesian coordinates . The factor 2 in front of accounts for the fact that a polarization ellipse remains invariant for rotation by 180 , whereas the factor 2 in front of indicates that the polarization ellipse is invariant if we swap the lengths of the axes and simultaneously apply a rotation of 90 .
Combining the latter equations with the formula for the degree of linear polarization we can write
Rotating the reference vector of the Stokes parameters
The Stokes parameters are defined with respect to the choice of and in the plane perpendicular to the propagation direction. If we rotate the photon coordinate system around its -axis, the Stokes parameters will also alter. The total intensity and the parameter are invariant for such a rotation, but and are not (logical, as they are defined with respect to ). If we rotate the axes and clockwise about over an angle , while looking towards the propagation destination, and we denote the Stokes vector in the new coordinate systems as , then
or
Note the appearance of the factor 2 which is a logical consequence of the choice of the Stokes parameters as a basis for the space of polarized radiation.
Scattering in the Stokes formalism
When a radiation beam scatters, it changes direction and polarization status. Assume that the propagation direction before the scattering is denoted as and the one after the scattering as , with the actual scattering angle,
The change of the Stokes vector during a scattering event is described by Mueller matrices. These are defined with the Stokes vector direction in the scattering plane (and thus being the normal of the scattering plane). In general these matrices are
and each of the elements of the Mueller matrix depends on the scattering angle . For Monte Carlo simulations the factor is dropped, as the path of one photon package is followed.
Since there are multiple restrictions on Stokes vectors (like ), there are at most seven independent variables. For example for scattering at a sphere the formula above reduces to
The Stokes vector after scattering is calculated by multiplying the Stokes vector with the Mueller Matrix. Including the reference direction adjustments before and after the actual scattering event this yields,
Implementation in SKIRT
Orientation of the Stokes parameters
As described in the previous section, each scattering event requires three operations: a rotation by to adjust the orientation to the scattering plane, the Mueller transformation in the scattering plane, and a rotation by to adjust the orientation to some new reference frame. If there are multiple consecutive scattering events, this means that we have two rotations in a row between each actual scattering. Rather than executing these two rotations, it makes more sense to combine these into a single rotation over the angle between the scattering planes corresponding to the two scattering events. A scattering event is then characterized as
In other words, rather than using some fixed reference direction for the Stokes vector, we simply use the previous scattering plane.
A special case is the first scattering event after emission, as there is not yet a previous scattering plane in this case. But this does not really matter: since the radiation is unpolarized before the first interaction, and the rotation operator is irrelevant.
Scattering in a random walk
Assume we want to simulate a scattering event in a Monte Carlo random walk step at a given location. We know the propagation direction of the photon package before the scattering event , the reference direction and the Stokes vector . We want to generate a random new direction of the photon package, , with a new reference direction and the new Stokes vector . The information which new direction has which probability to occur is represented by the phase function .
Contrary to unpolarized radiation, where the phase function only depends on the scattering angle , it is more complicated in the case of polarized radiation, as it depends on both , the azimuth and on the polarization status of the incoming photon package. To sample and , we follow the steps:
- Calculate the phase function
- Normalize the phase function
- Sample the scattering angle
- Sample the azimuth angle
Calculating the phase function
The phase function is proportional to the intensity of the beam after the scattering event, divided by the intensity before the event.
The intensity after the scattering event can be calculated by multiplying the Stokes vector with the Mueller matrix for all tuples . Assuming the simplified Mueller matrix for scattering at a sphere, the first Stokes parameter after scattering is
and therefore
Using the equation for the degree of linear polarization, we find
Normalizing the phase function
In SKIRT, the integral of the phase function over over the unit sphere should be normalized to . Thus, in our case, the normalization constant is given by,
We can write the properly normalized phase function as
Sampling the scattering angle
In order to sample a random angle from the distribution function, we use the conditional probability technique. For this we reduce the phase function to the marginal distribution
Sampling a random from this distribution can be done using a numerical inversion, i.e. by solving the equation
for , where is a uniform deviate, a random number between and with a uniform distribution function.
Sampling the azimuth angle
Once we know the scattering angle , we determine the random azimuth angle from the normalized conditional distribution
This can again be done using numerical inversion, so by solving the equation
for with a new uniform deviate. Once this random value for has been obtained, we have the tuple with which we will scatter. For a photon package with no linear polarization ( ) all have the same probability.
New propagation direction
Now that we know the scattering angle tuple , we need to calculate the new direction of the photon package given its previous propagation direction and reference direction . We use Rodrigues' rotation formula that allows rotating any vector around any axis by any angle (clockwise while looking along ),
To calculate the new reference direction , we use the physical meaning of the azimuth . It describes the angle between the scattering planes, the angle around which the Stokes parameters are rotated so they are referring to an axis inside the scattering plane. As the reference direction is perpendicular to the Stokes vector direction and the propagation direction , it is perpendicular to the past scattering plane. For it to be perpendicular to the current scattering plane, it needs to be rotated by with the propagation direction as the rotation axis. The resulting vector is the new reference direction . This rotation is calculated by using Rodrigues' Rotation formula,
As is perpendicular to , the third term is zero,
and is the normal of the current scattering plane.
The second step is to rotate the current propagation direction around the normal vector of the current scattering plane by . The resulting vector is the new propagation direction . This is implemented the same way, using Rodrigues' Rotation formula and again the third term is zero,
Thus we obtain the new propagation direction and the new reference direction .
Scattering peel-off
Whenever a photon package scatters, new photon packets are peeled off towards the observer(s). In contrast to random walk scattering the new direction is already known, it is , while the scattering angles are unknown and must be calculated. Also, before detecting the photon packet at the observer, the Stokes reference direction must be rotated so it refers to the -axis of the observer frame, .
Determining the direction angles towards the observer
The scattering angle is easily determined through the cosine of the peel-off scattering angle,
as the scattering angle runs from to , this relation is bijective and the can be used.
To compute , recall that it is the angle between the previous scattering plane and the current scattering plane, or equivalently, the angle between the normal vectors to these scattering planes. The normal of the last scattering plane is . The normal of the current scattering plane can be calculated using the current propagation direction and the direction towards the observer ,
Thus we have
But since can run from to , the relation is not bijective. We need the sine of as well. Since is perpendicular to both and , the relation
holds. Or, after projecting both sides of the equation on ,
so that is fully defined. Once the angles are determined, the Stokes parameters are rotated by (which updates to as well). The Mueller matrix is applied with the scattering angle (and updated to ).
Calculating the normal of the current scattering plane for will cause an exception if the peel off is completely forwards or backwards, but in this case setting is reasonable, as the scattering plane does not need to be updated when scattering forwards or backwards.
Determining the orientation angle at the observer
Once the photon is oriented towards the observer, the Stokes vector reference direction must be oriented so the Stokes parameters refer to the -axis of the observer frame, , as their reference axis. This is equivalent to the reference direction after peeling off, , being oriented towards . The angle between and can be determined equivalently to the determination of , using
and
with which is fully defined.