Creates a table with parameter definitions of *circuitObject*. If no label AND no caption are given this method returns a LaTeX tabular snippet. Else it returns a table snippet. :param circuitObject: SLiCAP circuit object that comprises the circuit
(self, circuitObject, label="", caption="", color="myyellow")
| 142 | return Snippet(TEX, self.format) |
| 143 | |
| 144 | def parDefs(self, circuitObject, label="", caption="", color="myyellow"): |
| 145 | """ |
| 146 | Creates a table with parameter definitions of *circuitObject*. |
| 147 | If no label AND no caption are given this method returns a LaTeX |
| 148 | tabular snippet. Else it returns a table snippet. |
| 149 | |
| 150 | :param circuitObject: SLiCAP circuit object that comprises the circuit |
| 151 | data to be listed. |
| 152 | :type circuitObject: SLiCAP.SLiCAPprotos.circuit |
| 153 | |
| 154 | :param label: Reference label for the table. Defaults to an empty |
| 155 | string. |
| 156 | :type label: str |
| 157 | |
| 158 | :param caption: Text that will used as table caption. |
| 159 | :type caption: str |
| 160 | |
| 161 | :param color: Alternate row color name, should be defined in |
| 162 | 'preambuleSLiCAP.tex' defaults to 'myyellow'. Use None for |
| 163 | no background color. |
| 164 | :type color: str |
| 165 | |
| 166 | :return: SLiCAP Snippet object |
| 167 | :rtype: SLiCAP.SLiCAPprotos.Snippet |
| 168 | """ |
| 169 | |
| 170 | headerList = ["ID", "Nodes", "Refs", "Model", "Param", "Symbolic", |
| 171 | "Numeric"] |
| 172 | alignstring= '[c]{lllllll}' |
| 173 | linesList = [] |
| 174 | for key in circuitObject.elements.keys(): |
| 175 | el = circuitObject.elements[key] |
| 176 | line = [key] |
| 177 | lineItem = '' |
| 178 | for node in el.nodes: |
| 179 | lineItem += node + ' ' |
| 180 | line.append(lineItem) |
| 181 | |
| 182 | lineItem = '' |
| 183 | for ref in el.refs: |
| 184 | lineItem += ref + ' ' |
| 185 | line.append(lineItem) |
| 186 | line.append(el.model) |
| 187 | if len(el.params.keys()) == 0: |
| 188 | line += ['','',''] |
| 189 | else: |
| 190 | keys = list(el.params.keys()) |
| 191 | for i in range(len(keys)): |
| 192 | if i == 0: |
| 193 | line.append(keys[i]) |
| 194 | line.append(el.params[keys[i]]) |
| 195 | line.append(fullSubs(el.params[keys[i]], |
| 196 | circuitObject.parDefs)) |
| 197 | linesList.append(line) |
| 198 | else: |
| 199 | line = ['','','',''] |
| 200 | line.append(keys[i]) |
| 201 | line.append(el.params[keys[i]]) |
nothing calls this directly
no test coverage detected