Quality diagrams with PyCirkuit Orestes Mas (orestes@tsc.upc.edu) Polytechnic University of Catalonia 2nd February 2020 , FOSDEM 20
Quality diagrams with PyCirkuit Orestes Mas (orestes@tsc.upc.edu) Polytechnic University of Catalonia 2nd February 2020 , FOSDEM 20
The problem I need to draw circuits and diagrams! Orestes Mas (orestes@tsc.upc.edu) - UPC Quality diagrams with PyCirkuit 2nd February 2020 , FOSDEM 20
The problem I need to draw circuits and diagrams! Orestes Mas (orestes@tsc.upc.edu) - UPC Quality diagrams with PyCirkuit 2nd February 2020 , FOSDEM 20
The problem I need to draw circuits and diagrams! Orestes Mas (orestes@tsc.upc.edu) - UPC Quality diagrams with PyCirkuit 2nd February 2020 , FOSDEM 20
The problem I need to draw circuits and diagrams! Orestes Mas (orestes@tsc.upc.edu) - UPC Quality diagrams with PyCirkuit 2nd February 2020 , FOSDEM 20
2nd February 2020 + Quality diagrams with PyCirkuit Orestes Mas (orestes@tsc.upc.edu) - UPC π 2 π 1 π ππ + π π π π π€ πΏ + β π π π€ π¦ β πΎπ π π π π π , π€ πΏ , π 2 , πΎπ π symbols Requirements we have Why PyCirkuit? βΆ Beautiful ( publishing quality ) βΆ Large library of predefined βΆ Uniform style (donβt mix libraries) βΆ Parametrizable symbols βΆ Consistent typography : βΆ Free formats, tools and systems , FOSDEM 20
2nd February 2020 + Quality diagrams with PyCirkuit Orestes Mas (orestes@tsc.upc.edu) - UPC π 2 π 1 π ππ + π π π π π€ πΏ + β π π π€ π¦ β πΎπ π π π π π , π€ πΏ , π 2 , πΎπ π symbols Requirements we have Why PyCirkuit? βΆ Beautiful ( publishing quality ) βΆ Large library of predefined βΆ Uniform style (donβt mix libraries) βΆ Parametrizable symbols βΆ Consistent typography : βΆ Free formats, tools and systems , FOSDEM 20
2nd February 2020 π π90β Quality diagrams with PyCirkuit Orestes Mas (orestes@tsc.upc.edu) - UPC problems EX+ Ti k Z ! T A L π π330β π π300β π π270β π π240β π π210β π π180β π π120β π π150β π π60β π π30β π π0β Chosen solution Insert graphic commands into a L A T EX document \begin {tikzpicture} \draw [step=0.25,color=blue!20,very thin] (-1.8,-1.6) grid (1.8,1.6); \foreach \ang in {0,30,...,330}{ \draw [color=red] (0,0) to[R, -*] ( \ang :1.1); οΏ½ Perfect text/graphics integration. \node at ( \ang :1.35) { \tiny $e^{j\ang^\circ}$}; } \end {tikzpicture} οΏ½ Programmability & flexibility οΏ½ Mathematical formulae pose no οΏ½ Good circuit library (circuitikz) οΏ½ Vector graphics , FOSDEM 20
The end of the tunnel? Not yet... CircuiTi k Z seemed the right tool, but... Circuit Macros! Orestes Mas (orestes@tsc.upc.edu) - UPC Quality diagrams with PyCirkuit 2nd February 2020 βΆ Too much use of absolute coordinates to position elements βΆ Aesthetical issues , FOSDEM 20
What is PyCirkuit? In short: circuits Orestes Mas (orestes@tsc.upc.edu) - UPC Quality diagrams with PyCirkuit 2nd February 2020 βΆ A program to help drawing those βΆ Written in Python 3 + PyQt5 βΆ 2 modes of operation: βΆ GUI βΆ CLI / Batch mode , FOSDEM 20
PyCirkuit - How it works Phase 1: The Β«Circuit MacrosΒ» source file m4 .pic file Circuit macros Orestes Mas (orestes@tsc.upc.edu) - UPC Quality diagrams with PyCirkuit 2nd February 2020 , FOSDEM 20
2nd February 2020 T Quality diagrams with PyCirkuit Orestes Mas (orestes@tsc.upc.edu) - UPC EX T A L Generic PDF PostScript SVG xfig EX Β«pictureΒ» A L eepicemu mfpic MetaPost PostScript+psfrag PSTricks PGF-TikZ dpic file .pic Phase 2: The Dpic PyCirkuit - How it works , FOSDEM 20
2nd February 2020 pdfL Quality diagrams with PyCirkuit Orestes Mas (orestes@tsc.upc.edu) - UPC .png pdfuoppm .pdf Template EX A T .tikz dpic .pic Macros Circuit m4 file source Phase 3: Visualisation The PyCirkuit , FOSDEM 20
2nd February 2020 pdfL Quality diagrams with PyCirkuit Orestes Mas (orestes@tsc.upc.edu) - UPC .jpg .png pdfuoppm .pdf Template EX A T .tikz .svg dpic .pic Macros Circuit m4 file source Phase 4: Exporting and Extra bonus The PyCirkuit , FOSDEM 20
PyCirkuit Installation Outside Debian you must install some PyCirkuit dependencies by hand. See README file on GitHub project page. Orestes Mas (orestes@tsc.upc.edu) - UPC Quality diagrams with PyCirkuit 2nd February 2020 βΆ On Debian Testing (Bullseye) is straightforward: apt-get install pycirkuit βΆ From PyPI (recommended for MacOs/Windows) pip install pycirkuit βΆ From GitHub pip install git+https://github.com/orestesmas/pycirkuit.git , FOSDEM 20
Demonstrations
Demo Graphical User Interface Orestes Mas (orestes@tsc.upc.edu) - UPC Quality diagrams with PyCirkuit 2nd February 2020 , FOSDEM 20
Demo Command-Line Interface Orestes Mas (orestes@tsc.upc.edu) - UPC Quality diagrams with PyCirkuit 2nd February 2020 , FOSDEM 20
Future work Whatβs planned? Primary goals Secondary goals Orestes Mas (orestes@tsc.upc.edu) - UPC Quality diagrams with PyCirkuit 2nd February 2020 βΆ Documentation and code cleaning βΆ Supporting/improving other input and output formats βΆ Improve the editor βΆ Allow simultaneous drawings on GUI βΆ Configurable workflows. Plugin-based architecture? βΆ Become a KDE project? (KDE - Python bindings!) , FOSDEM 20
Relevant links Main Other Orestes Mas (orestes@tsc.upc.edu) - UPC Quality diagrams with PyCirkuit 2nd February 2020 βΆ GitHub repo: https://github.com/orestesmas/pycirkuit βΆ PyPI repo: https://pypi.org/project/pycirkuit/ βΆ PIC language: http://plan9.bell-labs.com/10thEdMan/pic.pdf βΆ PIC tutorial: http://floppsie.comp.glam.ac.uk/Glamorgan/gaius/web/pic.html βΆ Dpic site: https://ece.uwaterloo.ca/~aplevich/dpic/ βΆ Circuit Macros: https://ece.uwaterloo.ca/~aplevich/Circuit_macros/ , FOSDEM 20
2nd February 2020 projects! Acknowledgements EX and L A T EX Quality diagrams with PyCirkuit Orestes Mas (orestes@tsc.upc.edu) - UPC βΆ Donald Knuth & Leslie Lamport: For giving us T βΆ Till Tantau: Author of Ti k Z (and Beamer too) βΆ Dwight Aplevich: Circuit Macros and Dpic author βΆ Matteo Agostinelli: βcirkuitβ application βΆ Aniol Marti & Γlex Muntada: Debian packages for dpic , circuit-macros and pycirkuit βΆ ...and the free sofuware community for the contributions to these , FOSDEM 20
Thank you!
Recommend
More recommend