Robustness of topological defects in discrete domains

Topological defects are singular points in vector fields, important in applications ranging from fingerprint detection to liquid crystals to biomedical imaging. In discretized vector fields, topological defects and their topological charge are identified by finite differences or finite-step paths around the tentative defect. As the topological charge is (half) integer, it cannot depend continuously on each input vector in a discrete domain. Instead, it switches discontinuously when vectors change beyond a certain amount, making the analysis of topological defects error prone in noisy data. We improve existing methods for the identification of topological defects by proposing a robustness measure for (i) the location of a defect, (ii) the existence of topological defects and the total topological charge within a given area, (iii) the annihilation of a defect pair, and (iv) the formation of a defect pair. Based on the proposed robustness measure, we show that topological defects in discrete domains can be identified with optimal trade-off between localization precision and robustness. The proposed robustness measure enables uncertainty quantification for topological defects in noisy discretized nematic fields (orientation fields) and polar fields (vector fields).

The identified TDs and their charges are discrete quantities that cannot depend on each of the input vectors in the discrete neighborhood in a globally continuous manner. Hence, even smooth vector field dynamics implies discontinuous dynamics of the TDs [9]. Additionally, nematic and polar vectors in simulation or measurement data are usually subject to uncertainty [15,[26][27][28]. To improve defect identification, previous works therefore used vector field smoothing [e.g., 14,16,29], defect identification along larger fixed-size closed paths [17], clustering [30], filtering by temporal persistence [29], machine learning [21,25], or thresholds on the nematic order parameter, either absolute [14,15] or relative to the spatial mean [22]. While all of these methods work in practice, none of them are based on a rigorous definition of robustness of TDs, and they do not shed light onto the connection between the robustness of TDs and the geometry of the underlying vector field.
Here, we provide a principled definition of TD robustness by studying how noise and discontinuities in a discretized two-dimensional vector field influence the estimated topological charge. We define the robustness of a TD as the smallest change to any vector in the neighborhood used for defect identification that alters the estimated topological charge. This provides a direct and intuitive connection between the underlying field, the geometry of the neighborhood, and defect robustness. We show that the critical vectors, i.e., those for which the smallest change does alter the TD charge, indicate dislocation directions of defects and locations of likely defect pair annihilation or generation.
The so-defined robustness measure of topological charge applies to all scales from smallest discretization units to the whole domain. In addition to enabling defect filtering based on interpretable robustness thresholds, the proposed measure also allows us to quantify the trade-off between the identification robustness of TDs and the spatial precision of their localization estimate in discrete domains. This enables the quantitative study of defects with large unordered cores, and it also enables us to automatically choose the shape and size of the neighborhood used for defect identification in a spatially data-adaptive manner to always provide the best trade-off between robustness and localization precision. For this, we provide a data-adaptive algorithm for identifying TDs and their charges in discrete domains, which might serve as a starting point for uncertainty quantification of TDs.

II. BACKGROUND AND NOTATION
We start from a definition of TDs in polar and nematic vector fields on continuous domains, from which we then state the definition on discrete domains.

A. Topological defects in continuous domains
TDs are defined in polar and nematic vector fields of arbitrary dimension using homotopy theory [7,31]. Here, we focus on point defects in two-dimensional fields with continuous flat domain X ⊆ R 2 . On this domain, we consider a polar vector field V : X → R 2 or a nematic orientation field V : ∼ is the set of nematic vectors (directors, orientations) obtained from R 2 by identifying antipodal polar vectors y ∼ −y to one nematic vector [y] ∼ := {y, −y} ∈ R 2 ∼ . The spaces of polar vectors R 2 and nematic vectors R 2 ∼ are isomorphic by halving or doubling, respectively, the azimuth (angular coordinate, argument) arg (y) of a complex number representation R 2 ∼ = C y = y exp [i arg (y)]. Therefore, it suffices to consider nematic vectors y ∈ R 2 ∼ with azimuth arg (y) ∈ [−π/2, π/2).
A topological defect is then defined as an isolated discontinuity x ∈ X of an otherwise continuous vector field V : TDs are classified by their topological charge or index, which is half integer (integer for polar vector fields). We calculate the topological charge based on liftings (for details, see Appendix A). For that, consider the normalized field V : X → RP 1 : x → V(x) / V(x) . The image space of the unit nematic vectors RP 1 = S 1 ∼ = {[y] ∼ ∈ R 2 ∼ ; y ∈ S 1 }, also known as the real projective line, has a universal cover Then, for a continuous map γ : [0, 1] → X with γ (0) = γ (1) (i.e., a closed path), there exists a "lifted" version ofV • γ that is a continuous map h : [0, 1] → R, such that p ∼ • h =V • γ . The lifting h is uniquely determined up to additive multiples of π , and it counts the number of full rotations of the azimuth arg(V) = arg(V) along the closed path γ . Hence, h(1) − h(0) defines the Poincaré index ind x (V) when γ encloses exactly one singular point x ∈ X , or the topological charge ind A (V) for general enclosed areas A ⊂ X . 1

B. Identification of topological defects in discrete domains
We transfer the above definitions for continuous domains to vector fields on discrete domains. This requires adapting the concept of lifting by replacing the continuous closed path γ : [0, 1] → X with a finite series of pairwise neighboring discretization points x 0 , x 1 , x 2 , . . . , x N = x 0 ∈ X . Then, lift-ingV • γ turns into lifting the finite series (V(x n )) n=0,...,N . For this finite-set domain, continuity as the key defining feature of liftings is trivial, making any map an admissible lifting.
To recover uniqueness, one assumes-usually tacitly-the points (x n ) n=0,...,N to form a sufficiently fine discretization of an underlying smooth vector field with a continuous domain (see Appendix B for feasibility). The unit vectorsV to be lifted are from the periodic set RP 1 = S 1 ∼ . Analogous to the Nyquist-Shannon sampling theorem, correct reconstruction of azimuthal changes from discrete samples is guaranteed if the spatial sampling frequency f s is higher than twice the highest spatial frequency (band limit) B arg of the azimuth. When a continuous representation arg of the azimuth arg (x) obeys this condition, the net azimuth change arg(x n ) − arg(x n−1 ) between neighboring discretization points stays below π/2 (below π for polar vectors). Hence, the lifted version h(x n ) − h(x n−1 ) is uniquely determined among all possible azimuth changes by its minimal absolute value ∈ [−π/2, π/2]. Define, for nematic (1) and polar (2) vectors, as the uniquely determined, 2 least absolute value mod π (x) of the π -periodic set x + π Z := {x + π z; z ∈ Z} (of x + 2π Z for polar). For nematic vectors V(x n−1 ), V(x n ) represented by any azimuth θ n−1 , θ n ∈ R fulfilling V(x k )/ V(x k ) = V(x k ) = [exp (iθ k )] ∼ , k = n − 1, n, the smallest net azimuth change then is mod π (θ n − θ n−1 ) [for polar vectors mod 2π (θ n − θ n−1 )].
Then, a closed path x 0 , x 1 , . . . , x N = x 0 of winding number one yields the topological charge estimator (TCE) for the enclosed charge or index, 3 1 We assume areas without holes for simplicity, but our robustness results equally apply to the general case. 2 The least absolute value is ambiguous for x = π/2 mod π , for which we choose mod π (x) = −π/2. This corner case will receive zero robustness anyway; see Eqs. (5) and (6). 3 Equation (3) applies to areas without holes. An extension to areas with holes is possible by subtracting the charge enclosed by inner paths, to larger winding numbers by splitting paths at selfintersection points. where any other azimuth representatives θ n can replace arg [V(x n )]. By construction of Eq. (1), we have mod π (x) = x + zπ for some z ∈ Z and, therefore, yields half-integer values as required for topological charges [integer values for polar fields, where mod 2π replaces mod π in Eqs. (3) and (4)]. This also holds true in numerical implementations to the order of machine precision.

III. ROBUSTNESS MEASURE
We observe that the topological charge estimator in Eq. (3) does not depend continuously on the input vectors V(x n ) and their azimuths, as the function mod π (·) has discontinuous jumps of −π at locations π/2 + Z [cf. Eq. (1) and Fig. 1]. Such discontinuous behavior is inevitable for any nonconstant map from the connected space (R 2 ∼ ) N of orientation N-tuples to the totally disconnected space 1 2 Z. Discontinuities are encountered at least between pre-images (TCE) −1 (c 1 ), This equally applies to TCE based on azimuth angles, which are defined over connected spaces (intervals) too. Consequently, the discontinuities of Eq. (3) are not an impairment of that specific estimator. On the contrary, Eq. (3) is optimal, as it only possesses the inevitable discontinuities.
Because of the inevitable discontinuities, arbitrarily small (critical) aberrations of orientations can cause the topological charge estimate to jump between discrete values. We study the conditions under which topological charge estimates switch and find exact algebraic expressions for the corresponding critical azimuth or vector changes. This allows us to define the robustness of a TD as the smallest azimuth change that alters the TCE. This is a natural definition of robustness, as it bounds the admissible fluctuations in the vector field. For simplicity, we assume normalized nematic fields to derive the robustness measure and extend to unnormalized fields in Appendix C.

A. Robustness of a single edge
Topological charge estimation by Eq. (4) involves elementary net azimuth changes mod π (θ n − θ n−1 ) corresponding to path edges (x n−1 , x n ). We thus start by defining edge robustness R : R → R 0 , 012602-3 for nematic and polar vectors, respectively, as the azimuthal distance to the nearest discontinuity of mod π (mod 2π for polar). Therefore, the largest symmetric interval of continuity for mod π (·) around some with one-sided extension to interval size π possible. These intervals are where x → mod π (x) − x ∈ π Z is constant. Hence, the contribution of an edge (x n−1 , x n ) to the TCE remains unaltered if fluctuations θ n−1 , θ n of azimuths θ n−1 , θ n obey

B. Robustness of a complete path
Combining edge robustnesses along a closed path (7) holds for all n = 1, . . . , N. Each azimuth θ n is contained in exactly two differences, namely, mod π (θ n − θ n−1 ) and mod π (θ n+1 − θ n ), where for simplicity θ N+1 := θ 1 . Hence, the condition in Eq. (7) is certainly fulfilled if azimuth fluctuations θ n are limited 4 for all n = 1, . . . , N as A common bound for all azimuthal fluctuations along the closed path where we define path robustness, as the minimum over edge robustnesses. Any of the conditions (7), (8), or (9) guarantees an unaltered topological charge estimate by Eq. (4). Each of the bounds is sharp. They equally apply to singular (topological charge = 0) and regular (topological charge = 0) points, as well as general areas enclosed by paths.

IV. ROBUSTNESS VERSUS PATH SHAPE
The above robustness measure for TDs in discrete domains can be used to facilitate or improve the identification of TDs in data from, e.g., numerical simulations, measurements, or images. It can also be used to study the trade-off between the robustness with which a TD can be identified and the accuracy with which is can be localized in space [32]. In order to enable such applications, here we characterize the behavior of the robustness measure for fixed shapes of the closed path and for data-dependent paths that are implicitly defined through the considered vector field.

A. Robustness for fixed path shapes
When searching for TDs using a fixed path, the size and shape of the path must be decided. The highest localization accuracy is obtained for paths enclosing one single grid cell. However, for the smallest nonzero topological charge ±1/2 to be estimated within a path of length N, there must be edges of net azimuthal change |θ n − θ n−1 | π/N, limiting the identification robustness to R x 0 ,x 1 ,...,x N π/2 − π/N, that is, π/6 for N = 3 or π/4 for N = 4. Moreover, single-cell paths can yield robustnesses 0 even for perfect defects [32].
The identification robustness can be increased by choosing longer paths that enclose larger areas containing the defect. Indeed, regular points have robustness ∈ [0, π/2), and longer paths around larger areas including a single defect approach the robustness limit π/2 from below, at the cost of reduced localization accuracy. An optimal trade-off between robustness and localization accuracy on regular Cartesian grids was found for 2 × 2 or 3 × 3 square paths [32], with 2 × 2 mostly used in the literature (e.g., [1,18]).

B. Robustness for data-dependent path shapes
Instead of fixing the path beforehand, one can also fix the desired identification robustness and ask for the finest spatial resolution that achieves this robustness. According to its definition in Eq. (10), path robustness is defined by the robustness of the critical edge (x n c −1 , x n c ) with n c := argmin n=1,...,N R(θ n − θ n−1 ). To increase robustness, one can replace the critical edge with a new path segment. Let A be the area enclosed by the original path x 0 , x 1 , . . . , x N = x 0 . Change the path by encompassing a grid cell a i adjacent to the critical edge. This makes (x n c −1 , x n c ) an interior edge of the expanded area A = A + a i and thus irrelevant for the robustness of topological charge estimation. Repeat this process of "expansion over the critical edge" until the desired robustness R thresh is reached; cf. Fig. 2. While this produces irregular path shapes, they are guaranteed to enclose minimally sized areas with robustness R thresh . The edges delimiting such minimal-area robust regions form the maximal leaf-free subgraph among all edges with edge robustness R R thresh .
Any change in TCE during "expansion over the critical edge" hints at potential locations of additional defects. By construction, robustness changes below R thresh relocate nonzero topological charge within the area enclosed by the path, but not beyond. This may include annihilation of additional defect pairs that are only separable with robustness <R thresh within the area. Hence, the size of the enclosed area provides localization uncertainty for TDs solely from the robustness of the path edges. Using data-driven paths thus requires no prior knowledge of length scales or sizes of defect cores, and higher-  Fig. 2; edges below robustness R 1 are omitted. (c) Adjustment of detection area to the data at unordered cores (R 0 vs R 1 versus microscopic charges). Anisotropic growth of detection areas at higher robustness indicates the direction of defect motion. Zero total charge at the highest robustness R 2 indicates potential pair annihilation. The legend is common to all panels. For clarity, shading of zero-charge regions without microscopic defect(s) has been omitted in all panels. order defects can be identified 5 without postprocessing; see Fig. 3(a).
Tuning R thresh trades off robustness versus localization accuracy. For 0 R thresh,1 < R thresh,2 , the path determined for R thresh,1 is contained within the path for R thresh,2 . The percell robustness increase can be used to hint at locations of likely or imminent defect pair annihilation or generation. Defect pair generation is likely inside zero-charge areas that contain multiple edges of low robustness; see Fig. 3(b). Defect pair annihilation is indicated by opposite topological charges separated at low robustness threshold R thresh,1 0, but merged at higher R thresh,2 > R thresh,1 ; see Fig. 3(c). This confirms classification as pair annihilation for cases reported in the literature [22], where defects were identified from order parameters using paths of zero net charge. Finally, likely directions of defect dislocation are indicated by anisotropic growth of the detection area for increasing robustness thresholds; see Fig. 3(c).

V. EXTENSIONS
The examples so far considered normalized vector fields V : X → RP 1 (for polar V : X → S 1 ), where robustness is purely azimuthal robustness. Information encoded in the vector magnitude, such as speed in flow fields or coherence in nematic orientation fields, can be accounted for by defining magnitude-aware robustness of TDs for unnormalized fields V : X → R 2 ∼ (for polar V : X → R 2 ), as shown in Appendix C.
We also so far only considered regular Cartesian grids. However, the present robustness measure readily extends to other grid types, including triangulations of unstructured data (see Appendix D). The theory only requires closed paths. Data-dependent path adaptation extends to arbitrary grids by iteratively adding non-Cartesian grid cells over the critical edge.

VI. CONCLUSION AND DISCUSSION
We have proposed a robustness measure for topological defects (TDs) and their charges in discrete domains. Topological charge is necessarily a discontinuous map for polar and nematic vector fields on discretized domains, as they typically occur in computer simulations, measurement data, and digital images. Our continuous robustness measure complements the discrete values of topological charge (0, ±1/2, ±1, . . .), either in azimuthal or vector space. It quantifies the largest admissible vector variation everywhere in the neighborhood of a TD that does not alter the estimated topological charge, also for regular, defect-free areas. This provides an interpretable notion of robustness that directly links to the underlying data.
The proposed robustness measure can efficiently be computed, as it is based on the same path edges and vectors as topological charge estimation itself. The measure also applies to higher-order defects without additional processing, to irregularly spaced data and arbitrary discretization grids, and to any path shape from enclosing individual grid cells to domain-scale areas. Using the proposed robustness measure, we have derived upper bounds for the maximum robustness achievable using paths of fixed length, and we have argued for a trade-off between estimation robustness and localization accuracy. Further, we have proposed data-driven iterative adaptation of paths ("expansion over the critical edge") until a given robustness threshold is reached, and we have discussed how this may hint at defect dislocation, pair annihilation or generation, and unordered defect cores.
The idea of data-dependent paths is not new. For example, Ref. [24] constructed adaptive square paths with maximal distance to TDs in order to indirectly minimize vector field distortions along the paths. However, the concept of edge robustness as defined here generalizes these ideas to nonsquare path shapes with optimal localization accuracy for a given robustness threshold.
Our geometric robustness measure also enables TD filtering in noisy or uncertain vector fields without presmoothing of the vector field and without predefined path shapes [1,14,17], defect core length scales [18], or order parameter thresholds [14,22]. This reduces the risk of "masking" (e.g., by smoothing) defect pairs and of detecting spurious (e.g., noiseinduced) defects. In spatiotemporal vector data, our measure can be used to predict defect dynamics (appearance, annihilation, dislocation) when temporal changes of vectors exceed the robustness threshold. This is especially valuable for studying active nematic and active polar materials, which show rich behavior of TDs [9][10][11]13,14,33].
Combining the proposed robustness measure with a noise model for the vector data could lead to topological uncertainty quantification, e.g., in nematic liquid crystals, solid state physics, material science, fluid mechanics, and biological physics. Such noise models for the vector field may, e.g., be available for numerical simulations from numerical error estimators, or for digital images from camera noise models and image-processing uncertainty. Then, the present robustness measure defines a noise model or uncertainty on the level of TDs.
We restricted our considerations to point defects on flat two-dimensional domains. A generalization to point defects on n-dimensional domains, to curved manifolds, or to k-dimensional (0 < k < n) defects seems difficult (see Appendix E) and remains an open problem. Lastly, our approach requires the robustness threshold to be set. We find that a quantile from the distribution of individual edge robustnesses works well in practice.
Notwithstanding these limitations and open issues, the present results provide a starting point for robust and noiseaware defect analysis in discretized data, and they are easily integrated into the standard process of defect identification.

APPENDIX A: DEFINITION OF TOPOLOGICAL CHARGE BY LIFTING
We define the index or topological charge based on liftings. There are equivalent definitions in terms of homotopy groups or by the Brouwer degree in homology groups [31]. The latter indirectly uses liftings as well, but we prefer to make the lifting explicit for a clearer transition to the discrete case.
Consider the space of unit nematic vectors ∼ ; x ∈ S 1 }, also known as the real projective line, and its universal cover, Then, for any nematic vector field V : X → R 2 ∼ and any closed path γ not touching zeros of V, that is, γ : [0, 1] → X continuous with γ (0) = γ (1), the universal cover p ∼ allows lifting the normalized vector fieldV : along γ , i.e., it guarantees the existence of a continuous map h : [0, 1] → R into the covering space R representative ofV • γ : [0, 1] → RP 1 by fulfilling p ∼ • h =V • γ . The process of lifting is equivalent to attributing azimuth angles h(t ) ∈ R to the vectors V[γ (t )] such that h : [0, 1] → R changes smoothly along the curve. Given any starting value h(t 0 ), the lifting h is uniquely determined since the vector field along the pathV • γ is continuous and has a connected pre-image. In general, h is uniquely determined up to additive multiples of π , and h(1) − h(0) counts the number of full rotations the azimuth performs when tracked along the closed path γ . Since γ is a closed curve, we have p ∼ • h(0) = γ (0) = γ (1) = p ∼ • h(1) and, by periodicity of p ∼ , it follows that h(1) − h(0) ∈ Z/2 is a half integer. This corresponds to a net change in the azimuth of an integer multiple of π , with odd multiples of π only possible when identifying antipodal vectors x ∼ −x as nematics.
Then, the Poincaré index or topological charge ind x (V) of an isolated singular point x ∈ X is defined as h(1) − h(0) for any path γ winding around x, but around no other singular points, exactly once in mathematically positive orientation. 6 Such a path always exists for isolated singular points x ∈ X , for example γ : [0, 1] → x + S 1 : t → x + e 2πit for sufficiently small > 0, and the definition is independent of the actual path chosen.
For paths γ winding around any area A ⊂ X exactly once in mathematically positive orientation, h(1) − h(0) defines the topological charge ind A (V) of that area, which is the sum of the topological indices of all enclosed point defects [31].
For polar vectors, the definitions apply analogously when the lifting h is with respect to the universal cover, of the unit polar vectors S 1 , which is linked to the nematic case by p ∼ = [·] ∼ • p. As the identification map [·] ∼ : S 1 → RP 1 : x → [x] ∼ induces a double cover of the unit nematic vectors, we obtain consistent topological charges when considering only the nematic part [V(·)] ∼ of a polar vector field V : X → R 2 or, vice versa, when orienting a nematic field to the extent possible, in particular only when there are no half-integer defects. 6 While the theory extends to paths with winding numbers larger than one, we omit this for clarity.

APPENDIX B: FEASIBILITY OF A SUFFICIENTLY FINE DISCRETIZATION
There is always a resolution above which discretization of a vector field yields a discretized path that fulfills the Nyquist-Shannon sampling theorem. To see this, consider a closed path γ , not touching any singular points, in a vector field on a continuous domain. Since the closed path γ : [0, 1] → X is continuous, the vector field is continuous by assumption, and the map arg : R 2 ∼ → RP 1 is away from singular points, the concatenation arg •V • γ : [0, 1] → RP 1 is continuous on a compact domain, and hence Lipschitz continuous with some Lipschitz constant L. Therefore, a discretization of the path with spacing <π /(2L) (<π /L for polar fields) is sufficiently fine to satisfy the Nyquist-Shannon sampling theorem. The same holds for any compact subset of X that does not contain singular points. In particular, there is always a compact annulus around any isolated singular point, and therefore an appropriate path for identifying this singular point from a discretization of the vector field. However, global Lipschitz continuity is not achievable around singular points, not even on an open set from which the singular point itself was excluded.

APPENDIX C: MAGNITUDE-AWARE ROBUSTNESS
In the main text, we considered normalized vector fields V : X → RP 1 (for polar V : X → S 1 ) with vectors of unit length. The robustness of TDs then is purely azimuthal robustness, defined by admissible azimuthal fluctuations. To account for information encoded in the vector magnitude, such as speed in flow fields or coherence in nematic orientation fields, here we consider TDs of unnormalized fields V : X → R 2 ∼ (for polar V : X → R 2 ). Identification of topological charges remains solely based on azimuthal changes according to Eq. (3). Statements of azimuthal robustness are therefore transferrable to unnormalized fields by limiting the changes V(x n ) ∈ R 2 ∼ (or ∈ R 2 for polar) of vectors V(x n ), n = 1, . . . , N, such that they generate azimuthal change θ n = |mod π {arg [V(x n ) + V(x n )] − arg [V(x n )]}| below azimuthal robustness R az . This requires the altered vector V(x n ) + V(x n ) to be within a sector of azimuthal width 2R az around V(x n ). However, the bounds of this sector correspond to changes V(x n ) of different magnitudes in the Euclidean norm. Since noise, uncertainty, and temporal dynamics typically have known limits only in magnitude, we add bounds on the admissible magnitudes of vector fluctuations.
To start, the vectorial change can be limited in radial and azimuthal components separately. Requiring V(x n ) < V(x n ) prevents V(x n ) + V(x n ) from reaching the origin, and |mod π {arg [V(x n ) + V(x n )] − arg [V(x n )]}| < R az limits azimuthal variation to azimuthal robustness R az , as before. For geometric reasons, both conditions are fulfilled when Note that nematic orientation fields always are in the second case, and that the right-hand side is the optimal such bound. Unlike azimuthal robustness, the magnitude robustness is not symmetric in its arguments. Yet, FIG. 4. Robust identification of TDs in non-Cartesian data. We show an example of an irregular planar graph (thin, curved solid lines) extracted from an image of biological cells. Connecting the cell centers converts this graph to a planar triangulation (straight solid lines; line width scales as fourth power of edge robustness). Such conversion is always possible for planar graphs in two dimensions (2D). Blue sticks visualize the elongation and orientation of the cells in the original graph, computed from their tensor of inertia. "Microscopic" topological charges are visualized by symbols (+ for +1/2, o for −1/2). Areas found by "expansion over critical edge" for robustness threshold 0.25π are shown shaded (blue: total charge +1/2; red: total charge −1/2; gray: total charge 0 if they contain microscopic defects).
all results for azimuthal robustness transfer to the magnitudeaware case by limiting each vectorial change along a closed path x n , n = 1, . . . , N, as For other measures of magnitude, e.g., the infinity norm, magnitude-aware robustness can be constructed similarly.

APPENDIX D: NON-CARTESIAN DISCRETIZATIONS
We outline how the present ideas, in particular the robustness measure and the data-adaptive paths, extend to non-Cartesian discretizations. Since any spatial distribution of discretization points in 2D can always be represented as a triangulation, it is sufficient to show how to extend to triangular meshes, as shown in the example in Fig. 4. The concepts and definitions introduced here only require a planar graph with discretization points as vertices. We made no assumptions about the geometry of the graph. Each of the edges between two discretization points can be assigned an edge robustness as defined in Sec. III A. For any area bounded by a single loop in the planar graph, the topological charge is then given by the topological charge estimator as introduced in Eq. (3). The path robustness remains as defined in Eq. (10).

APPENDIX E: HIGHER DIMENSIONS AND CURVED MANIFOLDS
Generalizing the present robustness measure to higher dimensions seems difficult. We explain where this difficulty comes from, without being able to provide solutions. A generalization to point defects on n-dimensional domains would require considering discretized forms of the maps S n−1 → S n−1 and S n−1 → S n−1 ∼ that define the topological charge of point defects in the homotopy group π n−1 (S n−1 ) [7]. This group is isomorphic to Z, as is π 1 (S 1 ) in the two-dimensional case. The difficulty is to determine the homotopy class ∈ π n−1 (S n−1 ) that vectors on a finite discretized neighborhood represent. When this is done locally, one must additionally assure that the local representatives fit together globally. This joining is straightforward in two-dimensional fields, where the edges only connect in points. However, in n-dimensional fields, it is unclear how to join the (n − 1)-dimensional hypersurface pieces of S n−1 along a complete submanifold of dimension up to n − 2. Extending the data-dependent choice of the region for topological charge estimation also requires extra care in higher dimensions, as the boundary-in 2D formed by the edges-needs to maintain the topology of an S n−1 sphere.
These difficulties amplify for k-dimensional (1 k < n) defects in discretized vector fields over n-dimensional domains. Such defects are extended objects that can (self-)intersect [34], and already the identification of line (k = 1) defects in three dimensions requires an iterative process [35]. In this special case, planar cuts through a line defect yield point defects in two dimensions, and our presented robustness could be applied within each plane. However, the paths within each plane have to join topologically correctly to a cylinder or torus enclosing the whole line defect, which defines similar difficulties as the construction of an enclosing hypersurface for point defects in dimensions 3.
Another possible extension is to two-dimensional curved manifolds, with the azimuthal difference between vectors in tangent spaces of different discretization points defined by parallel transport. Note that parallel transport itself is path dependent, such that the angle change accumulated by parallel transporting along a closed path is equal to the integral over the enclosed curvature. Hence, for TDs located in regions of curvature of equal sign, the parallel transport already covers parts of the net azimuthal change required for defect identification. For example, ±1/2 defects on curved manifolds can therefore be identified from a path of length N with robustness above the threshold π/N valid in flat domains (see Sec. IV A). This is compatible with the experimental and simulation results suggesting that TDs prefer to be in regions of maximal curvature of the same sign as the defect charge [13,14,36]. A high defect robustness, according to the definition provided here, then relates to energetically favorable minimization of field distortions between neighboring discretization points, observed only along the associated loop path rather than integrated over the whole field. Therefore, the present robustness measure makes explicit a coupling between the topology and geometry in curved domains.