You’ll need 2 windows:
- A text editor or IDE (Visual Studio Code, Pycharm, Spyder, neovim, Atom, Jupyterlab ...)
- Klayout to Visualize the GDS files. With the
klive
klayout package for showing GDS files when you run. Tools -> Manage PackagesComponent.show()
1. Standard Python flow¶
- You write your PCells in python.
- You execute the python code.
- You visualize the GDS Layout in Klayout.
![windows](/gdsfactory/build/c0294d78ad1a279cde08ebd5ab9944d7.png)
The standard python flow can leverage all machine learning tools such as Jupyter notebooks.
![notebooks](/gdsfactory/build/c0150392aa030ab3df1cd40a6f056158.png)
2. File-watcher flow¶
For building large components can use a file-watcher and see your updates in KLayout.
- You execute the file watcher
gf watch FolderName
or in the current working directorygf watch
- The file-watcher re-runs any python file
.py
or YAML.pic.yaml
. - Thanks to the
cell
cache you can see your new component changes live updating the layout in Klayout.
![filewatcher](/gdsfactory/build/51d458e939ab18f93ee35789dcdfa894.png)
3. Webapp flow¶
You can also use a webapp to:
- visualize your PDK components and change the Parametric Cell (PCell) settings.
- visualize the GDS layout of the last saved files in a particular directory.
- turn on a file watcher and watch changing files in specific folders.
To run the webapp you can just run gf webapp
in the terminal. By default it will use the generic_pdk
technology.
To use a different PDK you can use the --pdk
flag. For example gf webapp --pdk ubcpdk
.