3. Action and ghost surfaces 2. Coordinates and Fluxes Fig. 3 A comparison of uncorrected ( GLYPH<2> = GLYPH<18> ) QFMin curves (thick lines) and ghost curves (thin lines) for the more strongly chaotic case described in Ref. 4. Some cases where QFMin curves violate the graph property are seen. Fig. 2 Poincar´e plot for the Standard Map with the p ; q = 1 ; 3, 1,2 and 2,3 island chains, with associated action- minimizing (blue dots) and -minimax (red dots) periodic orbits. Also shown are almost-invariant curves interpo- lating between them. S [ C ] GLYPH<17>$^{Z}$ C A GLYPH<1> dl GLYPH<17>$^{Z}$ 2 GLYPH<25> q 0 A GLYPH<1> ˙ r d GLYPH<16> ; (3) D r D GLYPH<28> = GLYPH<0> GLYPH<14> S GLYPH<14> r GLYPH<1> P$_{ghost}$ ; (4) ’$_{2}$ [ GLYPH<0> ] GLYPH<17> 1 2$^{Z}$ 2 GLYPH<25> 0 Z 2 GLYPH<25> 0 d GLYPH<18> d GLYPH<16> n GLYPH<1> B n GLYPH<1>r GLYPH<18> GLYPH<2>r GLYPH<16> n GLYPH<1> B n GLYPH<1>r GLYPH<2> GLYPH<2>r GLYPH<16> ; (1) B$_{GLYPH<23>}$ GLYPH<17> B GLYPH<0> GLYPH<23> r GLYPH<2> GLYPH<2>r GLYPH<16> : (2) We use a general curvilinear coordinate system  ; GLYPH<18>; GLYPH<16> , as shown in Fig. 1, where GLYPH<18> and GLYPH<16> are poloidal and toroidal angles, respectively, and is a label for the coordinate sur- faces that has the dimension of magnetic flux and is such that B = r GLYPH<2>r GLYPH<18> + r GLYPH<16> GLYPH<2>r GLYPH<31> . 1 The standard linear flux $^{R}$dS n GLYPH<1> B through surface GLYPH<0> : =  $_{GLYPH<0>}$ ( GLYPH<18>; GLYPH<16> ), where dS is an element of surface area and n is the unit normal, is independent of choice of coordi- nates and vanishes identically. Thus it is independent of the choice of GLYPH<0> also, whether it be a magnetic surface (in- variant torus of the field-line flow) or otherwise. rate of increase of GLYPH<18> along the path is the rational rotational transform GLYPH<19> -$_{p}$$_{;}$$_{q}$ = p = q . For a given GLYPH<23> there are generally two distinct p ; q - periodic orbits. In particular, when GLYPH<23> = 0 we find the true periodic orbits associated with the X- and O-points of a p ; q island chain. The family of p ; q -periodic QFMin pseudo-orbits parametrized by GLYPH<23> defines an “almost invariant” surface with rotational transform GLYPH<19> -$_{p}$$_{;}$$_{q}$, which passes through the p ; q island chain as depicted in Fig. 2. Using the vector potential representation B = rGLYPH<2> A , the magnetic action of a closed p ; q -periodic path C is where ˙ r GLYPH<17> d r = d GLYPH<16> along the path. Hamilton’s Principle, GLYPH<14> S = 0, gives the Euler–Lagrange equation GLYPH<14> S =GLYPH<14> r = ˙ r GLYPH<2> B = 0, which implies ˙ r is parallel to B as required. Closed paths making S stationary are isolated, but the Poincar´e–Birkho GLYPH<11> theorem implies there are at least two associated with each island chain, as illustrated in Fig. 2, with the X-point orbits being minima of S , while the O- point orbits are minimax (saddle) points of S . The ghost- curve strategy for “joining the dots” is to generate a family of pseudo-orbits, labelled by a continuous parameter GLYPH<28> , by flowing down the action gradient from minimax orbits to minimizing orbits, where P$_{ghost}$ is a symmetric nonnegative dyadic whose choice is discussed below. The union of this set of pseudo- orbits defines a ghost surface (a ghost curve being the Poincar´e section of a ghost surface). To measure the amount by which GLYPH<0> departs from being a magnetic surface, we are instead led to define the positive definite quadratic flux [3] where GLYPH<2> is an auxiliary poloidal angle, not necessarily the coordinate angle GLYPH<18> . Setting GLYPH<14>’$_{2}$ = 0 for arbitrary variations  $_{GLYPH<0>}$ we find the Euler–Lagrange equation for QFMin pseudo-orbits [3, 4] is B$_{GLYPH<23>}$ GLYPH<1>r GLYPH<23> = 0, where GLYPH<23> GLYPH<17> n GLYPH<1> B = n GLYPH<1>r GLYPH<2> GLYPH<2>r GLYPH<16> and the “pseudo magnetic field” B$_{GLYPH<23>}$ is de- fined by Thus GLYPH<23> parametrizes a continuous family of pseudo field lines, which can be thought of as orbits of a dynamical system. We define a p ; q -periodic pseudo-orbit ( p and q being integers) as a path that is a closed loop, with GLYPH<18> in- creasing by 2 GLYPH<25> p when GLYPH<16> increases by 2 GLYPH<25> q , so the average $^{1}$Note that GLYPH<31> = GLYPH<31> (  ; GLYPH<18>; GLYPH<16> ) cannot in general be made a surface function in three-dimensional systems due to the generic nonintegrability of the magnetic field-line flow.