Dear Amos,
Thank you again! When I set the value of lmax to 20, the results of my program fit the data in your article much better than before! By the way, can I ask you some other questions?
When I calculate the reflectance of randomly distributed particles in a medium, I include an intermediate layer of finite thickness, which has an imaginary part of the refractive index. Although the value of the imaginary part is not significant, its influence needs to be taken into account. At certain values of wavelength, my program gives the error: complex angles are not allowed, while at other values of wavelength this error does not occur. By debugging the program at the time of the error, I found that in the periodic_pwe_to_ff_conversion function, the imaginary part of a polar angle of about 1e-35 was calculated. This value is very small and insignificant, can I ignore this imaginary part and continue the calculation? Will this lead to incorrect results?
I would be grateful if you could take the time to give me some guidance.
Best regards,
Song Zhengxin