HelgeGehring / femwell

FEM mode solver for photonic waveguides
https://helgegehring.github.io/femwell/
GNU General Public License v3.0
104 stars 30 forks source link

Add separated component field plotting #132

Closed lucasgrjn closed 6 months ago

lucasgrjn commented 6 months ago

Solve the issue #90 from @lukasc-ubc

Implement plot_component to allow the user to set the field, the direction and the part (real, imaginary or absolute value) to be plotted.

HelgeGehring commented 6 months ago

Looks great! How could we keep it backwards compatible? (At least for the next few versions with a deprecation warning)

lucasgrjn commented 6 months ago

Looks great! How could we keep it backwards compatible? (At least for the next few versions with a deprecation warning)

Good idea! I will take a look into that

lucasgrjn commented 6 months ago

I see to possible way:

  1. the easiest will be to replace the actual .show() by another function like .plot()
  2. just to get some keywords and throw the deprecation warning depending on which one

I prefer the first one since it will enforce people to "learn" to use the new function. What do you think?

lucasgrjn commented 6 months ago

Now, with the last commits, the function should be backward compatible!

HelgeGehring commented 6 months ago

What do you think? I think once we add that we're done?