This project is an application for calculating transfer functions of linear circuits given a SPICE description.
To run the application, follow these steps:
- Install the required dependencies using
pip install -r requirements.txt. - Run main application with
python3 main.py
At first a got a little bit ahead of myself and underestimated the complexity for the app's core main task, now I'm starting fresh from the basics:
- Get a transfer function small signal model amplifier circuit
Next steps:
- Find a way of putting the answer in a polynomial format;
- Create a way of passing the analyzed circuit via spice file;
- Make it as a CLI tool
- Make it to work as a python notebook
- Work as a LTSpice plugin (this one is really long term)
Run the following commands:
python -m venv venv
source venv/bin/activate
pip install -r requirements.txtYou can run locally or build the library:
python transfer_function_calculator/main.py -t ./transfer_function_calculator/samples/rlc.txtBuild:
python setup.py sdist bdist_wheel & pip install -e .And run:
tf-calc -t ./transfer_function_calculator/samples/rlc.txtIf a change is made, clean up build files and run again:
rm -rf build dist transfer_function_calculator.egg-info & python setup.py sdist bdist_wheel & pip install -e .- Text mode, prints in terminal. Run with a path to a txt SPICE description file.
tf-calc -t ./transfer_function_calculator/samples/rlc.txt- Jupyter mode, opens interface in browser. Runs a local server to run Jupyter as an user interface.
tf-calc -jThis project is licensed under the MIT License.