/signalflowgrapher

This Python tool allows you to draw signal-flow graphs, calculate transfer functions (SymPy code is generated for further use in Jupyter notebooks), do graph manipulations (e.g., node elimination and graph transposition), and save a graph as TikZ for use in LaTeX documentation.

Primary LanguagePythonArtistic License 2.0Artistic-2.0

SignalFlowGrapher

Version 0.2

Intended for beta test in the autumn term of 2020.

This version still has some issues and may crash; be careful and save often.

And please report all issues you find to hanspeter.schmid@fhnw.ch

License

This package is distributed under the Artistic License 2.0, which you find in the file LICENSE and on the internet on https://opensource.org/licenses/Artistic-2.0.

Authors of Version 0.2

Simon Näf, Nicolai Wassermann, Dominik Gruntz and Hanspeter Schmid. Contact author: hanspeter.schmid@fhnw.ch

Installation instructions

Installation of plain Python or of Anaconda

Get the code

Create and activate virtual environment with Python

For the managment of the dependencies, a virtual enviromnent is used.

  • Open the src directory in a terminal
  • Create virtual environment using the command python3 -m venv signalflowgrapher
  • On Windows run signalflowgrapher\Scripts\activate.bat or signalflowgrapher\Scripts\Activate.ps1
  • On Unix or MacOS run source signalflowgrapher/bin/activate

Create and activate virtual environment with Anaconda

For the managment of the dependencies, a virtual enviromnent is used.

  • Open the src directory in an anaconda terminal
  • Create virtual environment using command conda create -n sfg
  • Activate virtual environment using the command conda activate sfg
  • Install pip with conda install pip

Restore dependencies

  • Open the src directory in a terminal or an anaconda terminal
  • Run pip install -r requirements.txt

Run application

  • Open the src directory in a terminal or an anaconda terminal
  • Run python -m signalflowgrapher
  • Run python -m signalflowgrapher --language de_CH for using the application with german translations

Run unit tests and format tests

  • Open the src directory in a terminal or an anaconda terminal
  • Run python -m unittest
  • Run flake8 -v

User manual

There is none yet, but to familiarize yourself with signal-flow graphs, you can

Credits

Implemention of Johnson's algorithm: https://github.com/qpwo/python-simple-cycles