Skip to content

pathsim/pathsim-toolbox-template

Repository files navigation

This is the PathSim toolbox template. The README below still contains placeholders. To turn this template into a real toolbox, create a repository from it, then run the initializer:

python init.py <name> --description "<one-line description>" --label <Label>

It renames the package, rewrites every reference, and removes this banner. See TEMPLATE.md for the full setup, including registering the toolbox with the documentation build.


A toolbox for PathSim

PyPI License

HomepageDocumentationGitHub


PathSim-Toolbox extends the PathSim simulation framework with specialized blocks. All blocks follow the standard PathSim block interface and can be connected into simulation diagrams.

Blocks

Block Description Key Parameters
FirstOrderLag First-order lag / low-pass filter tau, y0

Install

pip install pathsim-toolbox

Quick Example

from pathsim import Simulation, Connection
from pathsim.blocks import Source, Scope
from pathsim_toolbox import FirstOrderLag

src = Source(lambda t: float(t > 1))   # unit step at t = 1
lag = FirstOrderLag(tau=2.0)           # first-order lag
sco = Scope(labels=["input", "output"])

sim = Simulation(
    blocks=[src, lag, sco],
    connections=[
        Connection(src, lag[0], sco[0]),
        Connection(lag, sco[1]),
    ],
    dt=0.01,
)
sim.run(20)
sco.plot()

Development

pip install -e ".[test]" ruff mypy
ruff check src/ tests/      # lint
ruff format src/ tests/     # format
mypy src/pathsim_toolbox    # type check
pytest tests/ -v            # run tests

License

MIT

About

Template repository for PathSim toolboxes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages