pingspice.analysis.param.DataParser(ParserBase)
class documentation
Part of pingspice.analysis.param
(View In Hierarchy)
I parse text or text files with columnar data defining the goals for a device's performance.
Construct me with an instance of Setups
and
call the instance of me (not of Setups
) to
obtain an Xs dict keyed by setup ID. This dict will be the Xs
dict already present in the setups instance, updated with the entries I add
to it.
Comments (lines beginning with '#', or portions of a line after a '#' following a space) and blank lines are ignored.
Setups are identified by ID = <int>
.
Array columns containing only constant values are set by:
<name> = <value>
Array columns are defined by their names, separated by space, followed by a line beginning with two or more hyphens ('-------'), followed by one or more lines of space-delimited real numbers. All of the numbers in a column may be negated by proceeding the column name with a '-'.
Values in a column may be scaled with:
scale <name> <scaling factor>
An example that produces, for ID=1, an array with three columns and four rows, i.e., four goal points of three values each, with one of the values (for 'gate') being a constant:
ID = 1 gate = 5 drain -vds#branch -------------------------------- 0.51763632950 6.72268907563 0.99683484885 11.7647058824 1.51425659183 15.7983193277 1.95499047772 18.8235294118
If another table is found with the same ID and column names but, say,
gate = 10
, its entries will be included in the array for ID=1
with the 'gate' value set to 10 instead of 5.
If just certain setups are desired, provide a list of setup IDs. The returned list will contain the 2-D goal point array(s) in the order of the IDs provided. You can also specify one or more skippedIDs.
Method | __init__ | DataParser(setups) |
Method | assembleXs | Assembles and returns a dict of 2-D arrays keyed by ID, each containing a column vector for each name in its respective nameList. |
Method | __call__ | Call to get a dict of 2-D goal point arrays, keyed by setup ID. This method does not store the dict anywhere. |
Inherited from ParserBase:
Method | readLines | Undocumented |