Modules

Lcapy is a Python library for symbolic linear circuit and signal analysis.

Lcapy can analyse circuits described with netlists using modified nodal analysis. See lcapy.netlist

Alternatively, Lcapy can analyse networks and circuits formed by combining one, two, and three port networks. See lcapy.oneport

For detailed documentation see http://lcapy.readthedocs.io/en/latest

Copyright 2014–2022 Michael Hayes, UCECE

lcapy.show_version()

Show versions of Lcapy, SymPy, NumPy, MatplotLib, SciPy, and Python.

Circuit analysis

lcapy.circuit

This module provides circuit analysis using modified nodal analysis (MNA).

lcapy.netlist

This module provides the Netlist class.

lcapy.netfile

This module provides the NetfileMixin class.

lcapy.mna

This module implements modified nodal analysis (MNA).

lcapy.statespace

This module defines the StateSpace class for representing a linear continuous time-invariant system as a state-space model.

lcapy.loopanalysis

This module performs loop analysis.

lcapy.nodalanalysis

This module performs nodal analysis.

lcapy.oneport

This module supports simple linear one-port networks based on the following ideal components:

lcapy.expr(arg[, var, override, units])

Create Lcapy expression from arg.

lcapy.sexpr(arg, **assumptions)

Create LaplaceDomainExpression object.

lcapy.cexpr(arg[, frequency])

Create Lcapy ConstantDomainExpression object.

lcapy.texpr(arg, **assumptions)

Create TimeDomainExpression object.

lcapy.fexpr(arg, **assumptions)

Create FourierDomainExpression object.

lcapy.nexpr(arg, **assumptions)

Create DiscreteTimeDomainExpression object.

lcapy.kexpr(arg, **assumptions)

Create DiscreteFourierDomainExpression object.

lcapy.zexpr(arg, **assumptions)

Create ZDomainExpression object.

lcapy.sequence

This module handles sequences.

lcapy.omegaexpr(arg, **assumptions)

Create AngularFourierDomainExpression object.

lcapy.noiseexpr

This module provides the NoiseExpression class to represent noise expressions.

lcapy.phasor(arg[, omega])

Create phasor.

lcapy.matrix(mat)

Create Lcapy Matrix from a SymPy Matrix.

lcapy.smatrix

This module implements the LaplaceDomainMatrix class for a matrix of Laplace-domain expressions.

lcapy.tmatrix

This module implements the TimeDomainMatrix class for a matrix of time-domain expressions.

lcapy.network

This module provides the Network sub class for OnePort and TwoPort classes.

lcapy.voltage(arg, **assumptions)

Create a voltage object from the specified arg.

lcapy.current(arg, **assumptions)

Create a current object from the specified arg.

lcapy.superposition

This module provides the SuperpositionDomainExpression class.

lcapy.admittance(arg[, causal])

Create an admittance object from the specified arg.

lcapy.impedance(arg[, causal])

Create an impedance object from the specified arg.

lcapy.functions

This module wraps SymPy functions and provides a few others.

lcapy.symbols(names, **assumptions)

Create Lcapy symbols from whitespace or comma delimited string of symbol names.

lcapy.mnacpts

This module defines the components for modified nodal analysis.

lcapy.laplace

This module provides support for Laplace transforms.

lcapy.fourier

This module provides support for Fourier transforms.

lcapy.ztransform

This module provides support for z transforms.

lcapy.transform

This module performs transformations between domains.

lcapy.plot

This module performs plotting using matplotlib.

lcapy.acdc

This module provides the CausalChecker, ACChecker, and DCChecker classes as used by the is_causal, is_ac, and is_dc functions.

lcapy.ratfun

This module provides support for rational functions.

Schematics

lcapy.schematic

This module performs schematic drawing using circuitikz from a netlist.

lcapy.schemcpts

This module defines and draws the schematic components using circuitikz.

lcapy.schemgraph

This module provides classes for schematic layout.

lcapy.schemmisc

This module provides miscellaneous support for schematic drawing.

General

lcapy.config

This module contains configuration information.

lcapy.grammar

This module defines a grammar for SPICE-like netlists.

lcapy.parser

This module performs parsing of SPICE-like netlists.

lcapy.printing

This module provides printing support.

lcapy.latex

lcapy.context

This module provides the Context class that maintains the context for a Circuit.

lcapy.state

This maintains Lcapy's state, such as the defined symbols, and behaviour.

lcapy.system

This module wraps system dependent programs for pdf generation, etc.

lcapy.units

This module provides the Units class for simplification of units.

lcapy.utils

This module provides common utility functions.