{"id":18814310,"url":"https://github.com/diordany/spicemill","last_synced_at":"2026-01-13T03:30:17.718Z","repository":{"id":229845417,"uuid":"734415334","full_name":"Diordany/spicemill","owner":"Diordany","description":"Tool for plotting Ngspice simulation results with Pyplot.","archived":false,"fork":false,"pushed_at":"2024-03-28T12:56:41.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-30T00:47:56.860Z","etag":null,"topics":["analysis","data","electrical-engineering","electronics","frontend","integrated-circuit","integrated-circuits","ngspice","plot","plotting","post-processing","pyplot","python","raw","simulation","spice"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Diordany.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.txt","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-21T16:11:52.000Z","updated_at":"2024-03-28T21:15:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"34783458-02d4-4464-83c3-c16cb0a79ac3","html_url":"https://github.com/Diordany/spicemill","commit_stats":null,"previous_names":["diordany/spicemill"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Diordany%2Fspicemill","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Diordany%2Fspicemill/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Diordany%2Fspicemill/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Diordany%2Fspicemill/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Diordany","download_url":"https://codeload.github.com/Diordany/spicemill/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239750123,"owners_count":19690571,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analysis","data","electrical-engineering","electronics","frontend","integrated-circuit","integrated-circuits","ngspice","plot","plotting","post-processing","pyplot","python","raw","simulation","spice"],"created_at":"2024-11-07T23:40:08.100Z","updated_at":"2026-01-13T03:30:17.663Z","avatar_url":"https://github.com/Diordany.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spice Mill\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nI'm working on Spice Mill to aid me in circuit analysis. Spice Mill focuses primarily on post processing ASCII raw files generated Ngspice. This is intended for my personal use, but I'm releasing it for anyone who's interested. Keep in mind that everything here is subject to change.\n\n\n## Generating Test Data with Ngspice\n\nHere's a quick example on how to generate test data with Ngspice for use with Spice Mill. First you'll need to define a test circuit. For this example we'll use a sine signal:\n\n$$v_s(t) = A \\cdot sin(2\\pi ft) + V_0$$\n\nWhere the amplitude $A = 2.5 V$, the offset $V_0 = 2.5 V$ and the frequency $f = 1 kHz$. For this example we'll run a transient analysis over the interval $0 \\le t \\le 10 ms$ with timesteps of $\\Delta t = 10 \\mu s$. We get the following netlist:\n\n```\n.title Sine Wave\nvs vout 0 sin(2.5, 2.5, 1k)\n.tran 10u 10m\n.end\n```\n\nWe save this to a file named `test.cir` and run the following command to generate the test data:\n\n```\nSPICE_ASCIIRAWFILE=1 ngspice -b -r test.raw test.cir\n```\n\nNgspice should now write the simulation data to a file named `test.raw`.\n\n## Plotting Simulation Results\n\nTo plot the simulation results provided by an ASCII .raw file, run the following command:\n\n```\npython spicemill.py --raw \u003craw_file\u003e\n```\n\nIf no filename was given with the `--raw` option, it defaults to `data.raw`.\n\n![plot](docs/img/plot.png)\n\nTo plot specific variables, use the `--vars` option. The variable names (`v(vout)` and `i(vs)` for example) should be separated by a semicolon `;`.\n\n```\npython spicemill.py --vars \"\u003cvar_1\u003e;\u003cvar_2\u003e;\u003cvar_n\u003e\"\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiordany%2Fspicemill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiordany%2Fspicemill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiordany%2Fspicemill/lists"}