In previous versions of FDTD Solutions, the import source was allowed with a single wavelength: Broadband Imported Source
so in the example , https://kb.lumerical.com/ref_sim_obj_custom_source_profile_from_oth.html
The script file has those lines
In recent versions, Lumerical has introduced a feature allowing multifrequency source : https://kb.lumerical.com/ref_sim_obj_mode_source_-_broadband.html
So the imported source can also allow source fields as a function of frequency. Such frequency (wavelength) dependency can be from explicit or implicit expressions such as an differential equations, or from monitors.
If it is from a monitor, you only need to first extract E and H from the monitor, and then create a dataset that contains both E and H, then import it.
I modified the grating coupler example to have only the fiber for simulation, and the result is as follows:
the largest absolute error in transmission is 1%.
Interestingly, The single frequency at the center works better for this specific exmple:
here are the script files and fsp file for your test:
grating_coupler_2D_tilted.fsp (2.5 MB)
I also tested 3D fiber, and it works fine for both single and multi-frequency data for import.
In case for your own simulation the error is very large, eg, larger than 5%, or you can see clearly the back scattering from the source, please contact Lumerical support with your files attached so we can have a close look at this issue.
A similar post in Chinese is here 关于自输入多波长光源的问题和脚本