20Utilities for working with parameter space metrics.
27 """Return points plotting the mismatch ellipse of a metric.
30 :param mu_max: Maximum mismatch.
31 :param tol: Tolerance in generating points to plot.
33 assert g.shape == (2, 2)
43 mu_max / (g[0, 0] * x**2 + (g[0, 1] + g[1, 0]) * x * y + g[1, 1] * y**2)
49 while zz[-1] < 2 * np.pi:
56 mu_max / (g[0, 0] * x**2 + (g[0, 1] + g[1, 0]) * x * y + g[1, 1] * y**2)
60 e = abs(r - rr[-1]) / rr[-1]
61 if e < 0.1 * tol
and 2 * np.pi / dz > 1000:
def mismatch_ellipse(g, mu_max, tol=0.001)
Return points plotting the mismatch ellipse of a metric.