GUI workflows¶
Task-oriented quick reference: "I want to do X, where do I click?"
"I want to load a TraceWin .dat and run it"¶
- Lattice tab → Open… (or File → Open Lattice…, Ctrl+O) →
pick
.dat. - Beam tab → set energy, current, distribution → Apply.
- Numerics tab → leave defaults for first run.
- Toolbar → click Run Envelope (fast σ-only pass) or Run Multi-particle.
- Results tab → click any tile.
"I want to match Twiss to a target"¶
The matcher's variables and constraints come exclusively from
ADJUST_* / SET_* cards in the .dat — there is no GUI entry for
them. The realistic flow:
- Load lattice (see above).
- Add a Marker at the target s (Lattice tab → + Add… → Marker).
- Save the lattice (Ctrl+S), then add the matching cards to the
.datin a text editor:ADJUSTcards on the quads you want to tune and aSET_TWISS(or otherSET_*) card at the target — see SET / ADJUST cards for the syntax. - Reload the lattice (Lattice tab → Reload).
- Matching tab → Match; watch the live convergence dialog.
- Apply to commit the matched values, then Save the matched
.dat(or use Save matched .dat to export a copy). - Verify with Run Envelope and the Results tab.
"I want to run an alignment-tolerance study"¶
- Load lattice.
- Error Study tab → Element errors → add
dx, dyerrors atQUAD_*with σ = 0.2 mm. - Set n_seeds = 50 (or more for production).
- Click Run study.
- Results tab → Error-study ensemble tile.
"I want to see what's happening at element X"¶
- Lattice tab → click element X in the timeline or listing.
- Inspector on the right shows all parameters.
- (Optional) Add a Marker before/after for a snapshot — or set Numerics tab → Snapshot every N for periodic dumps.
- After running: Results tab → PHASE SPACE · DIAGNOSTICS → Phase space (4-panel) tile shows the full phase-space at the snapshot.
"I want to compare two simulations"¶
- Run simulation 1 → File → Save Project as
sim1.lgproj. - Modify whatever you want changed → Run simulation 2 →
File → Save Project as
sim2.lgproj. - Open both projects in two HELIX windows side by side.
- Tile-by-tile visual comparison.
(A built-in diff/overlay is on the roadmap.)
"I want to use the GPU"¶
- Numerics tab → PIC backend → gpu (or auto; the combo also offers cuda and mps to pin a specific device type).
- Run as usual.
If the GPU isn't available you'll see a console warning; HELIX falls back to CPU.
"I want to run a multi-particle simulation through the differentiable PIC"¶
- Numerics tab → SC engine →
torch. - (Grid mode, PIC backend, DC kernel will grey out — expected.)
- Toolbar → click Run Multi-particle.
The torch backend is ~5× slower than the default numpy PIC but
matches it numerically. Pick it only when you need an autograd-
differentiable kick (e.g. chaining the simulation into a gradient-
based optimiser); for ordinary forward runs leave SC engine on
numpy. See
Differentiable PIC.
"I want to match through non-linear PIC space charge"¶
- Load a lattice with
ADJUST_*+SET_TWISS/SET_SIZEcards. The lattice must be all-linear (drift / quad / solenoid / dipole / edge — no RF or field maps). - Matching tab → Algorithm →
gradient. - Tick Space charge.
- Click Match.
- Apply or Save matched .dat when done.
This is the only HELIX matcher that solves through non-linear PIC space charge. See Gradient algorithm.
"I want to reconstruct the input beam from an exit distribution"¶
- Either run a forward multi-particle simulation first (its final
beam becomes selectable as the source), or have an exit-plane
.dstat hand (measured or exported). - Toolbar Simulate → Backtrack Distribution…
- Pick the source, the element range (defaults: full lattice), the
field-map inverse (
rk4, the exact default — round trips close at ~1e-13), and optionally tick space charge (uses the Numerics-tab SC settings) or set an output.dstfor the reconstructed entrance distribution. - Click OK — progress appears on the toolbar; Stop aborts at the next element boundary.
- The Results tab then shows the backward walk reversed to increasing s: index 0 is the reconstructed entrance. Losses cannot be undone — the reconstruction covers survivors only.
CLI equivalent: python -m linac_gen backtrack.