If you have a directivity and sensitivity function f(alpha, beta, freq) with
alpha the angle in
xy-plane,
beta the angle in
xz-plane, and
freq the ray frequency, then the function to modify the ray power/intensity is as follows:
where Q is the base intensity,
rac.relb1.Ntf is the total number of rays released, and
rac.racop1(f) weighs the function
f, for the normalization of the task.