demisjohn / pyFIMM

Python Interface to PhotonDesign's FimmWave/FimmProp software.
15 stars 4 forks source link

Device.set_input(): check max N of the particular element #74

Open demisjohn opened 8 years ago

demisjohn commented 8 years ago

Currently I think it uses the global get_N(), but it would be better if it used the Element's specific maxnmodes, since different elements may have different number of calc'd modes (eg. straight WG might only have one, while two output WG's may have 3 or 4).

Here's how you get this number: Device_156351.cdev.eltlist[5].mlp.maxnmodes

demisjohn commented 8 years ago

Make sure to use the Device.elementpos array, to automatically account for referenced nodes.