{ "info": { "author": "\u79cb\u7eab", "author_email": "qrqiuren@users.noreply.github.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)" ], "description": "# PySFG\n\n[![Build Status](https://travis-ci.com/qrqiuren/PySFG.svg?branch=master)](https://travis-ci.com/qrqiuren/PySFG)\n\nA package for symbolic signal flow graph analysis.\n\nThe input reads a text file in a human-friendly coding format to describe the\nsignal flow graph. The program is able to calculate the transfer function\nbetween two nodes.\nThe resulting symbolic expressions are easily interoperatable with\n[Sympy](https://www.sympy.org/) and other scientific packages.\n\nRequires Python >= 3.6.\n\n## Installation\n\n### For Users\n\n```bash\n$ pip install pysfg\n```\n\n### For Hackers\n\n```bash\n$ git checkout https://github.com/qrqiuren/PySFG.git\n$ cd PySFG\n$ python setup.py develop\n```\n\n## Tutorial\n\nThe signal flow graph is a good tool for various fields of engineers. Various\nkinds of systems in real world engineering would be easily converted to signal\nflow graphs.\n\nLet's take an example. Suppose we have the following signal flow graph from an\nelectronic system.\n\n![Electronic system](https://upload.wikimedia.org/wikipedia/commons/a/a1/Circuit_with_two_port_and_equivalent_signal_flow_graph.png)\n\nThen, we can convert the graph into the following code `twoport.yml`:\n\n```yml\n# The `#` symbol starts a line of comment\n\n# Define source nodes, sink nodes and other nodes\nsources:\n - Vin\nsinks:\n - V2 # We can use V2 directly as the sink node\nnodes:\n - V1\n - I1\n - V2\n - I2\n\n# Define edges\n# Each edge has a format of `u ~> v: f`, where the edge points from node `u`\n# to node `v`, with a transfer function of `f`. `f` is convertible to a\n# SymPy expression.\n# Fire Code is recommended to render `~>` symbol prettier.\nedges:\n Vin ~> V1: 1 # Constants are acceptable\n\n # Admittance matrix\n V1 ~> I1: y11 # Symbols are acceptable\n V2 ~> I1: y12\n V1 ~> I2: y21\n V2 ~> I2: y22\n\n # Impedances\n I1 ~> V1: -Rin # Expressions are acceptable\n I2 ~> V2: -RL\n```\n\nThe code format is a subset of YAML (or \"StrictYAML\"). It avoids some\nambiguous syntax in YAML by default, while reserves the human-friendly\ncoding style.\n\nRun the following Python commands to load and solve the transfer function\nfrom node `Vin` to node `V2`:\n\n```python\n>>> from pysfg import SignalFlowGraph\n>>> sfg = SignalFlowGraph('twoport.yml')\n>>> tf = sfg.find_graph_gain('Vin', 'V2')\n>>> print(tf)\n-RL*y21/(RL*Rin*y11*y22 - RL*Rin*y12*y21 + RL*y22 + Rin*y11 + 1)\n```\n\nThe result is a SymPy expression. It can be further used for calculation\nin other programs.\n\n# Task List\n\n- [ ] Implement hierarchichal signal flow graph", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/qrqiuren/PySFG", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "pysfg", "package_url": "https://pypi.org/project/pysfg/", "platform": "", "project_url": "https://pypi.org/project/pysfg/", "project_urls": { "Homepage": "https://github.com/qrqiuren/PySFG" }, "release_url": "https://pypi.org/project/pysfg/0.1.1/", "requires_dist": null, "requires_python": ">=3.6", "summary": "A Python package for symbolic signal flow graph analysis.", "version": "0.1.1" }, "last_serial": 5934223, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "d0a5103cca616d71a26d939bb6730e61", "sha256": "49c8b8220f705c5a707f974f20436083e6ede54dbc374a85f64fcd92823c5e6f" }, "downloads": -1, "filename": "pysfg-0.0.1.tar.gz", "has_sig": false, "md5_digest": "d0a5103cca616d71a26d939bb6730e61", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 3214, "upload_time": "2019-09-30T09:13:46", "url": "https://files.pythonhosted.org/packages/0d/b3/988aa2a2e96f42525474228eab2a4832a06ab5e0ac76423818dbac188f63/pysfg-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "6ef18a98bb987456b49fd074156b3e95", "sha256": "4251c22c5d9454c8f280b5137c12800d7fdb3ea217fa6f9388e35a8bfcf6b73a" }, "downloads": -1, "filename": "pysfg-0.0.2.tar.gz", "has_sig": false, "md5_digest": "6ef18a98bb987456b49fd074156b3e95", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 3213, "upload_time": "2019-09-30T11:21:00", "url": "https://files.pythonhosted.org/packages/b7/63/734b06b57559af9ea8bf7c42a227aef75b3f638c4d54d0638599b0de148e/pysfg-0.0.2.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "ef53cd80ff31c12202b23358ba0521c9", "sha256": "35dd81f3244d00c7b22cbe4ba0f39e9fa243dc09e065a75322b4424490db5272" }, "downloads": -1, "filename": "pysfg-0.1.1.tar.gz", "has_sig": false, "md5_digest": "ef53cd80ff31c12202b23358ba0521c9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 4536, "upload_time": "2019-10-06T08:36:04", "url": "https://files.pythonhosted.org/packages/e9/53/ced13d8783c634e9b34ca0076045dba79c35832e63636aaa177870ac7326/pysfg-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ef53cd80ff31c12202b23358ba0521c9", "sha256": "35dd81f3244d00c7b22cbe4ba0f39e9fa243dc09e065a75322b4424490db5272" }, "downloads": -1, "filename": "pysfg-0.1.1.tar.gz", "has_sig": false, "md5_digest": "ef53cd80ff31c12202b23358ba0521c9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 4536, "upload_time": "2019-10-06T08:36:04", "url": "https://files.pythonhosted.org/packages/e9/53/ced13d8783c634e9b34ca0076045dba79c35832e63636aaa177870ac7326/pysfg-0.1.1.tar.gz" } ] }