SLiCAP 3.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- SLiCAP/SLiCAP.py +175 -0
- SLiCAP/SLiCAPconfigure.py +612 -0
- SLiCAP/SLiCAPdesignData.py +297 -0
- SLiCAP/SLiCAPexecute.py +1704 -0
- SLiCAP/SLiCAPfc.py +316 -0
- SLiCAP/SLiCAPgschem.py +64 -0
- SLiCAP/SLiCAPhtml.py +1148 -0
- SLiCAP/SLiCAPinstruction.py +1714 -0
- SLiCAP/SLiCAPkicad.py +190 -0
- SLiCAP/SLiCAPlatex.py +810 -0
- SLiCAP/SLiCAPlex.py +326 -0
- SLiCAP/SLiCAPltspice.py +85 -0
- SLiCAP/SLiCAPmath.py +1947 -0
- SLiCAP/SLiCAPmatrices.py +535 -0
- SLiCAP/SLiCAPngspice.py +536 -0
- SLiCAP/SLiCAPnotebook.py +43 -0
- SLiCAP/SLiCAPplots.py +1743 -0
- SLiCAP/SLiCAPprotos.py +941 -0
- SLiCAP/SLiCAPrst.py +812 -0
- SLiCAP/SLiCAPshell.py +1374 -0
- SLiCAP/SLiCAPstatespace.py +333 -0
- SLiCAP/SLiCAPsvgTools.py +127 -0
- SLiCAP/SLiCAPyacc.py +1325 -0
- SLiCAP/__init__.py +7 -0
- SLiCAP/files/LICENCE.txt +10 -0
- SLiCAP/files/LTspice/SLABCD.asy +35 -0
- SLiCAP/files/LTspice/SLC.asy +21 -0
- SLiCAP/files/LTspice/SLD.asy +19 -0
- SLiCAP/files/LTspice/SLE.asy +36 -0
- SLiCAP/files/LTspice/SLEZ.asy +44 -0
- SLiCAP/files/LTspice/SLF.asy +42 -0
- SLiCAP/files/LTspice/SLG.asy +40 -0
- SLiCAP/files/LTspice/SLH.asy +38 -0
- SLiCAP/files/LTspice/SLHZ.asy +46 -0
- SLiCAP/files/LTspice/SLI.asy +28 -0
- SLiCAP/files/LTspice/SLJ.asy +26 -0
- SLiCAP/files/LTspice/SLJ_noise.asy +30 -0
- SLiCAP/files/LTspice/SLK.asy +12 -0
- SLiCAP/files/LTspice/SLL.asy +23 -0
- SLiCAP/files/LTspice/SLM.asy +33 -0
- SLiCAP/files/LTspice/SLMD.asy +46 -0
- SLiCAP/files/LTspice/SLM_noise.asy +30 -0
- SLiCAP/files/LTspice/SLN.asy +38 -0
- SLiCAP/files/LTspice/SLN_dcvar.asy +72 -0
- SLiCAP/files/LTspice/SLN_noise.asy +48 -0
- SLiCAP/files/LTspice/SLO.asy +29 -0
- SLiCAP/files/LTspice/SLO_dcvar.asy +31 -0
- SLiCAP/files/LTspice/SLO_noise.asy +31 -0
- SLiCAP/files/LTspice/SLQ.asy +30 -0
- SLiCAP/files/LTspice/SLQD.asy +40 -0
- SLiCAP/files/LTspice/SLQ_noise.asy +27 -0
- SLiCAP/files/LTspice/SLR.asy +27 -0
- SLiCAP/files/LTspice/SLR_r.asy +27 -0
- SLiCAP/files/LTspice/SLT.asy +44 -0
- SLiCAP/files/LTspice/SLV.asy +24 -0
- SLiCAP/files/LTspice/SLW.asy +35 -0
- SLiCAP/files/LTspice/SLXJ.asy +26 -0
- SLiCAP/files/LTspice/SLXM.asy +35 -0
- SLiCAP/files/LTspice/SLXMD.asy +48 -0
- SLiCAP/files/LTspice/SLXMPN.asy +35 -0
- SLiCAP/files/LTspice/SLXM_V.asy +35 -0
- SLiCAP/files/LTspice/SLXQ.asy +32 -0
- SLiCAP/files/LTspice/SLXQD.asy +42 -0
- SLiCAP/files/LTspice/SLiCAPsymbolsLTSpice.asc +108 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/README.md +9 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/gnet-spice-noqsi.scm +608 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/install.sh +5 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/scheme-path.scm +2 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/test/model-test.sch +30 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Models/nch.sym +48 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Models/openIP.inc +1106 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Models/pch.sym +48 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Models/submicron.inc +55 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Schematic/Comparator.sch +317 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Schematic/DISCRI.sch +237 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Simulation/DISCRItest.sch +129 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Simulation/control.cir +5 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Simulation/geda.conf +2 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Symbols/BIAS1-1.sym +59 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Symbols/Comparator.sym +47 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Symbols/DISCRI.sym +94 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Symbols/EDFFP-1.sym +96 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Symbols/INV1P-1.sym +52 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Symbols/NANDP-1.sym +63 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Symbols/NORP-1.sym +64 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Symbols/Noqsi-title-B.sym +41 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Symbols/RSFF1-1.sym +71 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Symbols/Vdd.sym +15 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Symbols/Vdd1.sym +15 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Symbols/Vss.sym +15 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Symbols/Vss1.sym +15 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/BBamp/Schematic/BBamp.sch +269 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/BBamp/Schematic/Board.sch +54 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/BBamp/Simulation/Test.sch +131 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/BBamp/Simulation/geda.conf +2 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/BBamp/Simulation/transistors.lib +54 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/BBamp/Symbols/BBamp.sym +58 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/BBamp/Symbols/Noqsi-title-B.sym +41 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/BBamp/Symbols/pwrjack-RAPC712.sym +45 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/HelloWorld/HelloWorld.sch +50 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/Images/BBamp.png +0 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/Images/Board.png +0 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/Images/Comparator.png +0 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/Images/DISCRI.png +0 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/Images/DISCRItest.png +0 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/Images/HelloWorld.png +0 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/Images/Test.png +0 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/Images/dB.jpg +0 -0
- SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/Images/dB.tiff +0 -0
- SLiCAP/files/gSchem/symbols/0.sym +19 -0
- SLiCAP/files/gSchem/symbols/ABCD.sym +84 -0
- SLiCAP/files/gSchem/symbols/C.sym +31 -0
- SLiCAP/files/gSchem/symbols/D.sym +40 -0
- SLiCAP/files/gSchem/symbols/DevicesGschem.eps +1998 -0
- SLiCAP/files/gSchem/symbols/DevicesGschem.sch +493 -0
- SLiCAP/files/gSchem/symbols/E.sym +63 -0
- SLiCAP/files/gSchem/symbols/EZ.sym +68 -0
- SLiCAP/files/gSchem/symbols/F.sym +70 -0
- SLiCAP/files/gSchem/symbols/G.sym +66 -0
- SLiCAP/files/gSchem/symbols/G_g.sym +66 -0
- SLiCAP/files/gSchem/symbols/H.sym +65 -0
- SLiCAP/files/gSchem/symbols/HZ.sym +71 -0
- SLiCAP/files/gSchem/symbols/I.sym +40 -0
- SLiCAP/files/gSchem/symbols/J.sym +51 -0
- SLiCAP/files/gSchem/symbols/K.sym +18 -0
- SLiCAP/files/gSchem/symbols/L.sym +32 -0
- SLiCAP/files/gSchem/symbols/M.sym +64 -0
- SLiCAP/files/gSchem/symbols/MD-H.sym +78 -0
- SLiCAP/files/gSchem/symbols/MD-V.sym +78 -0
- SLiCAP/files/gSchem/symbols/M_noise.sym +50 -0
- SLiCAP/files/gSchem/symbols/N.sym +62 -0
- SLiCAP/files/gSchem/symbols/N_dcvar.sym +93 -0
- SLiCAP/files/gSchem/symbols/N_noise.sym +66 -0
- SLiCAP/files/gSchem/symbols/O.sym +49 -0
- SLiCAP/files/gSchem/symbols/O_dcvar.sym +51 -0
- SLiCAP/files/gSchem/symbols/O_noise.sym +49 -0
- SLiCAP/files/gSchem/symbols/Q.sym +58 -0
- SLiCAP/files/gSchem/symbols/QD-H.sym +70 -0
- SLiCAP/files/gSchem/symbols/QD-V.sym +68 -0
- SLiCAP/files/gSchem/symbols/Q_noise.sym +46 -0
- SLiCAP/files/gSchem/symbols/Q_noise_LF.sym +50 -0
- SLiCAP/files/gSchem/symbols/R.sym +38 -0
- SLiCAP/files/gSchem/symbols/R_r.sym +38 -0
- SLiCAP/files/gSchem/symbols/T.sym +70 -0
- SLiCAP/files/gSchem/symbols/V.sym +37 -0
- SLiCAP/files/gSchem/symbols/W.sym +62 -0
- SLiCAP/files/gSchem/symbols/XJ.sym +53 -0
- SLiCAP/files/gSchem/symbols/XM.sym +68 -0
- SLiCAP/files/gSchem/symbols/XMD-H.sym +82 -0
- SLiCAP/files/gSchem/symbols/XMD-V.sym +82 -0
- SLiCAP/files/gSchem/symbols/XMV.sym +72 -0
- SLiCAP/files/gSchem/symbols/XQ.sym +70 -0
- SLiCAP/files/gSchem/symbols/XQD-H.sym +72 -0
- SLiCAP/files/gSchem/symbols/XQD-V.sym +72 -0
- SLiCAP/files/gSchem/symbols/Z.sym +30 -0
- SLiCAP/files/gSchem/symbols/detectorDef.sym +10 -0
- SLiCAP/files/gSchem/symbols/include.sym +10 -0
- SLiCAP/files/gSchem/symbols/lgrefDef.sym +10 -0
- SLiCAP/files/gSchem/symbols/modelDef.sym +10 -0
- SLiCAP/files/gSchem/symbols/parDef.sym +10 -0
- SLiCAP/files/gSchem/symbols/sourceDef.sym +10 -0
- SLiCAP/files/html/css/slicap.css +153 -0
- SLiCAP/files/html/img/Grid.png +0 -0
- SLiCAP/files/kicad/SLiCAP.kicad_prl +83 -0
- SLiCAP/files/kicad/SLiCAP.kicad_pro +407 -0
- SLiCAP/files/kicad/SLiCAP.kicad_sch +14196 -0
- SLiCAP/files/kicad/SLiCAP.kicad_sym +10314 -0
- SLiCAP/files/lepton-eda/SLiCAPcomponents.sch +532 -0
- SLiCAP/files/lepton-eda/symbols/0.sym +19 -0
- SLiCAP/files/lepton-eda/symbols/ABCD.sym +84 -0
- SLiCAP/files/lepton-eda/symbols/C.sym +31 -0
- SLiCAP/files/lepton-eda/symbols/D.sym +40 -0
- SLiCAP/files/lepton-eda/symbols/E.sym +63 -0
- SLiCAP/files/lepton-eda/symbols/EZ.sym +68 -0
- SLiCAP/files/lepton-eda/symbols/F.sym +70 -0
- SLiCAP/files/lepton-eda/symbols/G.sym +66 -0
- SLiCAP/files/lepton-eda/symbols/G_g.sym +66 -0
- SLiCAP/files/lepton-eda/symbols/H.sym +65 -0
- SLiCAP/files/lepton-eda/symbols/HZ.sym +71 -0
- SLiCAP/files/lepton-eda/symbols/I.sym +40 -0
- SLiCAP/files/lepton-eda/symbols/J.sym +51 -0
- SLiCAP/files/lepton-eda/symbols/K.sym +18 -0
- SLiCAP/files/lepton-eda/symbols/L.sym +32 -0
- SLiCAP/files/lepton-eda/symbols/M.sym +64 -0
- SLiCAP/files/lepton-eda/symbols/MD-H.sym +78 -0
- SLiCAP/files/lepton-eda/symbols/MD-V.sym +78 -0
- SLiCAP/files/lepton-eda/symbols/M_noise.sym +50 -0
- SLiCAP/files/lepton-eda/symbols/N.sym +62 -0
- SLiCAP/files/lepton-eda/symbols/N_dcvar.sym +93 -0
- SLiCAP/files/lepton-eda/symbols/N_noise.sym +66 -0
- SLiCAP/files/lepton-eda/symbols/O.sym +49 -0
- SLiCAP/files/lepton-eda/symbols/O_dcvar.sym +51 -0
- SLiCAP/files/lepton-eda/symbols/O_noise.sym +49 -0
- SLiCAP/files/lepton-eda/symbols/Q.sym +58 -0
- SLiCAP/files/lepton-eda/symbols/QD-H.sym +70 -0
- SLiCAP/files/lepton-eda/symbols/QD-V.sym +68 -0
- SLiCAP/files/lepton-eda/symbols/Q_noise.sym +46 -0
- SLiCAP/files/lepton-eda/symbols/R.sym +38 -0
- SLiCAP/files/lepton-eda/symbols/R_r.sym +38 -0
- SLiCAP/files/lepton-eda/symbols/T.sym +70 -0
- SLiCAP/files/lepton-eda/symbols/V.sym +37 -0
- SLiCAP/files/lepton-eda/symbols/W.sym +62 -0
- SLiCAP/files/lepton-eda/symbols/XJ.sym +53 -0
- SLiCAP/files/lepton-eda/symbols/XM.sym +68 -0
- SLiCAP/files/lepton-eda/symbols/XMD-H.sym +82 -0
- SLiCAP/files/lepton-eda/symbols/XMD-V.sym +82 -0
- SLiCAP/files/lepton-eda/symbols/XMV.sym +72 -0
- SLiCAP/files/lepton-eda/symbols/XQD-H.sym +72 -0
- SLiCAP/files/lepton-eda/symbols/XQD-V.sym +72 -0
- SLiCAP/files/lepton-eda/symbols/Z.sym +30 -0
- SLiCAP/files/lepton-eda/symbols/detectorDef.sym +10 -0
- SLiCAP/files/lepton-eda/symbols/include.sym +10 -0
- SLiCAP/files/lepton-eda/symbols/lgrefDef.sym +10 -0
- SLiCAP/files/lepton-eda/symbols/modelDef.sym +10 -0
- SLiCAP/files/lepton-eda/symbols/parDef.sym +10 -0
- SLiCAP/files/lepton-eda/symbols/sourceDef.sym +10 -0
- SLiCAP/files/lib/Grid.png +0 -0
- SLiCAP/files/lib/SLiCAP.lib +519 -0
- SLiCAP/files/lib/SLiCAPmodels.lib +166 -0
- SLiCAP/files/lib/slicap.css +153 -0
- SLiCAP/files/sphinx/Makefile +19 -0
- SLiCAP/files/sphinx/_static/custom.css +6 -0
- SLiCAP/files/sphinx/_static/handsontable.full.min.css +31 -0
- SLiCAP/files/sphinx/_static/handsontable.full.min.js +89 -0
- SLiCAP/files/sphinx/_static/html_logo.png +0 -0
- SLiCAP/files/sphinx/_templates/layout.html +11 -0
- SLiCAP/files/sphinx/_templates/table.html +16 -0
- SLiCAP/files/sphinx/conf.py +50 -0
- SLiCAP/files/sphinx/img/SLiCAP-h1.svg +154 -0
- SLiCAP/files/sphinx/img/SLiCAP.svg +149 -0
- SLiCAP/files/sphinx/img/colorCode.svg +242 -0
- SLiCAP/files/sphinx/index.rst +10 -0
- SLiCAP/files/sphinx/make.bat +35 -0
- SLiCAP/files/sphinx/source/Makefile +19 -0
- SLiCAP/files/sphinx/source/_templates/table.html +16 -0
- SLiCAP/files/sphinx/source/make.bat +35 -0
- SLiCAP/files/tex/SLiCAPdata/TEXsubstitutions.tex +1 -0
- SLiCAP/files/tex/preambuleSLiCAP.tex +122 -0
- slicap-3.3.dist-info/METADATA +116 -0
- slicap-3.3.dist-info/RECORD +242 -0
- slicap-3.3.dist-info/WHEEL +5 -0
- slicap-3.3.dist-info/top_level.txt +1 -0
SLiCAP/SLiCAP.py
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
"""
|
|
4
|
+
Main module for running SLiCAP from a console or from within a Python IDE.
|
|
5
|
+
|
|
6
|
+
When working with Jupyter notebooks the main imort module is SLiCAPnotebook.py.
|
|
7
|
+
It will import SLiCAP.py and some extra modules for displaying LaTeX, SVG and
|
|
8
|
+
RST in the Jupyter notebooks.
|
|
9
|
+
"""
|
|
10
|
+
import os
|
|
11
|
+
import webbrowser
|
|
12
|
+
import numpy as np
|
|
13
|
+
import SLiCAP.SLiCAPconfigure as ini
|
|
14
|
+
from datetime import datetime
|
|
15
|
+
from shutil import copy2
|
|
16
|
+
from SLiCAP.SLiCAPyacc import _initializeParser
|
|
17
|
+
from scipy.optimize import newton, fsolve
|
|
18
|
+
from scipy.integrate import quad
|
|
19
|
+
from SLiCAP.SLiCAPdesignData import *
|
|
20
|
+
from SLiCAP.SLiCAPinstruction import instruction
|
|
21
|
+
from SLiCAP.SLiCAPmath import *
|
|
22
|
+
from SLiCAP.SLiCAPplots import *
|
|
23
|
+
from SLiCAP.SLiCAPlatex import *
|
|
24
|
+
from SLiCAP.SLiCAPrst import *
|
|
25
|
+
from SLiCAP.SLiCAPngspice import MOS, ngspice2traces
|
|
26
|
+
from SLiCAP.SLiCAPltspice import runLTspice
|
|
27
|
+
from SLiCAP.SLiCAPshell import *
|
|
28
|
+
from SLiCAP.SLiCAPhtml import *
|
|
29
|
+
from SLiCAP.SLiCAPhtml import _startHTML
|
|
30
|
+
|
|
31
|
+
# Increase width for display of numpy arrays:
|
|
32
|
+
np.set_printoptions(edgeitems=30, linewidth=1000,
|
|
33
|
+
formatter=dict(float=lambda x: "%11.4e" % x))
|
|
34
|
+
|
|
35
|
+
def Help():
|
|
36
|
+
"""
|
|
37
|
+
Opens the SLiCAP HTML documentation in the default browser.
|
|
38
|
+
|
|
39
|
+
:example:
|
|
40
|
+
|
|
41
|
+
>>> import SLiCAP as sl
|
|
42
|
+
>>> # Display the SLiCAP HTML help in your default browser:
|
|
43
|
+
>>> sl.Help()
|
|
44
|
+
"""
|
|
45
|
+
webbrowser.open_new(ini.doc_path + 'index.html')
|
|
46
|
+
return
|
|
47
|
+
|
|
48
|
+
def _copyNotOverwrite(src, dest):
|
|
49
|
+
"""
|
|
50
|
+
Copies the file 'src' to 'dest' if the latter one does not exist.
|
|
51
|
+
|
|
52
|
+
:param src: Name of the source file.
|
|
53
|
+
:type src: str
|
|
54
|
+
|
|
55
|
+
:param dest: Name of the desitination file.
|
|
56
|
+
:type dest: str
|
|
57
|
+
"""
|
|
58
|
+
if not os.path.exists(dest):
|
|
59
|
+
copy2(src, dest)
|
|
60
|
+
return
|
|
61
|
+
|
|
62
|
+
def _makeDir(dirName):
|
|
63
|
+
"""
|
|
64
|
+
Creates the directory 'dirName' if it does not yet exist.
|
|
65
|
+
|
|
66
|
+
:param dirName: Name of the ditectory.
|
|
67
|
+
:type dirName: str
|
|
68
|
+
"""
|
|
69
|
+
|
|
70
|
+
if not os.path.exists(dirName):
|
|
71
|
+
os.makedirs(dirName)
|
|
72
|
+
return
|
|
73
|
+
|
|
74
|
+
def initProject(name, notebook=False):
|
|
75
|
+
"""
|
|
76
|
+
Initializes a SLiCAP project.
|
|
77
|
+
|
|
78
|
+
- Copies the directory structure from the templates subdirectory to the
|
|
79
|
+
project directory in cases it has not yet been created.
|
|
80
|
+
- Creates index.html in the html directory with the project name in the
|
|
81
|
+
title bar
|
|
82
|
+
- Compiles the system libraries
|
|
83
|
+
- Creates or updates 'SLiCAPconfigure.py' in the project directory
|
|
84
|
+
|
|
85
|
+
:param name: Name of the project: appears on the main html index page.
|
|
86
|
+
:type name: str
|
|
87
|
+
|
|
88
|
+
:return: None
|
|
89
|
+
:rtype: NoneType
|
|
90
|
+
|
|
91
|
+
:Example:
|
|
92
|
+
|
|
93
|
+
>>> import SLiCAP as sl
|
|
94
|
+
>>> # At the first run it will create a 'SLiCAP.ini' file in the SLiCAP
|
|
95
|
+
>>> # home folder: '~/SLiCAP/'.
|
|
96
|
+
>>> # To this end it searches for installed applications.
|
|
97
|
+
>>> # Under MSwindows this may take a while.
|
|
98
|
+
>>> sl.initProject('my first SLiCAP project')
|
|
99
|
+
>>> # At the first run this will create a 'SLiCAP.ini' file in the SLiCAP
|
|
100
|
+
>>> # project folder: './'. Once created it will only reset some values.
|
|
101
|
+
>>> # This function also resets the netlist parser and (re)creates the
|
|
102
|
+
>>> # system library objects.
|
|
103
|
+
>>> sl.ini.dump()
|
|
104
|
+
>>> # Prints the SLiCAP global settings obtained from both ini files.
|
|
105
|
+
|
|
106
|
+
"""
|
|
107
|
+
# Read the project data from the project configuration file
|
|
108
|
+
project_config = ini._read_project_config()
|
|
109
|
+
|
|
110
|
+
# Adjust image sizes for notebooks (image font size equals notebook font size)
|
|
111
|
+
ini.notebook = notebook
|
|
112
|
+
if notebook:
|
|
113
|
+
# These values will not be stored
|
|
114
|
+
ini.axis_width = 4
|
|
115
|
+
ini.axis_height = 3
|
|
116
|
+
ini.plot_fontsize = 9
|
|
117
|
+
ini.line_width = 1
|
|
118
|
+
# Define the project title and reset the html pages
|
|
119
|
+
ini.project_title = name
|
|
120
|
+
ini.html_page = 'index.html'
|
|
121
|
+
project_config['html']['current_page'] = ini.html_page
|
|
122
|
+
ini.html_index = 'index.html'
|
|
123
|
+
project_config['html']['current_index'] = ini.html_index
|
|
124
|
+
ini.html_pages = []
|
|
125
|
+
project_config['html']['pages'] = (',').join(ini.html_pages)
|
|
126
|
+
ini.html_labels = {}
|
|
127
|
+
project_config['labels'] = ini.html_labels
|
|
128
|
+
ini.html_prefix = ''
|
|
129
|
+
project_config['html']['prefix'] = ini.html_prefix
|
|
130
|
+
ini.project_title = name
|
|
131
|
+
project_config['project']['title'] = ini.project_title
|
|
132
|
+
ini.last_updated = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
|
133
|
+
project_config['project']['last_updated'] = ini.last_updated
|
|
134
|
+
|
|
135
|
+
# Update configuration files
|
|
136
|
+
ini.main_config, ini.project_config = ini._update_ini_files()
|
|
137
|
+
# Create the project directory structure, at the first run of initProject()
|
|
138
|
+
_makeDir(ini.html_path)
|
|
139
|
+
_makeDir(ini.txt_path)
|
|
140
|
+
_makeDir(ini.csv_path)
|
|
141
|
+
_makeDir(ini.img_path)
|
|
142
|
+
_makeDir(ini.sphinx_path)
|
|
143
|
+
_makeDir(ini.mathml_path)
|
|
144
|
+
_makeDir(ini.cir_path)
|
|
145
|
+
_makeDir(ini.user_lib_path)
|
|
146
|
+
_makeDir(ini.tex_path)
|
|
147
|
+
_makeDir(ini.html_path + 'img/')
|
|
148
|
+
_makeDir(ini.html_path + 'css/')
|
|
149
|
+
_copyNotOverwrite(ini.install_path + 'SLiCAP/files/html/css/slicap.css', ini.html_path + 'css/slicap.css')
|
|
150
|
+
_copyNotOverwrite(ini.install_path + 'SLiCAP/files/html/img/Grid.png', ini.html_path + 'css/Grid.png')
|
|
151
|
+
_copyNotOverwrite(ini.install_path + 'SLiCAP/files/sphinx/make.bat', ini.sphinx_path + 'make.bat')
|
|
152
|
+
_copyNotOverwrite(ini.install_path + 'SLiCAP/files/sphinx/Makefile', ini.sphinx_path + 'Makefile')
|
|
153
|
+
_makeDir(ini.sphinx_path + 'SLiCAPdata/')
|
|
154
|
+
_makeDir(ini.sphinx_path + 'source/')
|
|
155
|
+
_copyNotOverwrite(ini.install_path + 'SLiCAP/files/sphinx/conf.py', ini.sphinx_path + 'source/conf.py')
|
|
156
|
+
_copyNotOverwrite(ini.install_path + 'SLiCAP/files/sphinx/index.rst', ini.sphinx_path + 'source/index.rst')
|
|
157
|
+
_makeDir(ini.sphinx_path + 'source/img/')
|
|
158
|
+
_copyNotOverwrite(ini.install_path + 'SLiCAP/files/sphinx/img' + '/colorCode.svg', ini.sphinx_path + 'source/img/colorCode.svg')
|
|
159
|
+
_copyNotOverwrite(ini.install_path + 'SLiCAP/files/sphinx/img' + '/SLiCAP.svg', ini.sphinx_path + 'source/img/SLiCAP.svg')
|
|
160
|
+
_copyNotOverwrite(ini.install_path + 'SLiCAP/files/sphinx/img' + '/SLiCAP-h1.svg', ini.sphinx_path + 'source/img/SLiCAP-h1.svg')
|
|
161
|
+
_makeDir(ini.sphinx_path + 'source/_static/')
|
|
162
|
+
_copyNotOverwrite(ini.install_path + 'SLiCAP/files/sphinx/_static/html_logo.png', ini.sphinx_path + 'source/_static/html_logo.png')
|
|
163
|
+
_copyNotOverwrite(ini.install_path + 'SLiCAP/files/sphinx/_static/custom.css', ini.sphinx_path + 'source/_static/custom.css')
|
|
164
|
+
_copyNotOverwrite(ini.install_path + 'SLiCAP/files/sphinx/_static/handsontable.full.min.css', ini.sphinx_path + 'source/_static/handsontable.full.min.css')
|
|
165
|
+
_copyNotOverwrite(ini.install_path + 'SLiCAP/files/sphinx/_static/handsontable.full.min.js', ini.sphinx_path + 'source/_static/handsontable.full.min.js')
|
|
166
|
+
_makeDir(ini.sphinx_path + 'source/_templates/')
|
|
167
|
+
_copyNotOverwrite(ini.install_path + 'SLiCAP/files/sphinx/_templates/layout.html', ini.sphinx_path + 'source/_templates/layout.html')
|
|
168
|
+
_makeDir(ini.tex_path + 'SLiCAPdata/')
|
|
169
|
+
_copyNotOverwrite(ini.install_path + 'SLiCAP/files/tex/preambuleSLiCAP.tex', ini.tex_path + 'preambuleSLiCAP.tex')
|
|
170
|
+
#
|
|
171
|
+
if not ini.notebook:
|
|
172
|
+
# Create the HTML project index file
|
|
173
|
+
_startHTML(name)
|
|
174
|
+
# Initialize the parser, this will create the libraries and delete all previously defined circuits
|
|
175
|
+
_initializeParser()
|