I am trying to calculate the optimum overlap with the fundamental mode of an SMF-28 (saved from project file provided here: https://kb.lumerical.com/en/pic_passive_fibers_smf-28_fiber.html)
I am sweeping the waveguide geometry, and using the bestoverlap function to find the mode with the best overlap with the fiber’s fundamental mode.
Then I use: overlap(best_overlap_mode, fiber_mode, 0, core_center, 0) to re-center the fiber mode, saved in the d-card, to the center of my waveguide. However, this position is not always the best position of the fiber mode as clicking on the ‘optimize position’ in the overlap analysis tab may produce a better overlap figure at a different fiber-center coordinates/shifts.
My first question is that I can use the optimizeposition function to get this improved overlap, is this correct?
My second question is: the bestoverlap function returns a string containing the name of the mode with the best overlap, but the optimizeposition function expects, as its first argument, the number of the mode. Does this mean that I need to do some string processing in order to pass the mode found from bestoverlap to optimizeposition, or is there a more direct way?