edge_metrics
Quantify transition speed including rise time, fall time, and slew rate from a transient simulation by analyzing a specified time window.
Instructions
Use when you need to quantify HOW FAST one transition happened: rise time, fall time, slew rate. Inputs a transient .raw plus a time window around the edge of interest.
Returns: transition_time (10→90% by default, configurable via low_pct/high_pct), slew_rate (V/s or A/s), detected low/high levels, and the three crossing times.
Levels are auto-estimated from the first/last 10% of the window — NOT global min/max — so overshoot/undershoot doesn't poison the level estimate. Crossings are sub-sample-accurate via linear interpolation. Rejects AC analysis.
PICK THE WINDOW. If the transient has startup glitches or multiple edges, set t_start/t_end tightly around the edge you care about — otherwise you get the first edge in the full waveform, which is often the power-up artifact. Use edge_index only when multiple edges in the window are intentional.
For settling/overshoot after the edge, use pulse_response. For delay between two signals' edges, use timing_between.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| raw_file | Yes | Path to .raw transient result file | |
| signal | Yes | Signal name (e.g. 'V(out)') | |
| step | No | Step index for .step sweeps | |
| t_start | No | Window start time in SPICE notation (e.g. '1m', '100u'). Strongly recommended when the transient contains startup transients or multiple edges — otherwise the first edge in the full waveform is measured (often the power-up glitch). | |
| t_end | No | Window end time in SPICE notation | |
| edge | No | Edge direction. 'auto' infers from window endpoints. | auto |
| edge_index | No | Which matching edge in the window (0 = first). Use with tight t_start/t_end for determinism. | |
| low_pct | No | Low threshold percent (default 10%) | |
| high_pct | No | High threshold percent (default 90%) | |
| low_level | No | Absolute low rail level, overriding auto-detection. Use when the auto estimate (mean of first/last 10%) is biased — e.g. a rise-from-rail where early samples cluster in the fast ramp. | |
| high_level | No | Absolute high rail level, overriding auto-detection. | |
| format | No | 'json' or 'text' |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| transition_time | Yes | ||
| slew_rate | Yes | ||
| low_level | Yes | ||
| high_level | Yes | ||
| t_low_crossing | Yes | ||
| t_high_crossing | Yes | ||
| t_mid_crossing | Yes | ||
| edge_direction | Yes | ||
| is_rise_time | Yes | ||
| low_pct | Yes | ||
| high_pct | Yes | ||
| num_edges_in_window | Yes | ||
| warnings | Yes | ||
| signal | Yes |