The ExtractCurve() function copies a curve from a previously executed test defined by the test label, renames it, and plots the curve on the specified graph address. This function allows comparisons between multiple previously run tests. By using the NoSimulation analysis option, tests can be created without actually launching a simulation, but instead to produce summary curves from previous tests.
By default, ExtractCurve extracts curves from single step simulations. You can extract curves from Multi-Step or Monte Carlo simulations by specifying the params keyword in the optional parameter string. The params keyword specifies a simulation step defined by the stepped parameter name and value. If multiple parameters are stepped, all parameter name-value pairs must be specified. This capability was introduced in version 8.10. The params keyword will be ignored in versions prior to 8.10.
A call to the ExtractCurve() function does the following:
ExtractCurve(label, curve_name_to_extract, new_curve_name, graph_name, grid_index, axis_name, OPTIONAL_PARAMETER_STRING)
Arg # | Argument Name | Description |
1 | label | Report label on the previously run test |
2 | curve_name_to_extract | Name of the curve to extract |
3 | new_curve_name | New name for the curve |
4 | graph_name | Name of the graph for the new test report* |
5 | grid_index | Grid on which to place the curve* |
6 | axis_name | Axis on a particular grid* |
7 | OPTIONAL_PARAMETER_STRING | A space-separated set of KEY=VALUE pairs that define additional parameters** |
* For additional information about graph_name, grid_index, and axis_name, see Graph Address System.
** For additional information about OPTIONAL_PARAMETER_STRING, see Optional Parameters.
The following call to the ExtractCurve() function copies a Bode diode, forward-biased curve taken from a SIMetrix simulation and adds it to a graph with the SIMPLIS simulation data for comparison.
ExtractCurve(TEMP=-40|Body Diode|SIMetrix, DVM SIMetrix, DVM SIMetrix, Body Diode Forward Biased, A1, vertical, xlabel=Body Diode Forward Voltage ylabel=Body Diode Forward Current color=green ygrid=5)
The following syntax rules apply to the OPTIONAL_PARAMETER_STRING argument:
ylabel=Body Diode Forward Current Temp=-40In this case , the program would read this incorrectly as two optional parameters:
Spaces in values are allowed as long as no spaces are on either side of the equal sign. Thee three examples below illustrate this:
The following table lists the available formatting options for use in the OPTIONAL_PARAMETER_STRING argument.
Parameter Syntax | Value Type | Description |
xgrid=positive_integer | Any positive integer | Specifies space between the x gridlines |
|
Parameter name and value pair, delimited by a colon. Multiple parameter name=pairs are joined with a tilde (~). | Used for a Monte Carlo or Multi-Step simulation to extract a curve from a specific simulation step defined by the stepped parameter name and value pair(s). |
ygrid=positive_integer | Any positive integer | Specifies space between the y gridlines |
xscale=lin | log | One of two options:
|
Specifies the units for the x axis |
yscale=lin | log |
O ne of two options:
|
Specifies the units for the y axis |
xlabel=string | Any alphanumeric string | Specifies a label for the x axis |
ylabel=string | Any alphanumeric string | Specifies a label for the y
axis The ArbitraryBodePlot()function ignores this option if curves are placed on multiple grids. |
xunits=string | Any alphanumeric string | Specifies the units label for the x axis |
yunits=string | Any alphanumeric string | Specifies the units label
for the y axis. The ArbitraryBodePlot() function ignores this option. |
xMinlimit=integer | Any positive or negative integer | Specifics the minimum x-axis limit |
xMaxlimit=integer | Any positive or negative integer | Specifics the maximum x-axis limit |
yMinlimit=integer | Any positive or negative integer | Specifics the minimum y-axis limit |
yMaxlimit=integer | Any positive or negative integer | Specifics the maximum y-axis limit |
showpoints=TRUE | FALSE | TRUE or FALSE | Specifies whether or not to show points on graph. |
color=color_specification | One of three options to
specify the color:
|
Specifies the color for the
curve. Note: See the next section for information on these three methods for specifying a color.. |
You have three options for specifying the color for a curve:
color=color_namewhere color_name is one of the 16 built-in color aliases as listed in the following table with the hexadecimal code.
Color Name Alias | Hex Code | |
Red | #FF0000 | |
Green | #008000 | |
Blue | #0000FF | |
Teal | #008080 | |
Purple | #800080 | |
Maroon | #800000 | |
Navy | #000080 | |
Black | #000000 | |
Magenta | #FF00FF | |
Lime | #00FF00 | |
Salmon | #FA8072 | |
Medium violet red | #C71585 | |
Brown | #A52A2A | |
Indigo | #4B0082 | |
Medium orchid | #BA55D3 | |
Blue violet | #8A2BE2 |
color=#rrggbbwhere rr, gg, and bb are hex numbers from 00 to FF.
You can specify any color for the curve by using a hexadecimal specification.
color=SEQ:nwhere n is a positive integer between 1 and 20.
SIMetrix has eight default curve colors, starting with red, green, blue, etc.
To change and extend these colors to a maximum of 20 user-defined curve colors, follow these steps:
The ExtractCurve() function is also available as a SIMetrix script function and can be called from a post-process or a final-process script. Calling this function from a script is useful when you need to generate a large number of curves and/or if the length of the arguments makes the testplan difficult to read or edit.
SimplisDVMAdvancedUtilMeasurementExtractCurve(array, log_file)
Argument | Description |
array | A string array that contains the normal arguments to the ExtractCurve() function |
log_file | The DVM log file that is an argument passed into the post and final process scripts |
The Example above could be generated in a post-process script with the statement below:
Let return = SimplisDVMAdvancedUtilMeasurementExtractCurve([ 'TEMP=-40|Body Diode|SIMetrix', 'DVM SIMetrix', 'DVM SIMetrix', + 'Body Diode Forward Biased', 'A1', 'vertical', 'xlabel=Body Diode Forward Voltage ylabel=Body Diode Forward Current color=green ygrid=5' ], log_file)