automatic mode rotation for bent waveguide
@momchil-flex This is a very initial draft and not ready for review yet, but could you take a quick look at the code structure to see if there are any major mistakes so I can address them early on? I added a field bend_correction in mode_spec, and the process for mode rotation is mostly in data_raw in ModeSolver.
Adding some initial comments, overall the structure makes sense. So is this working currently? We'll obviously need to add a bunch of tests too.
Thanks! I’ve validated the process locally with several cases involving differently oriented bends, and I’ll add those to the tests. This PR isn’t fully working yet, but it’s close. I’ll wrap up the code based on your feedback.
Almost there. One other thing is that this will go in 2.8, not in develop. One way to switch is something like:
git checkout -b backup/mode_rotation git checkout qiming/mode_rotation git fetch git reset --hard origin/pre/2.8 git cherry-pick 8a718b6^..df06ea9 # I selected the sha-s of the three commits in this branch as of their current state but these could change if you e.g. rebase git push -f origin qiming/mode_rotation # and then update the PR base here to be pre/2.8
This is very helpful, much appreciated.