Photonics

Photonics

LumOpt Issue

    • schinta3
      Subscriber

      Hello,

      I am trying to work through several of the LumOpt examples.I am running through a Jupyter Notebook (through anaconda) as recommended here (https://lumopt.readthedocs.io/en/latest/install.html). I am using the current v222 api as opposed to the clone from github which uses a previous version.

      -I can successfully import lumapi within the notebook, and run the gui through "fdtd = lumapi.FDTD()".

      Two issues come up with plotter.py 

      1) 

      C:\Program Files\Lumerical\v222\api\python\lumopt\utilities\plotter.py:61: 
      UserWarning: Matplotlib is currently using module://matplotlib_inline.backend_inline, which is a non-GUI backend, so cannot show the figure. self.fig.show()

      I dont think(?) this is a huge issue as the optimzation runs. %matplotlib inline is usually the recommended backend.
      Is there a way to fix this?
      ------------------------------------------------------------------------------------------------------------------------------------------------
      2)
      File C:\Program Files\Lumerical\v222\api\python\lumopt\utilities\plotter.py:29, in SnapShots.finish(self)
           28 def finish(self):
      ---> 29     self._frame_sink().close()
      
      AttributeError: 'SnapShots' object has no attribute '_frame_sink'

      The WDMsplitter.py script runs fine from the Lumerical GUI, but this error is always thrown through a notebook.
      How should I address this to do interactive python development?

    • Guilin Sun
      Ansys Employee

      The sepcialist  in this subject is in holiday. I try my best to help you.

      From my limited experience, using the Lumerical built-in Python is the best. I strongly suggest that you uninstal your version of Python, and Lumerical. clean everything, and then reinstall the Lumerical software.

      Please try.

       

       

       

    • schinta3
      Subscriber

      Hi, no problem, thank you for your help.

      Using the built-in python works fine, however the issue remains with interfacing with a notebook.

      The reason I am using a notebook is because there doesn't seem to be a useful python debugger within the lumerical script editor. 

      Thank you, I can wait until the specailist gets back. Have a good holiday season

    • schinta3
      Subscriber

      I have fixed the error I mentioned before by switching to a non-Anaconda environment. However, is there a way to use LumOpt with a source that is not a mode source and an appropriate fom monitor/functon?

       

    • Guilin Sun
      Ansys Employee

      Thank you for letting me know. It is possible, but you need to develop your own model. I would suggest you to get more information from the original develpoer. please search "LumOpt ".

       

    • schinta3
      Subscriber

      Hi,

      One more question. The model I have developed is similar to a photonic crystal slab. One of the parameters I would like to optimize over is the lattice constant. Since this involves periodic boundary conditions, the size of the fdtd simulaton region itself would be dynamically rescaled per simulation if the lattice constant changes. Is this possible within lumopt?

      From https://lumopt.readthedocs.io/en/latest/tutorial.html#lumerical-setup-script it seems the setup script considers the 'optimizable geometry' objects to be in a static simulation area...

    • Guilin Sun
      Ansys Employee

      We do not have similar example however we encourage customers to explore the possibility, with some efforts.

Viewing 6 reply threads
  • You must be logged in to reply to this topic.