<!-- TE10 Studio documentation: /docs/app/results -->
# Results

Everything on this page is on the **Results** tab and in the **Results** menu. Results belong to the
last solve of each setup and are saved in the project's `.te10results` folder
([what is where](#the-results-folder)).

## S-parameters

**S-Parameters** (Results tab) opens the S-parameter window as a tab next to the Model View.
**S-Parameters in Separate Window** opens it as its own window, and **Open in Window** moves the tab
out. **Import Solution Data (Touchstone)...** loads `.sNp` files to plot alongside, or on their own.

![The S-parameter window: the plot list and settings on the left, the plot on the right](/docs/img/app/main-sparams-wr90.webp)

The S-parameter window shows the latest solve (the *Simulation* data set), imported Touchstone
files and data sets derived from them. Instead of picking S_ij entries, you plot **channels** and pick
a **measurement**: insertion loss, return loss, crosstalk, TDR and so on. The window works out which
S-parameters that means from the port map.

### Channels, sides and pairs (the port map)

Every port belongs to a channel (signal), sits at one end of it (side 1 or side 2) and is either
single-ended or the + / − half of a differential pair. TE10 Studio detects this when a data set is
added:

- The through partner of a port is the port it couples to most strongly over the lowest 10 % of the
  band (better than about −15 dB). The lower-numbered end of each through is side 1.
- The two terminals of one wave port (`P1_T1`, `P1_T2`) form a differential pair. Otherwise pairs
  come from the **coupling between lines**: two lines are a pair when their crosstalk (the stronger
  of NEXT and FEXT, averaged over the band) is better than −30 dB, each is the other's most strongly
  coupled line, and both couple at least 3 dB more to each other than to any other line. A pair is
  then plotted as differential (DD) by default. Evenly spaced single-ended lines (a bus) have no
  clear partner, so they stay single-ended. The port numbering doesn't matter (1-2 / 3-4 and
  1-3 / 2-4 both work), because the throughs decide which port is at which end.
- With no clear throughs (a divider, an antenna array, a filter bank), port 1 is the input and every
  other port is an output, so *Insertion loss* shows S21, S31, ….

**Ports…** (Tools ▾) shows the map as a table (Port | Channel | Side | Polarity). It opens by itself
when an imported file's ports can't be sorted into channels (no clear through for every port). Use
*Auto-detect* to run the detection again, or *Swap sides* to swap the ends. The Simulation data
set's map is saved with the project.

### The side panel

- **Top row**: Add plot ▾, Layout ▾ and **Import…** (Touchstone files, several at once). Below it, the
  list of plots.
- **The plot's settings** (titled with its measurement): only what applies to what is plotted, such
  as the **Side** (side 1, side 2 or both, for every trace in this plot; **Driven from** for FEXT;
  hidden for one-sided data), the **Mode**, the **Aggressors** for crosstalk (each, power sum or both), the TDR edge, or
  *Subtract* with several data sets (tick it to plot every other data set minus the chosen one, e.g.
  each sweep variant relative to a reference). The plot type and measurement are picked with
  **Add plot ▾**. Settings that don't apply are removed from the panel, not greyed out, and the group
  is hidden when there are none.
- **Axes** (Frequency and Time plots): Min / Max / Auto for X and Y, Log for frequency. Typing a value
  sets the view and unticks Auto. Zooming on the plot updates the boxes.
- **Tools ▾**: Renormalize (one impedance for every port, or one for side-1 ports and another for
  side-2 ports), Port extension, Cascade, De-embed fixtures, Enforce passivity, Causality, Checks
  (passivity, reciprocity, stability), Ports…. With more than one data set loaded, each Tool and each
  data export first asks which data set it acts on.

Every channel of a data set is plotted; click a trace in the plot's legend to turn it off. A data set
is unloaded from the window with *Remove from window* in the data-set picker (Add plot, Data sets…).
- **Export ▾**: Touchstone, CSV (whole network), Plotted traces (CSV), RLGC, Image, Image of all
  plots, Copy image, Copy data. Images are exported in light colours unless *Images as shown* is ticked.

![Return loss of the WR-90 PTFE example](/docs/img/app/sparams-plot2.webp)

### Measurements

| Measurement | Plotted | Shown when |
|---|---|---|
| Insertion loss | 20·log10\|S\| of the through term (S21, SDD21, SCC21, …) | a channel has two ends |
| Return loss, VSWR, Input impedance | the reflection at the chosen side (S11, SDD11, …) | always |
| NEXT | victim = each ticked channel, aggressor = every other channel at the same end | two or more channels |
| FEXT | far end of the victim, aggressors driven at the chosen side | two or more two-ended channels |
| Mode conversion | SCD21 + SCD11 (and / or SDC) | a differential pair |
| Group delay, Phase (unwrapped) | of the through term | a channel has two ends |
| Intra-pair skew | delay of the + leg minus the − leg, in ps | a two-ended pair |

All losses are plotted as negative dB (20·log10|S|): the curves go down, as in other EM and network-analysis tools.
Mode names are response-then-stimulus: SCD21 is the common-mode output at side 2 for a
differential drive at side 1. For NEXT and FEXT the mode is victim-then-aggressor, and SD, SC, DS
and CS appear when the data has both pairs and single-ended channels. Differential references are 2·Z0
and common references are Z0/2.

### Time domain (TDR)

The time plot shows the TDR impedance (Ω) of a reflection against time (ns).

- **Edge → Rise time** (default): the rise time and how it is **Measured** (10–90 %, 20–80 % or 0–100 %).
  At the minimum, *Fastest*, each data set uses the fastest edge its top frequency supports: about
  0.875 / f_max for 10–90 %, and 1 / f_max for a 0–100 % linear ramp. A faster typed value is clamped,
  and the legend notes it.
- **Edge → Window**: a windowed step (Hamming, Hann, Blackman, Tukey, boxcar) instead of a shaped edge.
- **Sweeps that aren't evenly spaced** (an HFSS log or adaptive sweep, for example) are resampled onto
  an even grid from 0 Hz first, with the step of the sweep's coarse end.
- **Data without points close to DC**: a sweep that doesn't start at 0 Hz is extrapolated to DC. When
  the DC point extrapolated from the two lowest frequencies and from the next two differ by more than
  0.02 in |S| (about 2 Ω on a 50 Ω TDR), the plot gets a ⚠: the start and the settled level of the
  TDR are uncertain, and the sweep should start lower. The eye diagram shows the same warning.
- **Auto range** starts about one rise time before the launch. It ends after the structure's round
  trip (twice the through delay) once the trace settles, and stops at 1.5 round trips at most, so
  late ringing isn't shown. For one-sided data, it ends a few rise times after the last change.

Gating, impulse and step responses are no longer in the window. They stay in the scripting API
(`networks.time_response`).

### Several plots, layouts

The window holds up to six plots, listed at the top of the side panel under **Add plot ▾** and
**Layout ▾**. One plot is on screen at a time: click a plot in the list (or use Up / Down there) to show
it, and the plot's settings below the list then edit that plot. Use **Add plot ▾** to add one. With more than one data set loaded, a new plot first asks which
data sets it shows (All / None buttons help with the files of a sweep); right-click the plot, or its
entry in the list, → **Data sets…** to change that later. The default plots show the simulation's
results, or the files of the first import (all of them when you pick several at once); files imported
later aren't added to any plot until you add them with Data sets…. A data set made by a tool
(Renormalize, De-embed, ...) joins the plots that show the data set it came from.
Loading a saved layout from Layout ▾ asks which data sets its plots show (unless there is only one). Drag list entries to reorder them; Delete or right-click →
*Close plot* removes one. Frequency plots share their x-axis (zoom one, the others follow), as do
time plots, unless *Link X* is off. Markers are shared across linked plots. *Export ▾ → Image of all
plots* puts every listed plot in one image, as a grid.

**Layout ▾ → Save as default** saves the plots you have now (each plot's settings and axis limits, not
the data sets or channels) as *My default*: every S-parameter opened from then on (the first results of a
project, or the first Touchstone file imported into an empty window) starts with those plots. **Save
as…** saves them under a name of your own, for several set-ups; the menu also lists the saved layouts,
picks the default among them, and manages or resets them. Until you save one, the default is the
factory layout (Insertion loss, Return loss and TDR). A re-solve keeps plots you rearranged by hand.
Plots whose measurement doesn't apply to the data, such as insertion loss on a 1-port, are left out of the list for that data but stay in the
layout.

### Mouse

The bar above each plot works like Plotly's: **Zoom** (the default), **Pan** and **Marker** pick what
dragging the left button does, **Reset** returns to the full view, and **Log f** switches the frequency
axis to log.

| Action | Effect |
|---|---|
| Drag (Zoom) | zoom into the box (drawn as an outline); a mostly sideways drag draws a line with end ticks and zooms x only, a mostly up-down one y only |
| Drag (Pan), right- or middle-drag | pan |
| Click (Marker) | add a marker (snaps to the data); drag it to move it, Delete removes it |
| Double-click, Reset | back to the full view (Auto on both axes) |
| Wheel | zoom about the cursor; over an axis, that axis only |
| Drag an axis | pan that axis only |
| Double-click an axis | Min / Max / Auto (/ Log) pop-up |
| Click the first or last tick label | type that limit in place |
| Hover near a trace | a label next to the point with its value (on Smith, also Z); nothing elsewhere |
| Click a legend entry | hide / show that trace (hover highlights it) |
| Double-click a legend entry | show only that trace; again shows them all |

Markers are listed under the plot while there are any.

**Import Touchstone…** takes several files at once (pick them all in the dialog), e.g. the files of a
parametric sweep; each becomes a data set named after its file. With several data sets (imported
Touchstone files, a parametric sweep) each trace is named after its
data set when every data set gives the same term, as in a sweep; otherwise "data set: term".

## Field plots

Fields are saved at the solution frequency by default (see [Save Fields](/docs/app/solving#frequency-sweep-driven)).
On the **Results** tab, **Field Plot ▾** creates a plot:

| Plot | Shows |
|---|---|
| **E Magnitude...** | |E| at a phase |
| **E Peak Magnitude...** | The peak |E| over a cycle |
| **E Vectors...**, **H Vectors...** | Arrows |
| **H Magnitude...** | |H| |
| **Surface Current...** | Current density on conductor surfaces |
| **Power Flow...** | The Poynting vector |
| **Field Plot...** | Any of these, with every option |

![Create Field Plot](/docs/img/app/dlg-field-plot.webp){: .half }

In the window choose the quantity, the excitation (port), the frequency or mode, and the phase; then
**where** to plot: the whole model (the outer surface of the solved region), the selected objects, all
conductor surfaces, or a cut plane (**New Plane...**, or **Insert Cut Plane...** on the Results tab: normal
to an axis, or through a point with a normal). The scale is linear, log or dB (20·log10), automatic or a
fixed minimum and maximum, with the number of colour divisions, the colour map and the opacity. Vector plots
also set about how many arrows, the longest arrow, and whether every arrow has the same length.

![|E| in the WR-90 guide with its PTFE slab](/docs/img/app/main-field-plot.webp)

Plots are listed under **Field Plots** in the tree: click one to change it in **Properties**, right-click to
edit, hide, delete or **animate** it over phase or over the saved frequencies or modes, with GIF or MP4
export. **Show Plots** / **Hide Plots** switch them all. Port mode fields are under **Port Modes**.

## Far field

With a [far-field setup](/docs/app/ports-boundaries#far-field) and an open boundary, a driven solve gives
the radiation pattern.

**3D Pattern** draws it over the model:

![3D radiation pattern over the microstrip example](/docs/img/app/main-farfield.webp)

The panel picks the port (**Source**), frequency, **Quantity** (directivity, gain, realized gain),
**Component** (total, θ, φ, and others), linear or dB, the dynamic range, size and opacity, and lists the
peak directivity and its direction, peak gain and realized gain, radiated and accepted power, and the
radiation efficiency.

**2D Cuts** (**Far Field Cuts (2D Polar)...**) plots the pattern in chosen planes on polar axes.

**RCS** (**Scattering (RCS) Results...**) gives the bistatic radar cross-section of a plane-wave solve in
m² or dBsm, per cut, and the monostatic RCS at each wave's own incidence direction.

## Monitors and probes

**Monitor Results** lists the probes, voltage monitors and current monitors against frequency, with CSV
export. See [Monitors](/docs/app/ports-boundaries#monitors).

**Floquet Port Results...** shows the S-parameters of a periodic cell per diffraction order.

## Lines, eyes and circuit models

| Command | Gives |
|---|---|
| **Transmission Line Parameters (RLGC)...** | The per-length capacitance and inductance matrices from electrostatic and magnetostatic solves, the self Z₀, phase velocity, delay and effective permittivity, and a lossless SPICE model |
| **RLGC from Static Solves...** | Pick the signal and ground conductors of a uniform line; TE10 creates the two static setups, solves them and opens the result above |
| **Export ▾ › RLGC** (S-parameter window) | Per-metre R, L, G, C from the S-parameters of a driven solve, with ports at both ends of each conductor |
| **Eye Diagram...** | The eye of a pseudo-random bit sequence (PRBS) sent through the network selected in the S-parameter window (or a Touchstone file): choose the send and receive ports, bit rate, driver rise time and pattern length |
| **Export SPICE Model...** | The selected network as a SPICE subcircuit, with the fit error and passivity reported |

![Eye Diagram](/docs/img/app/dlg-eye.webp)

## Quantum EPR analysis

For superconducting circuits: model each Josephson junction as a **lumped port with an inductance**
(R = 0, L = L_J, and C if any), solve an **Eigenmode** setup, then open **Quantum EPR Analysis
(Josephson Junctions)...** (**EPR** on the Results tab).

![Quantum EPR](/docs/img/app/dlg-epr.webp)

From the eigenmodes and each junction's energy participation, the window computes the dressed
frequencies, the anharmonicity α of each mode, the cross-Kerr (dispersive shift) matrix χ, and Q and T1 per
mode. Full diagonalisation of the circuit Hamiltonian is the default; first-order EPR is offered for
comparison.

## Convergence and the log

**Convergence...** shows the adaptive passes: unknowns, elements, the error indicator and ΔS (or Δf for
eigenmodes) for each pass, with a plot of the convergence against the target. It updates live during a
solve.

![Convergence](/docs/img/app/dlg-convergence.webp)

**Logfile** shows the solver's own output for the setup: the place to look when a solve fails.

## The results folder

A project `Filter.te10` keeps its results in `Filter.te10results/`:

| Folder | Holds |
|---|---|
| `mesh/<setup>/` | `model.msh` (the starting mesh), `adapted.mesh`, and each pass in `passes/` |
| `fields/<setup>/` | `paraview/`: volume and boundary fields (open them in ParaView too) |
| `sparams/<setup>/` | `port-S.csv`, port voltages and currents, terminal C and L tables |
| `data/<setup>/` | Other solver tables: eigenmodes, energies, surface and far-field data |
| `logs/<setup>/` | `solve.log`, the solver configurations, `convergence.json`; `failed-run/` |
| `jobs/` | Jobs submitted to the background, clusters or the cloud (one folder per case) |

A solve runs in `.running/<setup>/` and is sorted into these folders when it ends.
