# EME Sweep
The EME Sweep section defines a parameter sweep (sweep_spec) performed during the EME propagation step. A sweep re-runs only the propagation step and reuses the expensive mode-solving step, so sweeping a parameter is much faster than re-running the simulation for each value. As a consequence, some results change at every sweep index while others are computed once and reused; see Which results change during a sweep? below.
# Sweep Type
Sweep Type: Parameter to sweep during the EME propagation step.
Options:
- None: no sweep is performed.
- Length: sweep the length of the EME cells by a list of scale factors.
- Mode count: sweep the number of modes used in the propagation step, for convergence testing.
- Periodicity: sweep the number of repetitions of named subgrids in a composite grid.
Default: None
NOTE
There is no frequency sweep type: to sweep wavelength/frequency, list the desired points in Wavelengths and adjust the Frequency Interpolation settings. The variation then appears on the wavelength axis of the results, not on the sweep index.
# Which results change during a sweep?
None of the sweep types re-solve the modes. Every result derived from the mode basis is therefore computed once and reused across the sweep, while the results produced by the propagation step gain one value per sweep index.
Every EME result always has a sweep index axis. When a result does not change with the sweep, that axis has length 1 — it is never absent. So a Sweep Index selector in the EME Results that offers a single entry for some dataset is usually correct behavior, not missing data.
In the table below, N = one value per sweep index, 1 = single value reused across indices, and ✗ = the combination is not allowed.
| Result | Length | Mode count | Periodicity |
|---|---|---|---|
| S Matrix | N | N | N |
| EME Field Monitor | ✗ | N | ✗ |
| EME Coefficient Monitor — A, B | N | N | ✗ |
| EME Coefficient Monitor — interface_smatrices | 1 | N | ✗ |
| EME Coefficient Monitor — n_complex, flux, overlaps | 1 | 1 | ✗ |
| EME Mode Solver Monitor | 1 | 1 | 1 |
| Port Modes | 1 | 1 | 1 |
Reading the table:
- The S Matrix always responds. If you only need transmission versus the swept parameter, it works with every sweep type.
- Mode-basis results never respond — the mode solver monitor, the port modes, and the n_complex/flux/overlaps coefficient fields. Reusing them is exactly what makes sweeps fast.
- A Periodicity sweep only produces the S Matrix: field and coefficient monitors are rejected outright (see below).
# Recording sweep indices on monitors
Each EME monitor has its own Number of sweep indices setting, and its default is 1. It caps how many sweep indices the monitor stores.
WARNING
If Number of sweep indices is left at its default of 1, the monitor will only ever record the first sweep index, regardless of the sweep type. Leave the field empty to record all sweep indices. See Monitors.
# Unsupported combinations
The following combinations are rejected when the simulation is validated — they are not degenerate axes:
| Combination | Status |
|---|---|
| Length sweep + EME Field Monitor | rejected |
| Periodicity sweep + EME Field Monitor | rejected |
| Periodicity sweep + EME Coefficient Monitor | rejected |
| Periodicity sweep + Store Coefficients enabled | rejected |