SLiCAP.py

Main module for running SLiCAP from a console or from within a Python IDE.

When working with Jupyter notebooks the main imort module is SLiCAPnotebook.py. It will import SLiCAP.py and some extra modules for displaying LaTeX, SVG and RST in the Jupyter notebooks.

class SLiCAPproject(name)

Prototype of a SLiCAPproject.

author

SLiCAPproject.author (str) Will be updated by running: SLiCAPproject.initProject(<name>)

lastUpdate

SLiCAPproject.lastUpdate (datetime.datetime) will be updated by running: SLiCAPproject.initProject(<name>)

name

SLiCAPproject.name (str) is the name of the project. It will appear on the main html index page

initProject(name, port=53118)

Initializes a SLiCAP project.

  • Copies the directory structure from the templates subdirectory to the project directory in the case it has not yet been created.

  • Creates index.html in the html directory with the project name in the title bar

  • Compiles the system libraries

  • Creates or updates ‘SLiCAPconfig.py’ in the project directory

  • Creates instance of SLiCAPproject object

Parameters
  • name (str) – Name of the project will be passed to an instance of the SLiCAPproject object.

  • port (int) – Port number for communication with maxima CAS (> 8000).

Returns

SLiCAPproject

Return type

SLiCAP.SLiCAPproject

Example

>>> prj = initProject('my first SLiCAP project')
>>> print prj.author
anton
makeNetlist(fileName, cirTitle)

Creates a netlist from a schematic file generated with LTspice or gschem.

  • LTspice: ‘.asc’ file

  • gschem: ‘.sch’ file

Parameters
  • fileName (str) – Name of the file, relative to ini.circuitPath

  • cirTitle (str) – Title of the schematic.

runLTspice(fileName)

Runs LTspice netlist (.cir) file.

Parameters

fileName (str) – Name of the circuit (.cir) file, relative to the project directory (cir/<myCircuit>.cir)

Returns

None

Return type

Nonetype