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.
Files changed (242) hide show
  1. SLiCAP/SLiCAP.py +175 -0
  2. SLiCAP/SLiCAPconfigure.py +612 -0
  3. SLiCAP/SLiCAPdesignData.py +297 -0
  4. SLiCAP/SLiCAPexecute.py +1704 -0
  5. SLiCAP/SLiCAPfc.py +316 -0
  6. SLiCAP/SLiCAPgschem.py +64 -0
  7. SLiCAP/SLiCAPhtml.py +1148 -0
  8. SLiCAP/SLiCAPinstruction.py +1714 -0
  9. SLiCAP/SLiCAPkicad.py +190 -0
  10. SLiCAP/SLiCAPlatex.py +810 -0
  11. SLiCAP/SLiCAPlex.py +326 -0
  12. SLiCAP/SLiCAPltspice.py +85 -0
  13. SLiCAP/SLiCAPmath.py +1947 -0
  14. SLiCAP/SLiCAPmatrices.py +535 -0
  15. SLiCAP/SLiCAPngspice.py +536 -0
  16. SLiCAP/SLiCAPnotebook.py +43 -0
  17. SLiCAP/SLiCAPplots.py +1743 -0
  18. SLiCAP/SLiCAPprotos.py +941 -0
  19. SLiCAP/SLiCAPrst.py +812 -0
  20. SLiCAP/SLiCAPshell.py +1374 -0
  21. SLiCAP/SLiCAPstatespace.py +333 -0
  22. SLiCAP/SLiCAPsvgTools.py +127 -0
  23. SLiCAP/SLiCAPyacc.py +1325 -0
  24. SLiCAP/__init__.py +7 -0
  25. SLiCAP/files/LICENCE.txt +10 -0
  26. SLiCAP/files/LTspice/SLABCD.asy +35 -0
  27. SLiCAP/files/LTspice/SLC.asy +21 -0
  28. SLiCAP/files/LTspice/SLD.asy +19 -0
  29. SLiCAP/files/LTspice/SLE.asy +36 -0
  30. SLiCAP/files/LTspice/SLEZ.asy +44 -0
  31. SLiCAP/files/LTspice/SLF.asy +42 -0
  32. SLiCAP/files/LTspice/SLG.asy +40 -0
  33. SLiCAP/files/LTspice/SLH.asy +38 -0
  34. SLiCAP/files/LTspice/SLHZ.asy +46 -0
  35. SLiCAP/files/LTspice/SLI.asy +28 -0
  36. SLiCAP/files/LTspice/SLJ.asy +26 -0
  37. SLiCAP/files/LTspice/SLJ_noise.asy +30 -0
  38. SLiCAP/files/LTspice/SLK.asy +12 -0
  39. SLiCAP/files/LTspice/SLL.asy +23 -0
  40. SLiCAP/files/LTspice/SLM.asy +33 -0
  41. SLiCAP/files/LTspice/SLMD.asy +46 -0
  42. SLiCAP/files/LTspice/SLM_noise.asy +30 -0
  43. SLiCAP/files/LTspice/SLN.asy +38 -0
  44. SLiCAP/files/LTspice/SLN_dcvar.asy +72 -0
  45. SLiCAP/files/LTspice/SLN_noise.asy +48 -0
  46. SLiCAP/files/LTspice/SLO.asy +29 -0
  47. SLiCAP/files/LTspice/SLO_dcvar.asy +31 -0
  48. SLiCAP/files/LTspice/SLO_noise.asy +31 -0
  49. SLiCAP/files/LTspice/SLQ.asy +30 -0
  50. SLiCAP/files/LTspice/SLQD.asy +40 -0
  51. SLiCAP/files/LTspice/SLQ_noise.asy +27 -0
  52. SLiCAP/files/LTspice/SLR.asy +27 -0
  53. SLiCAP/files/LTspice/SLR_r.asy +27 -0
  54. SLiCAP/files/LTspice/SLT.asy +44 -0
  55. SLiCAP/files/LTspice/SLV.asy +24 -0
  56. SLiCAP/files/LTspice/SLW.asy +35 -0
  57. SLiCAP/files/LTspice/SLXJ.asy +26 -0
  58. SLiCAP/files/LTspice/SLXM.asy +35 -0
  59. SLiCAP/files/LTspice/SLXMD.asy +48 -0
  60. SLiCAP/files/LTspice/SLXMPN.asy +35 -0
  61. SLiCAP/files/LTspice/SLXM_V.asy +35 -0
  62. SLiCAP/files/LTspice/SLXQ.asy +32 -0
  63. SLiCAP/files/LTspice/SLXQD.asy +42 -0
  64. SLiCAP/files/LTspice/SLiCAPsymbolsLTSpice.asc +108 -0
  65. SLiCAP/files/gSchem/gnet-spice-noqsi-master/README.md +9 -0
  66. SLiCAP/files/gSchem/gnet-spice-noqsi-master/gnet-spice-noqsi.scm +608 -0
  67. SLiCAP/files/gSchem/gnet-spice-noqsi-master/install.sh +5 -0
  68. SLiCAP/files/gSchem/gnet-spice-noqsi-master/scheme-path.scm +2 -0
  69. SLiCAP/files/gSchem/gnet-spice-noqsi-master/test/model-test.sch +30 -0
  70. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Models/nch.sym +48 -0
  71. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Models/openIP.inc +1106 -0
  72. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Models/pch.sym +48 -0
  73. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Models/submicron.inc +55 -0
  74. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Schematic/Comparator.sch +317 -0
  75. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Schematic/DISCRI.sch +237 -0
  76. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Simulation/DISCRItest.sch +129 -0
  77. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Simulation/control.cir +5 -0
  78. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Simulation/geda.conf +2 -0
  79. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Symbols/BIAS1-1.sym +59 -0
  80. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Symbols/Comparator.sym +47 -0
  81. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Symbols/DISCRI.sym +94 -0
  82. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Symbols/EDFFP-1.sym +96 -0
  83. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Symbols/INV1P-1.sym +52 -0
  84. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Symbols/NANDP-1.sym +63 -0
  85. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Symbols/NORP-1.sym +64 -0
  86. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Symbols/Noqsi-title-B.sym +41 -0
  87. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Symbols/RSFF1-1.sym +71 -0
  88. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Symbols/Vdd.sym +15 -0
  89. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Symbols/Vdd1.sym +15 -0
  90. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Symbols/Vss.sym +15 -0
  91. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/ASIC/Symbols/Vss1.sym +15 -0
  92. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/BBamp/Schematic/BBamp.sch +269 -0
  93. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/BBamp/Schematic/Board.sch +54 -0
  94. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/BBamp/Simulation/Test.sch +131 -0
  95. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/BBamp/Simulation/geda.conf +2 -0
  96. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/BBamp/Simulation/transistors.lib +54 -0
  97. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/BBamp/Symbols/BBamp.sym +58 -0
  98. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/BBamp/Symbols/Noqsi-title-B.sym +41 -0
  99. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/BBamp/Symbols/pwrjack-RAPC712.sym +45 -0
  100. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/HelloWorld/HelloWorld.sch +50 -0
  101. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/Images/BBamp.png +0 -0
  102. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/Images/Board.png +0 -0
  103. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/Images/Comparator.png +0 -0
  104. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/Images/DISCRI.png +0 -0
  105. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/Images/DISCRItest.png +0 -0
  106. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/Images/HelloWorld.png +0 -0
  107. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/Images/Test.png +0 -0
  108. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/Images/dB.jpg +0 -0
  109. SLiCAP/files/gSchem/gnet-spice-noqsi-master/tutorial/Images/dB.tiff +0 -0
  110. SLiCAP/files/gSchem/symbols/0.sym +19 -0
  111. SLiCAP/files/gSchem/symbols/ABCD.sym +84 -0
  112. SLiCAP/files/gSchem/symbols/C.sym +31 -0
  113. SLiCAP/files/gSchem/symbols/D.sym +40 -0
  114. SLiCAP/files/gSchem/symbols/DevicesGschem.eps +1998 -0
  115. SLiCAP/files/gSchem/symbols/DevicesGschem.sch +493 -0
  116. SLiCAP/files/gSchem/symbols/E.sym +63 -0
  117. SLiCAP/files/gSchem/symbols/EZ.sym +68 -0
  118. SLiCAP/files/gSchem/symbols/F.sym +70 -0
  119. SLiCAP/files/gSchem/symbols/G.sym +66 -0
  120. SLiCAP/files/gSchem/symbols/G_g.sym +66 -0
  121. SLiCAP/files/gSchem/symbols/H.sym +65 -0
  122. SLiCAP/files/gSchem/symbols/HZ.sym +71 -0
  123. SLiCAP/files/gSchem/symbols/I.sym +40 -0
  124. SLiCAP/files/gSchem/symbols/J.sym +51 -0
  125. SLiCAP/files/gSchem/symbols/K.sym +18 -0
  126. SLiCAP/files/gSchem/symbols/L.sym +32 -0
  127. SLiCAP/files/gSchem/symbols/M.sym +64 -0
  128. SLiCAP/files/gSchem/symbols/MD-H.sym +78 -0
  129. SLiCAP/files/gSchem/symbols/MD-V.sym +78 -0
  130. SLiCAP/files/gSchem/symbols/M_noise.sym +50 -0
  131. SLiCAP/files/gSchem/symbols/N.sym +62 -0
  132. SLiCAP/files/gSchem/symbols/N_dcvar.sym +93 -0
  133. SLiCAP/files/gSchem/symbols/N_noise.sym +66 -0
  134. SLiCAP/files/gSchem/symbols/O.sym +49 -0
  135. SLiCAP/files/gSchem/symbols/O_dcvar.sym +51 -0
  136. SLiCAP/files/gSchem/symbols/O_noise.sym +49 -0
  137. SLiCAP/files/gSchem/symbols/Q.sym +58 -0
  138. SLiCAP/files/gSchem/symbols/QD-H.sym +70 -0
  139. SLiCAP/files/gSchem/symbols/QD-V.sym +68 -0
  140. SLiCAP/files/gSchem/symbols/Q_noise.sym +46 -0
  141. SLiCAP/files/gSchem/symbols/Q_noise_LF.sym +50 -0
  142. SLiCAP/files/gSchem/symbols/R.sym +38 -0
  143. SLiCAP/files/gSchem/symbols/R_r.sym +38 -0
  144. SLiCAP/files/gSchem/symbols/T.sym +70 -0
  145. SLiCAP/files/gSchem/symbols/V.sym +37 -0
  146. SLiCAP/files/gSchem/symbols/W.sym +62 -0
  147. SLiCAP/files/gSchem/symbols/XJ.sym +53 -0
  148. SLiCAP/files/gSchem/symbols/XM.sym +68 -0
  149. SLiCAP/files/gSchem/symbols/XMD-H.sym +82 -0
  150. SLiCAP/files/gSchem/symbols/XMD-V.sym +82 -0
  151. SLiCAP/files/gSchem/symbols/XMV.sym +72 -0
  152. SLiCAP/files/gSchem/symbols/XQ.sym +70 -0
  153. SLiCAP/files/gSchem/symbols/XQD-H.sym +72 -0
  154. SLiCAP/files/gSchem/symbols/XQD-V.sym +72 -0
  155. SLiCAP/files/gSchem/symbols/Z.sym +30 -0
  156. SLiCAP/files/gSchem/symbols/detectorDef.sym +10 -0
  157. SLiCAP/files/gSchem/symbols/include.sym +10 -0
  158. SLiCAP/files/gSchem/symbols/lgrefDef.sym +10 -0
  159. SLiCAP/files/gSchem/symbols/modelDef.sym +10 -0
  160. SLiCAP/files/gSchem/symbols/parDef.sym +10 -0
  161. SLiCAP/files/gSchem/symbols/sourceDef.sym +10 -0
  162. SLiCAP/files/html/css/slicap.css +153 -0
  163. SLiCAP/files/html/img/Grid.png +0 -0
  164. SLiCAP/files/kicad/SLiCAP.kicad_prl +83 -0
  165. SLiCAP/files/kicad/SLiCAP.kicad_pro +407 -0
  166. SLiCAP/files/kicad/SLiCAP.kicad_sch +14196 -0
  167. SLiCAP/files/kicad/SLiCAP.kicad_sym +10314 -0
  168. SLiCAP/files/lepton-eda/SLiCAPcomponents.sch +532 -0
  169. SLiCAP/files/lepton-eda/symbols/0.sym +19 -0
  170. SLiCAP/files/lepton-eda/symbols/ABCD.sym +84 -0
  171. SLiCAP/files/lepton-eda/symbols/C.sym +31 -0
  172. SLiCAP/files/lepton-eda/symbols/D.sym +40 -0
  173. SLiCAP/files/lepton-eda/symbols/E.sym +63 -0
  174. SLiCAP/files/lepton-eda/symbols/EZ.sym +68 -0
  175. SLiCAP/files/lepton-eda/symbols/F.sym +70 -0
  176. SLiCAP/files/lepton-eda/symbols/G.sym +66 -0
  177. SLiCAP/files/lepton-eda/symbols/G_g.sym +66 -0
  178. SLiCAP/files/lepton-eda/symbols/H.sym +65 -0
  179. SLiCAP/files/lepton-eda/symbols/HZ.sym +71 -0
  180. SLiCAP/files/lepton-eda/symbols/I.sym +40 -0
  181. SLiCAP/files/lepton-eda/symbols/J.sym +51 -0
  182. SLiCAP/files/lepton-eda/symbols/K.sym +18 -0
  183. SLiCAP/files/lepton-eda/symbols/L.sym +32 -0
  184. SLiCAP/files/lepton-eda/symbols/M.sym +64 -0
  185. SLiCAP/files/lepton-eda/symbols/MD-H.sym +78 -0
  186. SLiCAP/files/lepton-eda/symbols/MD-V.sym +78 -0
  187. SLiCAP/files/lepton-eda/symbols/M_noise.sym +50 -0
  188. SLiCAP/files/lepton-eda/symbols/N.sym +62 -0
  189. SLiCAP/files/lepton-eda/symbols/N_dcvar.sym +93 -0
  190. SLiCAP/files/lepton-eda/symbols/N_noise.sym +66 -0
  191. SLiCAP/files/lepton-eda/symbols/O.sym +49 -0
  192. SLiCAP/files/lepton-eda/symbols/O_dcvar.sym +51 -0
  193. SLiCAP/files/lepton-eda/symbols/O_noise.sym +49 -0
  194. SLiCAP/files/lepton-eda/symbols/Q.sym +58 -0
  195. SLiCAP/files/lepton-eda/symbols/QD-H.sym +70 -0
  196. SLiCAP/files/lepton-eda/symbols/QD-V.sym +68 -0
  197. SLiCAP/files/lepton-eda/symbols/Q_noise.sym +46 -0
  198. SLiCAP/files/lepton-eda/symbols/R.sym +38 -0
  199. SLiCAP/files/lepton-eda/symbols/R_r.sym +38 -0
  200. SLiCAP/files/lepton-eda/symbols/T.sym +70 -0
  201. SLiCAP/files/lepton-eda/symbols/V.sym +37 -0
  202. SLiCAP/files/lepton-eda/symbols/W.sym +62 -0
  203. SLiCAP/files/lepton-eda/symbols/XJ.sym +53 -0
  204. SLiCAP/files/lepton-eda/symbols/XM.sym +68 -0
  205. SLiCAP/files/lepton-eda/symbols/XMD-H.sym +82 -0
  206. SLiCAP/files/lepton-eda/symbols/XMD-V.sym +82 -0
  207. SLiCAP/files/lepton-eda/symbols/XMV.sym +72 -0
  208. SLiCAP/files/lepton-eda/symbols/XQD-H.sym +72 -0
  209. SLiCAP/files/lepton-eda/symbols/XQD-V.sym +72 -0
  210. SLiCAP/files/lepton-eda/symbols/Z.sym +30 -0
  211. SLiCAP/files/lepton-eda/symbols/detectorDef.sym +10 -0
  212. SLiCAP/files/lepton-eda/symbols/include.sym +10 -0
  213. SLiCAP/files/lepton-eda/symbols/lgrefDef.sym +10 -0
  214. SLiCAP/files/lepton-eda/symbols/modelDef.sym +10 -0
  215. SLiCAP/files/lepton-eda/symbols/parDef.sym +10 -0
  216. SLiCAP/files/lepton-eda/symbols/sourceDef.sym +10 -0
  217. SLiCAP/files/lib/Grid.png +0 -0
  218. SLiCAP/files/lib/SLiCAP.lib +519 -0
  219. SLiCAP/files/lib/SLiCAPmodels.lib +166 -0
  220. SLiCAP/files/lib/slicap.css +153 -0
  221. SLiCAP/files/sphinx/Makefile +19 -0
  222. SLiCAP/files/sphinx/_static/custom.css +6 -0
  223. SLiCAP/files/sphinx/_static/handsontable.full.min.css +31 -0
  224. SLiCAP/files/sphinx/_static/handsontable.full.min.js +89 -0
  225. SLiCAP/files/sphinx/_static/html_logo.png +0 -0
  226. SLiCAP/files/sphinx/_templates/layout.html +11 -0
  227. SLiCAP/files/sphinx/_templates/table.html +16 -0
  228. SLiCAP/files/sphinx/conf.py +50 -0
  229. SLiCAP/files/sphinx/img/SLiCAP-h1.svg +154 -0
  230. SLiCAP/files/sphinx/img/SLiCAP.svg +149 -0
  231. SLiCAP/files/sphinx/img/colorCode.svg +242 -0
  232. SLiCAP/files/sphinx/index.rst +10 -0
  233. SLiCAP/files/sphinx/make.bat +35 -0
  234. SLiCAP/files/sphinx/source/Makefile +19 -0
  235. SLiCAP/files/sphinx/source/_templates/table.html +16 -0
  236. SLiCAP/files/sphinx/source/make.bat +35 -0
  237. SLiCAP/files/tex/SLiCAPdata/TEXsubstitutions.tex +1 -0
  238. SLiCAP/files/tex/preambuleSLiCAP.tex +122 -0
  239. slicap-3.3.dist-info/METADATA +116 -0
  240. slicap-3.3.dist-info/RECORD +242 -0
  241. slicap-3.3.dist-info/WHEEL +5 -0
  242. 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()