SKIRT / SKIRT9

SKIRT version 9 -- advanced radiative transfer in dusty systems
http://www.skirt.ugent.be
GNU Affero General Public License v3.0
37 stars 31 forks source link

Add FilePolarizedPointSource, using user-tabulated emission properties #207

Closed petercamps closed 8 months ago

petercamps commented 8 months ago

Description This pull request adds the FilePolarizedPointSource class, representing a primary source limited to a single point in space and emitting polarized radiation with an axi-symmetric angular dependence. The Stokes vector components of the emitted radiation, as a function of wavelength and inclination angle cosine, are loaded from a user-provided file. The bolometric output is characterized by a LuminosityNormalization object configured in the ski file. The class furthermore offers user-configured properties to specify the position of the point source, the orientation of the symmetry axis of the angular dependence, and a "bulk" velocity.

Motivation This functionality was requested by the IXPE team in Rome through @BertVdM for use in AGN models.

Secondary changes The Direction class has been updated to assist client code with ensuring proper normalization of the three coordinates. Specifically, all constructors and setters now include a Boolean normalize argument, indicating whether the constructor/function should perform normalization. The motivation for this change is that we discovered a few instances where unnormalized directions were constructed. The impact on results was insignificant, but this may not always be the case.

The StoredTable template class has been updated to allow direct public access to the table elements through indices. In cases where this is meaningful, it is much faster than obtaining interpolated quantities for arbitrary axis values.

Tests The new FilePolarizedPointSource class has undergone several "lab" tests but more in-depth testing is required before using it in "production".