from holocronweaver =at= gmail =dot= com
Hello all,
While it seems most of contribs/wigner.h was ported to specfunc/gsl_sf_coupling.h, the Wigner (small) dmatrix was not. Indeed, the wigner_drot function seems to be the only reason for keeping the contribs file around. Is there a particular reason this function has not been ported? If not, what would porting it entail?
I assume the main obstacle is adding tests and verifying the implementation. Asis, simply copy/pasting the files into specfunc/, renaming them according to gsl convention, and adding the necessary lines to specfunc/Makefile.ac allows me to compile wigner.h into the library asis.
I manually tested the function via a wrapper I wrote in Julia and was able to reproduce the expected results for j = 1/2, 1, 3/2, and 2 (i.e. j = int 1, 2, 3, 4 according to the parameter convention of multiplying by two to get an integer). All results were as expected based on the analytic formula on Wikipedia: https://en.wikipedia.org/wiki/Wigner_Dmatrix#List_of_dmatrix_elements
For example, for j = m' = m = 3/2 (i.e., int 3) and theta = 3/4 * pi:
julia> theta = 3/4 * pi
julia> (1 + cos(theta)) / 2 * cos(theta/2)
0.05604269114599566
julia> sf_wigner_drot(3, 3, 3, theta)
0.05604269114599567
It seems strange to have the Wigner coefficients but not the rotation matrix, and I am sure others would find it useful, so please consider allowing this addition.
