{ "info": { "author": "goncalo-godwitlabs", "author_email": "goncalo@godwitlabs.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.7", "Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)" ], "description": "# Spice Raw Parser (spr)\n\nA tiny Python package to parse spice raw data files.\n\n## Getting Started\n\nThese instructions will get you a copy of the package up and running on your local machine.\n\n**Note: at the moment only ascii raw spice format is supported!**\n\n### Installation\n\n#### From PyPI\n```\npip install spr\n```\n\n#### From source code\n\n```\npip install git+https://github.com/goncalo-godwitlabs/spr.git\n```\n\nor\n\n```\ngit clone git@github.com:goncalo-godwitlabs/spr.git\ncd spr/\nmake install\n```\n\n### Usage\n\nJust run:\n\n```\nfrom spr import load_raw\ndata = load_raw(\"/path/to/rawspice.raw\")\n```\n\n### Data structure\n\nA properly parsed raw spice file by `load_raw()` returns a dictionary with the following structure:\n\n```\n{\n \"title\": ,\n \"date:\": ,\n \"plotname:\": ,\n \"flags:\": ,\n \"no_vars:\": ,\n \"no_points:\": ,\n \"vars\": [\n { \"idx\": , \"name\": , \"type\": },\n { \"idx\": , \"name\": , \"type\": }\n ...\n { \"idx\": , \"name\": , \"type\": }\n ]\n \"values\": {\n \"var1\": ,\n \"var2\": ,\n ...\n \"varN\": \n }\n}\n```\n\nWhere values `values` is a numpy structured array with the actual data.\n\n## Examples\n\nThe following examples make use of ngspice to run the spice simulations, so please ensure it is installed.\nOn ubuntu that would be:\n```\nsudo apt install ngspice\n```\n\n### Inverting amplifier with an opamp LM741\n\nCheck the directory `examples/amplifier/` for details on the cirtcuit and the simulation files.\n\nThe schematic:\n\n![](examples/amplifier/schematic.png)\n\nRun the simulation with:\n\n```\ngit clone git@github.com:goncalo-godwitlabs/spr.git\ncd spr\nmake run-example-amplifier\n```\n\nwhich will fire ngspice generating output.log and rawspice.raw files and also plots the voltages `vin` and `vout`.\n\n![](examples/amplifier/plot.png)\n\n\n## Second order low pass filter with an opamp LM741\n\nCheck the directory `examples/lp_filter/` for details on the cirtcuit and the simulation files.\n\nThe schematic:\n\n![](examples/lp_filter/schematic.png)\n\nRun the simulation with:\n\n```\ngit clone git@github.com:goncalo-godwitlabs/spr.git\ncd spr\nmake run-example-lp_filter\n```\n\nwhich will fire ngspice generating output.log and rawspice.raw files and also plots the gain `vout`/`vin` in dB.\n\n![](examples/lp_filter/lp_filter.png)\n\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details\n\n\n", "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/goncalo-godwitlabs/spr", "keywords": "spice matplotlib rawspice raw", "license": "", "maintainer": "", "maintainer_email": "", "name": "spr", "package_url": "https://pypi.org/project/spr/", "platform": "", "project_url": "https://pypi.org/project/spr/", "project_urls": { "Bug Reports": "https://github.com/goncalo-godwitlabs/spr/issues", "Homepage": "https://github.com/goncalo-godwitlabs/spr", "Source": "https://github.com/goncalo-godwitlabs/spr" }, "release_url": "https://pypi.org/project/spr/0.2.1/", "requires_dist": [ "matplotlib (>=2.2.2)", "numpy (>=1.14.2)", "matplotlib (>=2.2.2); extra == 'dev'", "numpy (>=1.14.2); extra == 'dev'", "pylint (>=1.8.4); extra == 'dev'", "autopep8 (>=1.3.5); extra == 'dev'", "ipython (>=5.6.0); extra == 'dev'", "twine (>=1.11.0); extra == 'dev'" ], "requires_python": "", "summary": "A tiny Python package to parse spice raw data files", "version": "0.2.1" }, "last_serial": 3827446, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "9da5b5e5d0bed1f3d0b81d101097c3b0", "sha256": "09458a4a2aba5c05cab78a8c6389eccb1342b86ba7185bd300ba6cd4b8a79d6c" }, "downloads": -1, "filename": "spr-0.1.0-py2-none-any.whl", "has_sig": false, "md5_digest": "9da5b5e5d0bed1f3d0b81d101097c3b0", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 3328, "upload_time": "2018-04-28T05:14:10", "url": "https://files.pythonhosted.org/packages/ac/57/1c7bb6696c9a4af9328e04def72d57cc41a8712caf628956dc55d2f69bcc/spr-0.1.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2d28faf2be825692b0eb9360927153d5", "sha256": "ab1415e021520af0bf6fc3ebae470356c6b7a6542014c22f9bfc7f34a3c49f1d" }, "downloads": -1, "filename": "spr-0.1.0.tar.gz", "has_sig": false, "md5_digest": "2d28faf2be825692b0eb9360927153d5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3046, "upload_time": "2018-04-28T05:14:11", "url": "https://files.pythonhosted.org/packages/ec/56/c5d28c242fa3092adc31da11f24d2b849f90fce413acedb251132d9b9e08/spr-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "180911afe341721575ad027667cb0d43", "sha256": "eb810ace2741472cc0fd7bf57a0ab2b77cb431e42dd2e618bb5357c4d7333d94" }, "downloads": -1, "filename": "spr-0.2.0-py2-none-any.whl", "has_sig": false, "md5_digest": "180911afe341721575ad027667cb0d43", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 3690, "upload_time": "2018-04-28T18:46:20", "url": "https://files.pythonhosted.org/packages/54/bd/1bd92c28a37148e8ff425f718641dcb9059f8540003d66c2802ddffdaf07/spr-0.2.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "da7d674e2b7f36dbcf274ee8aa1a4db3", "sha256": "008b493f78d75a1701b9e4ff8a2fde314b3c2934d2f0105ca9dea5816ec0e69d" }, "downloads": -1, "filename": "spr-0.2.0.tar.gz", "has_sig": false, "md5_digest": "da7d674e2b7f36dbcf274ee8aa1a4db3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3403, "upload_time": "2018-04-28T18:46:21", "url": "https://files.pythonhosted.org/packages/ee/84/e576cf0050173ec7cf34115202ad7838fcf315e5fcb628fbcd136e40b1d5/spr-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "2967eec1da3551d09a1f3f9335eba9be", "sha256": "ae44021c85638fd0b6b3447368e8f8ce38737b109db418bf902de581a7fcc4dc" }, "downloads": -1, "filename": "spr-0.2.1-py2-none-any.whl", "has_sig": false, "md5_digest": "2967eec1da3551d09a1f3f9335eba9be", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 3750, "upload_time": "2018-05-02T15:16:25", "url": "https://files.pythonhosted.org/packages/73/a0/163d79c601883ed53da9d665318fcd5418ea48f68bfdc4885b817f6b1037/spr-0.2.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "882a33c9b1b7b527ddb8bad241cd5dca", "sha256": "9699478ab712c4c40a050824aecc642885e902d5f004131229d53906b21be44e" }, "downloads": -1, "filename": "spr-0.2.1.tar.gz", "has_sig": false, "md5_digest": "882a33c9b1b7b527ddb8bad241cd5dca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3493, "upload_time": "2018-05-02T15:16:27", "url": "https://files.pythonhosted.org/packages/17/2d/985d639ea5663e6bff8222f0f1c4d736df31d719e5f2b9681a03b11912ee/spr-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2967eec1da3551d09a1f3f9335eba9be", "sha256": "ae44021c85638fd0b6b3447368e8f8ce38737b109db418bf902de581a7fcc4dc" }, "downloads": -1, "filename": "spr-0.2.1-py2-none-any.whl", "has_sig": false, "md5_digest": "2967eec1da3551d09a1f3f9335eba9be", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 3750, "upload_time": "2018-05-02T15:16:25", "url": "https://files.pythonhosted.org/packages/73/a0/163d79c601883ed53da9d665318fcd5418ea48f68bfdc4885b817f6b1037/spr-0.2.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "882a33c9b1b7b527ddb8bad241cd5dca", "sha256": "9699478ab712c4c40a050824aecc642885e902d5f004131229d53906b21be44e" }, "downloads": -1, "filename": "spr-0.2.1.tar.gz", "has_sig": false, "md5_digest": "882a33c9b1b7b527ddb8bad241cd5dca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3493, "upload_time": "2018-05-02T15:16:27", "url": "https://files.pythonhosted.org/packages/17/2d/985d639ea5663e6bff8222f0f1c4d736df31d719e5f2b9681a03b11912ee/spr-0.2.1.tar.gz" } ] }