I checked the simulation file setup, and one issue that I noticed is that the TFSF source does not fully enclose the “grating” rectangle structure which is the object that is scattering the light that gets imaged. The following page mentions that for the TFSF source to work properly, the boundaries of the source cannot extend through the scattering object:
To correct this, you could extend the y span of both the source and simulation region so that they are large enough to enclose the full length of the “grating” object.
The x and y span of the monitor may also be increased to make sure that the size of the monitor is large enough to collect all of the scattered light, even light travelling at steep angles.
It is still possible to use the phase_contrast_batch_run.lsf script file to vary the “angle phi” setting of the TFSF source to simulate the source incident at different azimuthal angles from the annulus.
The phase_contrast_analysis.lsf script would need some modification since it is using the grating projection script commands which are meant for periodic simulations (gratingpolar, gratingu1, gratingu2), and these would need to be replaced by near to far field projection script commands which are meant for standalone structures (farfieldpolar3d, farfieldux, farfielduy). The details about these near to far field projection script commands are here:
And there is also an example showing simulation of microscopy imaging using these script commands here:
Rather than modifying the phase_contrast_analysis.lsf script file, it may be easier to modify the scripted analysis from the microscopy imaging example linked above and add a for loop to loop through each simulation file with different source angle and sum the resulting E intensity images from all of the files together to get the final result.
Hopefully this helps!