For linear polarization, you can do two seperate simulations with x and y polarized source (z propagation), calculate polarized transmission by integrating the individual Poynting vector; or you use a 45 deg polarized light. for example,
PoyntingV=Ex*conj(Hy)-Ey*conj(Hx) is the total
PoyntingV_Y=-Ey*conj(Hx); Y polarized
then you integrate them: integrate - Script command
Do not forget 0.5 and use the real part:https://optics.ansys.com/hc/en-us/articles/360034405354-transmission-Script-commandhttps://optics.ansys.com/hc/en-us/articles/360034405354-transmission-Script-command
and normalize with sourcepower:https://optics.ansys.com/hc/en-us/search?utf8=%E2%9C%93&query=sourcepower
For circular polarization, you have to decompose the monitor data from Ex,Ey, Hx and Hy into EL,ER, and HL, HR, and then do the same thing.
Please note that this is based on the assumption that the near field does not have higher order diffraction. In case it has, you will need to use grating analysis (supose it is periodic, or "s param“ analysis group otherwise) to get the farfield Ep, Es, and then calculate their power. In this case you can get the power from the optical intensity: https://forum.ansys.com/forums/topic/ansys-insight-guangxueqiangdugongludianchangqiangdupingfangdeguanxiyijidiancinengliang/
Since it is plane wave (at least in the farfield), directly use abs(E)^2 is ok. However if it is angled, you may need to correct the cosine factor.
Please find some reference papers for the decomposition.