SiEPIC / SiEPIC-Tools

Package for KLayout to add integrated optics / silicon photonics functionality (waveguides, netlist extraction, circuit simulations, etc)
Other
184 stars 92 forks source link

Adding a Makefile and fix a bug related to the "Path to waveguide" feature. #186

Closed olofsjod closed 1 year ago

olofsjod commented 2 years ago

Hi.

I am taking the course in Silicon Photonics as part of my PhD studies at KTH Royal Institute of Technology. Came across a bug where the circuit simulation in Lumerical INTERCONNECT started from KLayout is non-functioning on Linux (i.e. Ubuntu 22.04 LTS). After pressing "Simulation" in KLayout one will find that:

INTERCONNECT: " Checking for errors... Found empty result: input 1/mode 1/gain in element ona_1

I have investigated this error and found out that SiEPIC-Tools generates a SPICE file without prepending Design kits/ with the library name EBeam. This occurs at the time one uses the function "Path to Waveguide" in KLayout.

By applying the following patch as I have included under https://github.com/SiEPIC/SiEPIC-Tools/commit/722f58cc6f39137dd74859b3734ce1fb37dace25 I have successfully resolved the issue. With that said, I have no idea whether this is the "right" solution to the problem.

I've also included a Makefile which was of help when I developed this patch. To install the patch on Ubuntu, all you need to do is to type the following commands in the terminal (while being in the same folder as the Makefile):

sudo apt install crudini
make all

The software crudini was preferred to sed and grep when because it was cleaner in terms of readability. The "only" price to pay is portability. :-)

I would be glad to get feedback from the maintainer about this pull request.

Kind regards, Olof