diff --git a/GHA_triaxial/gha1_ES.py b/GHA_triaxial/gha1_ES.py new file mode 100644 index 0000000..fbdb159 --- /dev/null +++ b/GHA_triaxial/gha1_ES.py @@ -0,0 +1,250 @@ +from __future__ import annotations +from typing import List, Optional, Tuple +import numpy as np +from ellipsoide import EllipsoidTriaxial +from GHA_triaxial.gha1_ana import gha1_ana +from GHA_triaxial.gha1_approx import gha1_approx +from Hansen_ES_CMA import escma +from utils_angle import wrap_to_pi +from numpy.typing import NDArray + + +def ellipsoid_formparameter(ell: EllipsoidTriaxial): + """ + Berechnet die Formparameter des dreiachsigen Ellipsoiden nach Karney (2025), Gl. (2) + :param ell: Ellipsoid + :return: e, k und k' + """ + nenner = np.sqrt(max(ell.ax * ell.ax - ell.b * ell.b, 0.0)) + k = np.sqrt(max(ell.ay * ell.ay - ell.b * ell.b, 0.0)) / nenner + k_ = np.sqrt(max(ell.ax * ell.ax - ell.ay * ell.ay, 0.0)) / nenner + e = np.sqrt(max(ell.ax * ell.ax - ell.b * ell.b, 0.0)) / ell.ay + + return e, k, k_ + + +def ENU_beta_omega(beta: float, omega: float, ell: EllipsoidTriaxial) \ + -> Tuple[NDArray, NDArray, NDArray, float, float, NDArray]: + """ + Analytische ENU-Basis in ellipsoidische Koordinaten (β, ω) nach Karney (2025), S. 2 + :param beta: Beta Koordinate + :param omega: Omega Koordinate + :param ell: Ellipsoid + :return: E_hat = Einheitsrichtung entlang wachsendem ω (East) + N_hat = Einheitsrichtung entlang wachsendem β (North) + U_hat = Einheitsnormale (Up) + En & Nn = Längen der unnormierten Ableitungen + R (XYZ) = Punkt in XYZ + """ + # Berechnungshilfen + omega = wrap_to_pi(omega) + cb = np.cos(beta) + sb = np.sin(beta) + co = np.cos(omega) + so = np.sin(omega) + # D = sqrt(a^2 - c^2) + D = np.sqrt(ell.ax*ell.ax - ell.b*ell.b) + # Sx = sqrt(a^2 - b^2 sin^2β - c^2 cos^2β) + Sx = np.sqrt(ell.ax*ell.ax - ell.ay*ell.ay*(sb*sb) - ell.b*ell.b*(cb*cb)) + # Sz = sqrt(a^2 sin^2ω + b^2 cos^2ω - c^2) + Sz = np.sqrt(ell.ax*ell.ax*(so*so) + ell.ay*ell.ay*(co*co) - ell.b*ell.b) + + # Karney Gl. (4) + X = ell.ax * co * Sx / D + Y = ell.ay * cb * so + Z = ell.b * sb * Sz / D + R = np.array([X, Y, Z], dtype=float) + + # --- Ableitungen - Karney Gl. (5a,b,c)--- + # E = ∂R/∂ω + dX_dw = -ell.ax * so * Sx / D + dY_dw = ell.ay * cb * co + dZ_dw = ell.b * sb * (so * co * (ell.ax*ell.ax - ell.ay*ell.ay) / Sz) / D + E = np.array([dX_dw, dY_dw, dZ_dw], dtype=float) + + # N = ∂R/∂β + dX_db = ell.ax * co * (sb * cb * (ell.b*ell.b - ell.ay*ell.ay) / Sx) / D + dY_db = -ell.ay * sb * so + dZ_db = ell.b * cb * Sz / D + N = np.array([dX_db, dY_db, dZ_db], dtype=float) + + # U = Grad(x^2/a^2 + y^2/b^2 + z^2/c^2 - 1) + U = np.array([X/(ell.ax*ell.ax), Y/(ell.ay*ell.ay), Z/(ell.b*ell.b)], dtype=float) + + En = np.linalg.norm(E) + Nn = np.linalg.norm(N) + Un = np.linalg.norm(U) + + N_hat = N / Nn + E_hat = E / En + U_hat = U / Un + + return E_hat, N_hat, U_hat, En, Nn, R + + +def jacobi_konstante(beta: float, omega: float, alpha: float, ell: EllipsoidTriaxial) -> float: + """ + Jacobi-Konstante nach Karney (2025), Gl. (14) + :param beta: Beta Koordinate + :param omega: Omega Koordinate + :param alpha: Azimut alpha + :param ell: Ellipsoid + :return: Jacobi-Konstante + """ + e, k, k_ = ellipsoid_formparameter(ell) + gamma_jacobi = float((k ** 2) * (np.cos(beta) ** 2) * (np.sin(alpha) ** 2) - (k_ ** 2) * (np.sin(omega) ** 2) * (np.cos(alpha) ** 2)) + + return gamma_jacobi + + +def azimuth_at_ESpoint(P_prev: NDArray, P_curr: NDArray, E_hat_curr: NDArray, N_hat_curr: NDArray, U_hat_curr: NDArray) -> float: + """ + Berechnet das Azimut in der lokalen Tangentialebene am aktuellen Punkt P_curr, gemessen + an der Bewegungsrichtung vom vorherigen Punkt P_prev nach P_curr. + :param P_prev: vorheriger Punkt + :param P_curr: aktueller Punkt + :param E_hat_curr: Einheitsvektor der lokalen Tangentialrichtung am Punkt P_curr + :param N_hat_curr: Einheitsvektor der lokalen Tangentialrichtung am Punkt P_curr + :param U_hat_curr: Einheitsnormalenvektor am Punkt P_curr + :return: Azimut in Radiant + """ + v = (P_curr - P_prev).astype(float) + vT = v - float(np.dot(v, U_hat_curr)) * U_hat_curr + vT_hat = vT / np.linalg.norm(vT) + sE = float(np.dot(vT_hat, E_hat_curr)) + sN = float(np.dot(vT_hat, N_hat_curr)) + + return wrap_to_pi(float(np.arctan2(sE, sN))) + + +def optimize_next_point(beta_i: float, omega_i: float, alpha_i: float, ds: float, gamma0: float, + ell: EllipsoidTriaxial, maxSegLen: float = 1000.0, sigma0: float = None) -> Tuple[float, float, NDArray, float]: + """ + Berechnung der 1. GHA mithilfe der CMA-ES. + Die CMA-ES optimiert sukzessive einen Punkt, der maxSegLen vom vorherigen Punkt entfernt und zusätzlich auf der + geodätischen Linien liegt. Somit entsteht ein Geodäten ähnlicher Polygonzug auf der Oberfläche des dreiachsigen Ellipsoids. + :param beta_i: Beta Koordinate am Punkt i + :param omega_i: Omega Koordinate am Punkt i + :param alpha_i: Azimut am Punkt i + :param ds: Gesamtlänge + :param gamma0: Jacobi-Konstante am Startpunkt + :param ell: Ellipsoid + :param maxSegLen: maximale Segmentlänge + :param sigma0: + :return: + """ + # Startbasis + E_i, N_i, U_i, En_i, Nn_i, P_i = ENU_beta_omega(beta_i, omega_i, ell) + # Prediktor: dβ ≈ ds cosα / |N|, dω ≈ ds sinα / |E| + d_beta = ds * float(np.cos(alpha_i)) / Nn_i + d_omega = ds * float(np.sin(alpha_i)) / En_i + beta_pred = beta_i + d_beta + omega_pred = wrap_to_pi(omega_i + d_omega) + + xmean = np.array([beta_pred, omega_pred], dtype=float) + + if sigma0 is None: + R0 = (ell.ax + ell.ay + ell.b) / 3 + sigma0 = 1e-5 * (ds / R0) + + def fitness(x: NDArray) -> float: + """ + Fitnessfunktion: Fitnesscheck erfolgt anhand der Segmentlänge und der Jacobi-Konstante. + Die Segmentlänge muss möglichst gut zum Sollwert passen. Die Jacobi-Konstante am Punkt x muss zur + Jacobi-Konstanten am Startpunkt passen, damit der Polygonzug auf derselben geodätischen Linie bleibt. + :param x: Koordinate in beta, lambda aus der CMA-ES + :return: Fitnesswert (f) + """ + beta = x[0] + omega = wrap_to_pi(x[1]) + + P = ell.ell2cart(beta, omega) # in kartesischer Koordinaten + d = float(np.linalg.norm(P - P_i)) # Distanz zwischen + + # maxSegLen einhalten + J_len = ((d - ds) / ds) ** 2 + w_len = 1.0 + + # Azimut für Jacobi-Konstante + E_j, N_j, U_j, _, _, _ = ENU_beta_omega(beta, omega, ell) + alpha_end = azimuth_at_ESpoint(P_i, P, E_j, N_j, U_j) + + # Jacobi-Konstante + g_end = jacobi_konstante(beta, omega, alpha_end, ell) + J_gamma = (g_end - gamma0) ** 2 + w_gamma = 10 + + f = float(w_len * J_len + w_gamma * J_gamma) + + return f + + + xb = escma(fitness, N=2, xmean=xmean, sigma=sigma0) # Aufruf CMA-ES + + beta_best = xb[0] + omega_best = wrap_to_pi(xb[1]) + P_best = ell.ell2cart(beta_best, omega_best) + E_j, N_j, U_j, _, _, _ = ENU_beta_omega(beta_best, omega_best, ell) + alpha_end = azimuth_at_ESpoint(P_i, P_best, E_j, N_j, U_j) + + return beta_best, omega_best, P_best, alpha_end + + +def gha1_ES(ell: EllipsoidTriaxial, beta0: float, omega0: float, alpha0: float, s_total: float, maxSegLen: float = 1000): + """ + Aufruf der 1. GHA mittels CMA-ES + :param ell: Ellipsoid + :param beta0: Beta Startkoordinate + :param omega0: Omega Startkoordinate + :param alpha0: Azimut Startkoordinate + :param s_total: Gesamtstrecke + :param maxSegLen: maximale Segmentlänge + :return: Zielpunkt Pk und Azimut am Zielpunkt + """ + beta = float(beta0) + omega = wrap_to_pi(float(omega0)) + alpha = wrap_to_pi(float(alpha0)) + + gamma0 = jacobi_konstante(beta, omega, alpha, ell) # Referenz-γ0 + + points: List[NDArray] = [ell.ell2cart(beta, omega)] + alpha_end: List[float] = [alpha] + + s_acc = 0.0 + step = 0 + nsteps_est = int(np.ceil(s_total / maxSegLen)) + while s_acc < s_total - 1e-9: + step += 1 + ds = min(maxSegLen, s_total - s_acc) + print(f"[GHA1-ES] Step {step}/{nsteps_est} ds={ds:.3f} m s_acc={s_acc:.3f} m beta={beta:.6f} omega={omega:.6f} alpha={alpha:.6f}") + + beta, omega, P, alpha = optimize_next_point(beta_i=beta, omega_i=omega, alpha_i=alpha, ds=ds, gamma0=gamma0, + ell=ell, maxSegLen=maxSegLen) + s_acc += ds + points.append(P) + alpha_end.append(alpha) + if step > nsteps_est + 50: + raise RuntimeError("Zu viele Schritte – vermutlich Konvergenzproblem / falsche Azimut-Konvention.") + Pk = points[-1] + alpha1 = alpha_end[-1] + + return Pk, alpha1 + + +if __name__ == "__main__": + ell = EllipsoidTriaxial.init_name("BursaSima1980round") + s = 188891.650873 + alpha0 = 70/(180/np.pi) + + P0 = ell.ell2cart(5/(180/np.pi), -90/(180/np.pi)) + point1, alpha1 = gha1_ana(ell, P0, alpha0=alpha0, s=s, maxM=100, maxPartCircum=32) + point1app, alpha1app = gha1_approx(ell, P0, alpha0=alpha0, s=s, ds=1000) + + res, alpha = gha1_ES(ell, beta0=5/(180/np.pi), omega0=-90/(180/np.pi), alpha0=alpha0, s_total=s, maxSegLen=1000) + + print(point1) + print(res) + print(alpha) + # print("alpha1 (am Endpunkt):", res.alpha1) + print(res - point1) + print(point1app - point1, "approx") \ No newline at end of file diff --git a/GHA_triaxial/gha2_ES.py b/GHA_triaxial/gha2_ES.py index d403b02..3ed29aa 100644 --- a/GHA_triaxial/gha2_ES.py +++ b/GHA_triaxial/gha2_ES.py @@ -49,7 +49,7 @@ def midpoint_fitness(x: tuple) -> float: return f -def gha2_ES(ell: EllipsoidTriaxial, P0: NDArray, Pk: NDArray, maxSegLen: float = None, stopeval: int = 2000, maxIter: int = 10000, all_points: bool = False): +def gha2_ES(ell: EllipsoidTriaxial, P0: NDArray, Pk: NDArray, maxSegLen: float = None, maxIter: int = 10000, all_points: bool = False): """ Berechnen der 2. GHA mithilfe der CMA-ES. Die CMA-ES optimiert sukzessive den Mittelpunkt zwischen Start- und Zielpunkt. Der Abbruch der Berechnung erfolgt, wenn alle Segmentlängen <= maxSegLen sind. @@ -58,7 +58,6 @@ def gha2_ES(ell: EllipsoidTriaxial, P0: NDArray, Pk: NDArray, maxSegLen: float = :param P0: Startpunkt :param Pk: Zielpunkt :param maxSegLen: maximale Segmentlänge - :param stopeval: maximale Durchläufe der CMA-ES :param maxIter: maximale Durchläufe der Mittelpunktsgenerierung :param all_points: Ergebnisliste mit allen Punkte, die wahlweise mit ausgegeben werden kann :return: Richtungswinkel des Start- und Zielpunktes und Gesamtlänge @@ -67,7 +66,7 @@ def gha2_ES(ell: EllipsoidTriaxial, P0: NDArray, Pk: NDArray, maxSegLen: float = ell_ES = ell R0 = (ell.ax + ell.ay + ell.b) / 3 if maxSegLen is None: - maxSegLen = R0 * 1 / (637.4) # 10km Segment bei mittleren Erdradius + maxSegLen = R0 * 1 / (637.4*2) # 10km Segment bei mittleren Erdradius sigma_uv_nom = 1e-3 * (maxSegLen / R0) # ~1e-5 @@ -101,8 +100,7 @@ def gha2_ES(ell: EllipsoidTriaxial, P0: NDArray, Pk: NDArray, maxSegLen: float = sigmaStep = sigma_uv_nom * (Sehne(A, B) / maxSegLen) - u, v = escma(midpoint_fitness, N=2, xmean=xmean, sigma=sigmaStep, stopfitness=-np.inf, - stopeval=stopeval) + u, v = escma(midpoint_fitness, N=2, xmean=xmean, sigma=sigmaStep) P_next = ell.para2cart(u, v) new_points.append(P_next) @@ -171,7 +169,7 @@ if __name__ == '__main__': beta1, lamb1 = (0.7, 0.3) P1 = ell.ell2cart(beta1, lamb1) - alpha0, alpha1, s_num, betas, lambs = gha2_num(ell, beta0, lamb0, beta1, lamb1, n=10000, all_points=True) + alpha0, alpha1, s_num, betas, lambs = gha2_num(ell, beta0, lamb0, beta1, lamb1, n=1000, all_points=True) points_num = [] for beta, lamb in zip(betas, lambs): points_num.append(ell.ell2cart(beta, lamb)) diff --git a/Hansen_ES_CMA.py b/Hansen_ES_CMA.py index d90b602..055e3ee 100644 --- a/Hansen_ES_CMA.py +++ b/Hansen_ES_CMA.py @@ -9,8 +9,8 @@ def felli(x): return float(np.sum((1e6 ** exponents) * (x ** 2))) -def escma(func, *, N=10, xmean=None, sigma=0.5, stopfitness=1e-10, stopeval=None, - func_args=(), func_kwargs=None, seed=None, +def escma(func, *, N=10, xmean=None, sigma=0.5, stopfitness=1e-14, stopeval=2000, + func_args=(), func_kwargs=None, seed=0, bestEver = np.inf, noImproveGen = 0, absTolImprove = 1e-12, maxNoImproveGen = 100, sigmaImprove = 1e-12): if func_kwargs is None: @@ -142,6 +142,7 @@ def escma(func, *, N=10, xmean=None, sigma=0.5, stopfitness=1e-10, stopeval=None sigma = sigma * np.exp(0.2 + cs / damps) print(' [CMA-ES] stopfitness erreicht.') #print("warning: flat fitness, consider reformulating the objective") + break #print(f"{counteval}: {arfitness[0]}") diff --git a/Tests/algorithms_test.ipynb b/Tests/algorithms_test.ipynb index bc8e2b5..88bd2d5 100644 --- a/Tests/algorithms_test.ipynb +++ b/Tests/algorithms_test.ipynb @@ -30,17 +30,22 @@ "%autoreload 2\n", "import time\n", "from numpy import nan\n", + "import numpy as np\n", + "import math\n", "import winkelumrechnungen as wu\n", "import os\n", "from contextlib import contextmanager, redirect_stdout, redirect_stderr\n", "import plotly.graph_objects as go\n", "import warnings\n", + "import pickle\n", + "import random\n", "\n", "from ellipsoide import EllipsoidTriaxial\n", "from GHA_triaxial.utils import alpha_para2ell, alpha_ell2para\n", "\n", "from GHA_triaxial.gha1_num import gha1_num\n", "from GHA_triaxial.gha1_ana import gha1_ana\n", + "from GHA_triaxial.gha1_ES import gha1_ES\n", "from GHA_triaxial.gha1_approx import gha1_approx\n", "\n", "from GHA_triaxial.gha2_num import gha2_num\n", @@ -82,23 +87,17 @@ }, "cell_type": "code", "source": [ - "# steps_gha1_num = [2000, 5000, 10000, 20000]\n", - "# maxM_gha1_ana = [20, 50]\n", - "# parts_gha1_ana = [4, 8]\n", - "# dsPart_gha1_approx = [600, 1250, 6000, 60000] # entspricht bei der Erde ca. 10000, 5000, 1000, 100\n", - "#\n", - "# steps_gha2_num = [2000, 5000, 10000, 20000]\n", - "# dsPart_gha2_ES = [600, 1250, 6000] # entspricht bei der Erde ca. 10000, 5000, 1000\n", - "# dsPart_gha2_approx = [600, 1250, 6000, 60000] # entspricht bei der Erde ca. 10000, 5000, 1000, 100\n", + "# dsPart = [60, 125, 600, 1250, 6000, 60000] entspricht bei der Erde ca. 100km, 50km, 10km, 5km, 1km, 100m\n", "\n", - "steps_gha1_num = [2000, 5000, 10000]\n", + "steps_gha1_num = [20, 50, 100, 200, 500, 1000, 5000]\n", "maxM_gha1_ana = [20, 50]\n", - "parts_gha1_ana = [2, 8, 32]\n", - "dsPart_gha1_approx = [600, 1250, 6000, 60000]\n", + "parts_gha1_ana = [2, 8]\n", + "dsPart_gha1_ES = [60, 600, 1250]\n", + "dsPart_gha1_approx = [600, 1250, 6000]\n", "\n", - "steps_gha2_num = [100, 1000]\n", - "dsPart_gha2_ES = [20, 100]\n", - "dsPart_gha2_approx = [600, 1250, 6000, 60000]" + "steps_gha2_num = [200, 500, 1000]\n", + "dsPart_gha2_ES = [60, 600, 1250]\n", + "dsPart_gha2_approx = [600, 1250, 6000]" ], "id": "96093cdde03f8d57", "outputs": [], @@ -113,11 +112,12 @@ }, "cell_type": "code", "source": [ - "test = \"Karney\"\n", - "# test = \"Panou\"\n", + "# test = \"Karney\"\n", + "test = \"Panou\"\n", + "# test = \"Random\"\n", "if test == \"Karney\":\n", " ell: EllipsoidTriaxial = EllipsoidTriaxial.init_name(\"KarneyTest2024\")\n", - " examples = get_examples_karney(10, 42)\n", + " examples = get_examples_karney(4, seed=42)\n", "elif test == \"Panou\":\n", " ell: EllipsoidTriaxial = EllipsoidTriaxial.init_name(\"BursaSima1980round\")\n", " tables = get_tables_panou()\n", @@ -126,153 +126,267 @@ " for i, table in enumerate(tables):\n", " for example in table:\n", " table_indices.append(i+1)\n", - " examples.append(example)" + " examples.append(example)\n", + "elif test == \"Random\":\n", + " ell: EllipsoidTriaxial = EllipsoidTriaxial.init_name(\"BursaSima1980round\")\n", + " examples = [] # beta0, lamb0, alpha0_ell, beta1, lamb1, alpha1_ell, s\n", + " random.seed(42)\n", + " for _ in range(10):\n", + " beta0 = wu.deg2rad(random.randint(-90, 90))\n", + " lamb0 = wu.deg2rad(random.randint(-179, 180))\n", + " alpha0_ell = wu.deg2rad(random.randint(0, 359))\n", + " s = random.randint(10000, int(np.pi*ell.b))\n", + " examples.append([beta0, lamb0, alpha0_ell, s])\n", + " pass" ], "id": "6e384cc01c2dbe", "outputs": [], "execution_count": 17 }, { - "metadata": { - "jupyter": { - "is_executing": true - }, - "ExecuteTime": { - "start_time": "2026-02-04T18:11:18.785718Z" - } - }, + "metadata": {}, "cell_type": "code", + "outputs": [], + "execution_count": null, "source": [ - "results = {}\n", - "for i, example in enumerate(examples):\n", - " print(f\"----- Beispiel {i+1}/{len(examples)}\")\n", - " example_results = {}\n", + "if test != \"Random\":\n", + " results = {}\n", + " for i, example in enumerate(examples):\n", + " print(f\"----- Beispiel {i+1}/{len(examples)}\")\n", + " example_results = {}\n", "\n", - " beta0, lamb0, alpha0_ell, beta1, lamb1, alpha1_ell, s = example\n", - " P0 = ell.ell2cart(beta0, lamb0)\n", - " P1 = ell.ell2cart(beta1, lamb1)\n", - " _, _, alpha0_para = alpha_ell2para(ell, beta0, lamb0, alpha0_ell)\n", + " beta0, lamb0, alpha0_ell, beta1, lamb1, alpha1_ell, s = example\n", + " P0 = ell.ell2cart(beta0, lamb0)\n", + " P1 = ell.ell2cart(beta1, lamb1)\n", + " _, _, alpha0_para = alpha_ell2para(ell, beta0, lamb0, alpha0_ell)\n", "\n", - " for steps in steps_gha1_num:\n", - " start = time.perf_counter()\n", - " try:\n", - " P1_num, alpha1_num_1 = gha1_num(ell, P0, alpha0_ell, s, num=steps)\n", - " end = time.perf_counter()\n", - " beta1_num, lamb1_num = ell.cart2ell(P1_num)\n", - " d_beta1 = abs(wu.rad2deg(beta1_num - beta1)) / 3600\n", - " d_lamb1 = abs(wu.rad2deg(lamb1_num - lamb1)) / 3600\n", - " d_alpha1 = abs(wu.rad2deg(alpha1_num_1 - alpha1_ell)) / 3600\n", - " d_time = end - start\n", - " example_results[f\"GHA1_num_{steps}\"] = (d_beta1, d_lamb1, d_alpha1, d_time)\n", - " except Exception as e:\n", - " print(e)\n", - " example_results[f\"GHA1_num_{steps}\"] = (nan, nan, nan, nan)\n", - "\n", - " for maxM in maxM_gha1_ana:\n", - " for parts in parts_gha1_ana:\n", + " for steps in steps_gha1_num:\n", " start = time.perf_counter()\n", " try:\n", - " P1_ana, alpha1_ana_para = gha1_ana(ell, P0, alpha0_para, s, maxM=maxM, maxPartCircum=parts)\n", + " P1_num, alpha1_num_1 = gha1_num(ell, P0, alpha0_ell, s, num=steps)\n", + " print(f\"GHA1_num_{steps}\", P1_num)\n", " end = time.perf_counter()\n", - " beta1_ana, lamb1_ana = ell.cart2ell(P1_ana)\n", - " _, _, alpha1_ana_ell = alpha_para2ell(ell, beta1_ana, lamb1_ana, alpha1_ana_para)\n", - " d_beta1 = abs(wu.rad2deg(beta1_ana - beta1)) / 3600\n", - " d_lamb1 = abs(wu.rad2deg(lamb1_ana - lamb1)) / 3600\n", - " d_alpha1 = abs(wu.rad2deg(alpha1_ana_ell - alpha1_ell)) / 3600\n", + " beta1_num, lamb1_num = ell.cart2ell(P1_num)\n", + " d_beta1 = abs(beta1_num - beta1)\n", + " d_lamb1 = abs(lamb1_num - lamb1)\n", + " d_alpha1 = abs(alpha1_num_1 - alpha1_ell)\n", " d_time = end - start\n", - " example_results[f\"GHA1_ana_{maxM}_{parts}\"] = (d_beta1, d_lamb1, d_alpha1, d_time)\n", + " example_results[f\"GHA1_num_{steps}\"] = (d_beta1, d_lamb1, d_alpha1, d_time)\n", " except Exception as e:\n", " print(e)\n", - " example_results[f\"GHA1_ana_{maxM}_{parts}\"] = (nan, nan, nan, nan)\n", + " example_results[f\"GHA1_num_{steps}\"] = (nan, nan, nan, nan)\n", "\n", - " for dsPart in dsPart_gha1_approx:\n", - " ds = ell.ax/dsPart\n", - " start = time.perf_counter()\n", - " try:\n", - " P1_approx, alpha1_approx = gha1_approx(ell, P0, alpha0_ell, s, ds=ds)\n", - " end = time.perf_counter()\n", - " beta1_approx, lamb1_approx = ell.cart2ell(P1_approx)\n", - " d_beta1 = abs(wu.rad2deg(beta1_approx - beta1)) / 3600\n", - " d_lamb1 = abs(wu.rad2deg(lamb1_approx - lamb1)) / 3600\n", - " d_alpha1 = abs(wu.rad2deg(alpha1_approx - alpha1_ell)) / 3600\n", - " d_time = end - start\n", - " example_results[f\"GHA1_approx_{dsPart}\"] = (d_beta1, d_lamb1, d_alpha1, d_time)\n", - " except Exception as e:\n", - " print(e)\n", - " example_results[f\"GHA1_approx_{dsPart}\"] = (nan, nan, nan, nan)\n", + " for maxM in maxM_gha1_ana:\n", + " for parts in parts_gha1_ana:\n", + " start = time.perf_counter()\n", + " try:\n", + " P1_ana, alpha1_ana_para = gha1_ana(ell, P0, alpha0_para, s, maxM=maxM, maxPartCircum=parts)\n", + " print(f\"GHA1_ana_{maxM}_{parts}\", P1_ana)\n", + " end = time.perf_counter()\n", + " beta1_ana, lamb1_ana = ell.cart2ell(P1_ana)\n", + " _, _, alpha1_ana_ell = alpha_para2ell(ell, beta1_ana, lamb1_ana, alpha1_ana_para)\n", + " d_beta1 = abs(beta1_ana - beta1)\n", + " d_lamb1 = abs(lamb1_ana - lamb1)\n", + " d_alpha1 = abs(alpha1_ana_ell - alpha1_ell)\n", + " d_time = end - start\n", + " example_results[f\"GHA1_ana_{maxM}_{parts}\"] = (d_beta1, d_lamb1, d_alpha1, d_time)\n", + " except Exception as e:\n", + " print(e)\n", + " example_results[f\"GHA1_ana_{maxM}_{parts}\"] = (nan, nan, nan, nan)\n", "\n", - " for steps in steps_gha2_num:\n", - " start = time.perf_counter()\n", - " try:\n", - " with warnings.catch_warnings():\n", - " warnings.simplefilter(\"ignore\", RuntimeWarning)\n", - " alpha0_num, alpha1_num_2, s_num = gha2_num(ell, beta0, lamb0, beta1, lamb1, n=steps)\n", - " end = time.perf_counter()\n", - " d_alpha0 = abs(wu.rad2deg(alpha0_num - alpha0_ell)) / 3600\n", - " d_alpha1 = abs(wu.rad2deg(alpha1_num_2 - alpha1_ell)) / 3600\n", - " d_s = abs(s_num - s) / 1000\n", - " d_time = end - start\n", - " example_results[f\"GHA2_num_{steps}\"] = (d_alpha0, d_alpha1, d_s, d_time)\n", - " except Exception as e:\n", - " print(e)\n", - " example_results[f\"GHA2_num_{steps}\"] = (nan, nan, nan, nan)\n", + " for dsPart in dsPart_gha1_ES:\n", + " start = time.perf_counter()\n", + " try:\n", + " P1_ES, alpha1_ES = gha1_ES(ell, beta0, lamb0, alpha0_ell, s, maxSegLen=dsPart)\n", + " end = time.perf_counter()\n", + " beta1_ES, lamb1_ES = ell.cart2ell(P1_ES)\n", + " d_beta1 = abs(beta1_ES - beta1)\n", + " d_lamb1 = abs(lamb1_ES - lamb1)\n", + " d_alpha1 = abs(alpha1_ES - alpha1_ell)\n", + " d_time = end - start\n", + " example_results[f\"GHA1_ES_{dsPart}\"] = (d_beta1, d_lamb1, d_alpha1, d_time)\n", + " except Exception as e:\n", + " print(e)\n", + " example_results[f\"GHA1_ES_{dsPart}\"] = (nan, nan, nan, nan)\n", "\n", - " for dsPart in dsPart_gha2_ES:\n", - " ds = ell.ax/dsPart\n", - " start = time.perf_counter()\n", - " try:\n", - " with suppress_print():\n", - " alpha0_ES, alpha1_ES, s_ES = gha2_ES(ell, P0, P1, maxSegLen=ds)\n", - " end = time.perf_counter()\n", - " d_alpha0 = abs(wu.rad2deg(alpha0_ES - alpha0_ell)) / 3600\n", - " d_alpha1 = abs(wu.rad2deg(alpha1_ES - alpha1_ell)) / 3600\n", - " d_s = abs(s_ES - s) / 1000\n", - " d_time = end - start\n", - " example_results[f\"GHA2_ES_{dsPart}\"] = (d_alpha0, d_alpha1, d_s, d_time)\n", - " except Exception as e:\n", - " print(e)\n", - " example_results[f\"GHA2_ES_{dsPart}\"] = (nan, nan, nan, nan)\n", + " for dsPart in dsPart_gha1_approx:\n", + " ds = ell.ax/dsPart\n", + " start = time.perf_counter()\n", + " try:\n", + " P1_approx, alpha1_approx = gha1_approx(ell, P0, alpha0_ell, s, ds=ds)\n", + " end = time.perf_counter()\n", + " beta1_approx, lamb1_approx = ell.cart2ell(P1_approx)\n", + " d_beta1 = abs(beta1_approx - beta1)\n", + " d_lamb1 = abs(lamb1_approx - lamb1)\n", + " d_alpha1 = abs(alpha1_approx - alpha1_ell)\n", + " d_time = end - start\n", + " example_results[f\"GHA1_approx_{dsPart}\"] = (d_beta1, d_lamb1, d_alpha1, d_time)\n", + " except Exception as e:\n", + " print(e)\n", + " example_results[f\"GHA1_approx_{dsPart}\"] = (nan, nan, nan, nan)\n", "\n", - " for dsPart in dsPart_gha2_approx:\n", - " ds = ell.ax/dsPart\n", - " start = time.perf_counter()\n", - " try:\n", - " alpha0_approx, alpha1_approx, s_approx = gha2_approx(ell, P0, P1, ds=ds)\n", - " end = time.perf_counter()\n", - " d_alpha0 = abs(wu.rad2deg(alpha0_approx - alpha0_ell)) / 3600\n", - " d_alpha1 = abs(wu.rad2deg(alpha1_approx - alpha1_ell)) / 3600\n", - " d_s = abs(s_approx - s) / 1000\n", - " d_time = end - start\n", - " example_results[f\"GHA2_approx_{dsPart}\"] = (d_alpha0, d_alpha1, d_s, d_time)\n", - " except Exception as e:\n", - " print(e)\n", - " example_results[f\"GHA2_approx_{dsPart}\"] = (nan, nan, nan, nan)\n", + " # ----------------------------------------------\n", "\n", - " results[f\"beta0: {wu.rad2deg(beta0):.3f}, lamb0: {wu.rad2deg(lamb0):.3f}, alpha0: {wu.rad2deg(alpha0_ell):.3f}, s: {s}\"] = example_results" + " for steps in steps_gha2_num:\n", + " start = time.perf_counter()\n", + " try:\n", + " with warnings.catch_warnings():\n", + " warnings.simplefilter(\"ignore\", RuntimeWarning)\n", + " alpha0_num, alpha1_num_2, s_num = gha2_num(ell, beta0, lamb0, beta1, lamb1, n=steps)\n", + " print(alpha0_num, alpha1_num_2, s_num)\n", + " end = time.perf_counter()\n", + " d_alpha0 = abs(alpha0_num - alpha0_ell)\n", + " d_alpha1 = abs(alpha1_num_2 - alpha1_ell)\n", + " d_s = abs(s_num - s)\n", + " d_time = end - start\n", + " example_results[f\"GHA2_num_{steps}\"] = (d_alpha0, d_alpha1, d_s, d_time)\n", + " except Exception as e:\n", + " print(e)\n", + " example_results[f\"GHA2_num_{steps}\"] = (nan, nan, nan, nan)\n", + "\n", + " for dsPart in dsPart_gha2_ES:\n", + " ds = ell.ax/dsPart\n", + " start = time.perf_counter()\n", + " try:\n", + " with suppress_print():\n", + " alpha0_ES, alpha1_ES, s_ES = gha2_ES(ell, P0, P1, maxSegLen=ds)\n", + " end = time.perf_counter()\n", + " d_alpha0 = abs(alpha0_ES - alpha0_ell)\n", + " d_alpha1 = abs(alpha1_ES - alpha1_ell)\n", + " d_s = abs(s_ES - s)\n", + " d_time = end - start\n", + " example_results[f\"GHA2_ES_{dsPart}\"] = (d_alpha0, d_alpha1, d_s, d_time)\n", + " except Exception as e:\n", + " print(e)\n", + " example_results[f\"GHA2_ES_{dsPart}\"] = (nan, nan, nan, nan)\n", + "\n", + " for dsPart in dsPart_gha2_approx:\n", + " ds = ell.ax/dsPart\n", + " start = time.perf_counter()\n", + " try:\n", + " alpha0_approx, alpha1_approx, s_approx = gha2_approx(ell, P0, P1, ds=ds)\n", + " end = time.perf_counter()\n", + " d_alpha0 = abs(alpha0_approx - alpha0_ell)\n", + " d_alpha1 = abs(alpha1_approx - alpha1_ell)\n", + " d_s = abs(s_approx - s)\n", + " d_time = end - start\n", + " example_results[f\"GHA2_approx_{dsPart}\"] = (d_alpha0, d_alpha1, d_s, d_time)\n", + " except Exception as e:\n", + " print(e)\n", + " example_results[f\"GHA2_approx_{dsPart}\"] = (nan, nan, nan, nan)\n", + "\n", + " results[f\"beta0: {wu.rad2deg(beta0):.3f}, lamb0: {wu.rad2deg(lamb0):.3f}, alpha0: {wu.rad2deg(alpha0_ell):.3f}, s: {s}\"] = example_results" ], - "id": "ef8849908ed3231e", - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "----- Beispiel 1/10\n", - "Keine Multi-Start-Variante konvergiert.\n", - "Keine Multi-Start-Variante konvergiert.\n", - "----- Beispiel 2/10\n", - "Keine Multi-Start-Variante konvergiert.\n", - "Keine Multi-Start-Variante konvergiert.\n", - "----- Beispiel 3/10\n", - "Analytische Methode ist explodiert, Punkt liegt nicht mehr auf dem Ellipsoid\n", - "Analytische Methode ist explodiert, Punkt liegt nicht mehr auf dem Ellipsoid\n", - "Analytische Methode ist explodiert, Punkt liegt nicht mehr auf dem Ellipsoid\n", - "Fehler in der Umrechnung cart2ell\n", - "Keine Multi-Start-Variante konvergiert.\n", - "Keine Multi-Start-Variante konvergiert.\n" - ] - } + "id": "2a87e028089a215" + }, + { + "metadata": {}, + "cell_type": "code", + "outputs": [], + "execution_count": null, + "source": [ + "if test == \"Random\":\n", + " results = {}\n", + " for i, example in enumerate(examples):\n", + " print(f\"----- Beispiel {i+1}/{len(examples)}\")\n", + " example_results = {}\n", + "\n", + " beta0, lamb0, alpha0_ell, s = example\n", + " P0 = ell.ell2cart(beta0, lamb0)\n", + " _, _, alpha0_para = alpha_ell2para(ell, beta0, lamb0, alpha0_ell)\n", + "\n", + " # P1_ana, alpha1_ana_para = gha1_ana(ell, P0, alpha0_para, s, maxM=60, maxPartCircum=4)\n", + " # beta1_ana, lamb1_ana = ell.cart2ell(P1_ana)\n", + " # _, _, alpha1_ana = alpha_para2ell(ell, beta1_ana, lamb1_ana, alpha1_ana_para)\n", + "\n", + " P1, alpha1_ell = gha1_num(ell, P0, alpha0_ell, s, num=10000)\n", + " beta1, lamb1 = ell.cart2ell(P1)\n", + "\n", + " for maxM in maxM_gha1_ana:\n", + " for parts in parts_gha1_ana:\n", + " start = time.perf_counter()\n", + " try:\n", + " P1_ana, alpha1_ana_para = gha1_ana(ell, P0, alpha0_para, s, maxM=maxM, maxPartCircum=parts)\n", + " end = time.perf_counter()\n", + " beta1_ana, lamb1_ana = ell.cart2ell(P1_ana)\n", + " _, _, alpha1_ana_ell = alpha_para2ell(ell, beta1_ana, lamb1_ana, alpha1_ana_para)\n", + " d_beta1 = abs(wu.rad2deg(beta1_ana - beta1)) / 3600\n", + " d_lamb1 = abs(wu.rad2deg(lamb1_ana - lamb1)) / 3600\n", + " d_alpha1 = abs(wu.rad2deg(alpha1_ana_ell - alpha1_ell)) / 3600\n", + " d_time = end - start\n", + " example_results[f\"GHA1_ana_{maxM}_{parts}\"] = (d_beta1, d_lamb1, d_alpha1, d_time)\n", + " except Exception as e:\n", + " print(e)\n", + " example_results[f\"GHA1_ana_{maxM}_{parts}\"] = (nan, nan, nan, nan)\n", + "\n", + " for dsPart in dsPart_gha1_approx:\n", + " ds = ell.ax/dsPart\n", + " start = time.perf_counter()\n", + " try:\n", + " P1_approx, alpha1_approx = gha1_approx(ell, P0, alpha0_ell, s, ds=ds)\n", + " end = time.perf_counter()\n", + " beta1_approx, lamb1_approx = ell.cart2ell(P1_approx)\n", + " d_beta1 = abs(wu.rad2deg(beta1_approx - beta1)) / 3600\n", + " d_lamb1 = abs(wu.rad2deg(lamb1_approx - lamb1)) / 3600\n", + " d_alpha1 = abs(wu.rad2deg(alpha1_approx - alpha1_ell)) / 3600\n", + " d_time = end - start\n", + " example_results[f\"GHA1_approx_{dsPart}\"] = (d_beta1, d_lamb1, d_alpha1, d_time)\n", + " except Exception as e:\n", + " print(e)\n", + " example_results[f\"GHA1_approx_{dsPart}\"] = (nan, nan, nan, nan)\n", + "\n", + " # for steps in steps_gha2_num:\n", + " # start = time.perf_counter()\n", + " # try:\n", + " # with warnings.catch_warnings():\n", + " # warnings.simplefilter(\"ignore\", RuntimeWarning)\n", + " # alpha0_num, alpha1_num_2, s_num = gha2_num(ell, beta0, lamb0, beta1, lamb1, n=steps)\n", + " # end = time.perf_counter()\n", + " # d_alpha0 = abs(wu.rad2deg(alpha0_num - alpha0_ell)) / 3600\n", + " # d_alpha1 = abs(wu.rad2deg(alpha1_num_2 - alpha1_ell)) / 3600\n", + " # d_s = abs(s_num - s) / 1000\n", + " # d_time = end - start\n", + " # example_results[f\"GHA2_num_{steps}\"] = (d_alpha0, d_alpha1, d_s, d_time)\n", + " # except Exception as e:\n", + " # print(e)\n", + " # example_results[f\"GHA2_num_{steps}\"] = (nan, nan, nan, nan)\n", + " #\n", + " # for dsPart in dsPart_gha2_ES:\n", + " # ds = ell.ax/dsPart\n", + " # start = time.perf_counter()\n", + " # try:\n", + " # with suppress_print():\n", + " # alpha0_ES, alpha1_ES, s_ES = gha2_ES(ell, P0, P1, maxSegLen=ds)\n", + " # end = time.perf_counter()\n", + " # d_alpha0 = abs(wu.rad2deg(alpha0_ES - alpha0_ell)) / 3600\n", + " # d_alpha1 = abs(wu.rad2deg(alpha1_ES - alpha1_ell)) / 3600\n", + " # d_s = abs(s_ES - s) / 1000\n", + " # d_time = end - start\n", + " # example_results[f\"GHA2_ES_{dsPart}\"] = (d_alpha0, d_alpha1, d_s, d_time)\n", + " # except Exception as e:\n", + " # print(e)\n", + " # example_results[f\"GHA2_ES_{dsPart}\"] = (nan, nan, nan, nan)\n", + "\n", + " for dsPart in dsPart_gha2_approx:\n", + " ds = ell.ax/dsPart\n", + " start = time.perf_counter()\n", + " try:\n", + " alpha0_approx, alpha1_approx, s_approx = gha2_approx(ell, P0, P1, ds=ds)\n", + " end = time.perf_counter()\n", + " d_alpha0 = abs(wu.rad2deg(alpha0_approx - alpha0_ell)) / 3600\n", + " d_alpha1 = abs(wu.rad2deg(alpha1_approx - alpha1_ell)) / 3600\n", + " d_s = abs(s_approx - s) / 1000\n", + " d_time = end - start\n", + " example_results[f\"GHA2_approx_{dsPart}\"] = (d_alpha0, d_alpha1, d_s, d_time)\n", + " except Exception as e:\n", + " print(e)\n", + " example_results[f\"GHA2_approx_{dsPart}\"] = (nan, nan, nan, nan)\n", + "\n", + " results[f\"beta0: {wu.rad2deg(beta0):.3f}, lamb0: {wu.rad2deg(lamb0):.3f}, alpha0: {wu.rad2deg(alpha0_ell):.3f}, s: {s}\"] = example_results\n", + "\n", + "\n" ], - "execution_count": null + "id": "d8868b5f0e6f9b42" }, { "metadata": { @@ -307,13 +421,41 @@ "execution_count": 8 }, { - "metadata": { - "ExecuteTime": { - "end_time": "2026-02-04T18:01:30.114488Z", - "start_time": "2026-02-04T18:01:25.723109Z" - } - }, + "metadata": {}, "cell_type": "code", + "outputs": [], + "execution_count": null, + "source": [ + "metrics_gha1 = ['dBeta [\"]', 'dLambda [\"]', 'dAlpha1 [\"]', 'time [s]']\n", + "metrics_gha2 = ['dAlpha0 [\"]', 'dAlpha1 [\"]', 'dStrecke [m]', 'time [s]']\n", + "listed_results = {}\n", + "for example, example_metrics in results.items():\n", + " for method, method_metrics in example_metrics.items():\n", + " if \"GHA1\" in method:\n", + " if method not in listed_results.keys():\n", + " listed_results[method] = {metric: [] for metric in metrics_gha1}\n", + " for i, metric in enumerate(method_metrics):\n", + " if '[\"]' in metrics_gha1[i]:\n", + " listed_results[method][metrics_gha1[i]].append(wu.rad2deg(metric)*3600)\n", + " else:\n", + " listed_results[method][metrics_gha1[i]].append(metric)\n", + " if \"GHA2\" in method:\n", + " if method not in listed_results.keys():\n", + " listed_results[method] = {metric: [] for metric in metrics_gha2}\n", + " for i, metric in enumerate(method_metrics):\n", + " if '[\"]' in metrics_gha2[i]:\n", + " listed_results[method][metrics_gha2[i]].append(wu.rad2deg(metric)*3600)\n", + " else:\n", + " listed_results[method][metrics_gha2[i]].append(metric)\n", + " pass" + ], + "id": "8fd6f220440f4494" + }, + { + "metadata": {}, + "cell_type": "code", + "outputs": [], + "execution_count": null, "source": [ "def format_max(values, is_angle=False):\n", " arr = np.array(values, dtype=float)\n", @@ -322,10 +464,6 @@ " maxi = np.nanmax(np.abs(arr))\n", " if maxi is None or (isinstance(maxi,float) and (math.isnan(maxi))):\n", " return \"nan\"\n", - " # i = 2\n", - " # while maxi > np.nanmean(np.abs(arr)):\n", - " # maxi = np.sort(np.abs(arr[~np.isnan(arr)]))[-i]\n", - " # i += 1\n", " if is_angle:\n", " maxi = wu.rad2deg(maxi)*3600\n", " if f\"{maxi:.3g}\" == 0:\n", @@ -334,7 +472,6 @@ "\n", "\n", "def build_max_table(gha_prefix, title, group_value = None):\n", - " # metrics\n", " if gha_prefix==\"GHA1\":\n", " metrics = ['dBeta [\"]', 'dLambda [\"]', 'dAlpha1 [\"]', 'time [s]']\n", " angle_mask = [True, True, True, False]\n", @@ -342,12 +479,11 @@ " metrics = ['dAlpha0 [\"]', 'dAlpha1 [\"]', 'dStrecke [m]', 'time [s]']\n", " angle_mask = [True, True, False, False]\n", "\n", - " # collect keys in this group\n", " if group_value is None:\n", - " example_keys = [example_key for example_key in results.keys()]\n", + " example_keys = [example_key for example_key in list(results.keys())]\n", " else:\n", " example_keys = [example_key for example_key, group_index in zip(results.keys(), table_indices) if group_index==group_value]\n", - " # all variant keys (inner dict keys) matching prefix\n", + "\n", " algorithms = sorted({algorithm for example_key in example_keys for algorithm in results[example_key].keys() if algorithm.startswith(gha_prefix)})\n", "\n", " header = [\"Algorithmus\", \"Parameter\", \"NaN\"] + list(metrics)\n", @@ -402,1950 +538,7 @@ "for fig in figs:\n", " fig.show()" ], - "id": "b46d57fc0d794e28", - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "C:\\Users\\moell\\AppData\\Local\\Temp\\ipykernel_25588\\2480185505.py:5: RuntimeWarning:\n", - "\n", - "All-NaN slice encountered\n", - "\n" - ] - }, - { - "data": { - "application/vnd.plotly.v1+json": { - "data": [ - { - "cells": { - "align": "center", - "values": [ - [ - "ana", - "ana", - "ana", - "ana", - "ana", - "ana", - "ana", - "ana", - "ana", - "ana", - "ana", - "ana", - "ana", - "ana", - "ana", - "approx", - "approx", - "num", - "num" - ], - [ - "20_16", - "20_2", - "20_24", - "20_4", - "20_8", - "40_16", - "40_2", - "40_24", - "40_4", - "40_8", - "60_16", - "60_2", - "60_24", - "60_4", - "60_8", - "1250", - "600", - "2000", - "5000" - ], - [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - [ - "5.1e+03", - "5.1e+03", - "5.1e+03", - "5.1e+03", - "5.1e+03", - "5.1e+03", - "5.1e+03", - "5.1e+03", - "5.1e+03", - "5.1e+03", - "5.1e+03", - "5.1e+03", - "5.1e+03", - "5.1e+03", - "5.1e+03", - "7.16e+03", - "7.15e+03", - "3.67e+03", - "3.67e+03" - ], - [ - "1.06e+04", - "1.06e+04", - "1.06e+04", - "1.06e+04", - "1.06e+04", - "1.06e+04", - "1.06e+04", - "1.06e+04", - "1.06e+04", - "1.06e+04", - "1.06e+04", - "1.06e+04", - "1.06e+04", - "1.06e+04", - "1.06e+04", - "1.67e+04", - "1.67e+04", - "3.99e+03", - "3.99e+03" - ], - [ - "1.55e+04", - "1.55e+04", - "1.55e+04", - "1.55e+04", - "1.55e+04", - "1.55e+04", - "1.55e+04", - "1.55e+04", - "1.55e+04", - "1.55e+04", - "1.55e+04", - "1.55e+04", - "1.55e+04", - "1.55e+04", - "1.55e+04", - "2.47e+03", - "2.46e+03", - "1.82e+03", - "1.82e+03" - ], - [ - "0.02", - "0.00746", - "0.0353", - "0.0123", - "0.0103", - "0.0868", - "0.0558", - "0.201", - "0.0561", - "0.0435", - "0.251", - "0.0799", - "0.495", - "0.0816", - "0.126", - "0.731", - "0.294", - "0.0847", - "0.231" - ] - ] - }, - "header": { - "align": "center", - "fill": { - "color": "lightgrey" - }, - "font": { - "size": 13 - }, - "values": [ - "Algorithmus", - "Parameter", - "NaN", - "dBeta [\"]", - "dLambda [\"]", - "dAlpha1 [\"]", - "time [s]" - ] - }, - "type": "table" - } - ], - "layout": { - "template": { - "data": { - "barpolar": [ - { - "marker": { - "line": { - "color": "white", - "width": 0.5 - }, - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "barpolar" - } - ], - "bar": [ - { - "error_x": { - "color": "rgb(36,36,36)" - }, - "error_y": { - "color": "rgb(36,36,36)" - }, - "marker": { - "line": { - "color": "white", - "width": 0.5 - }, - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "bar" - } - ], - "carpet": [ - { - "aaxis": { - "endlinecolor": "rgb(36,36,36)", - "gridcolor": "white", - "linecolor": "white", - "minorgridcolor": "white", - "startlinecolor": "rgb(36,36,36)" - }, - "baxis": { - "endlinecolor": "rgb(36,36,36)", - "gridcolor": "white", - "linecolor": "white", - "minorgridcolor": "white", - "startlinecolor": "rgb(36,36,36)" - }, - "type": "carpet" - } - ], - "choropleth": [ - { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - }, - "type": "choropleth" - } - ], - "contourcarpet": [ - { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - }, - "type": "contourcarpet" - } - ], - "contour": [ - { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - }, - "colorscale": [ - [ - 0.0, - "#440154" - ], - [ - 0.1111111111111111, - "#482878" - ], - [ - 0.2222222222222222, - "#3e4989" - ], - [ - 0.3333333333333333, - "#31688e" - ], - [ - 0.4444444444444444, - "#26828e" - ], - [ - 0.5555555555555556, - "#1f9e89" - ], - [ - 0.6666666666666666, - "#35b779" - ], - [ - 0.7777777777777778, - "#6ece58" - ], - [ - 0.8888888888888888, - "#b5de2b" - ], - [ - 1.0, - "#fde725" - ] - ], - "type": "contour" - } - ], - "heatmap": [ - { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - }, - "colorscale": [ - [ - 0.0, - "#440154" - ], - [ - 0.1111111111111111, - "#482878" - ], - [ - 0.2222222222222222, - "#3e4989" - ], - [ - 0.3333333333333333, - "#31688e" - ], - [ - 0.4444444444444444, - "#26828e" - ], - [ - 0.5555555555555556, - "#1f9e89" - ], - [ - 0.6666666666666666, - "#35b779" - ], - [ - 0.7777777777777778, - "#6ece58" - ], - [ - 0.8888888888888888, - "#b5de2b" - ], - [ - 1.0, - "#fde725" - ] - ], - "type": "heatmap" - } - ], - "histogram2dcontour": [ - { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - }, - "colorscale": [ - [ - 0.0, - "#440154" - ], - [ - 0.1111111111111111, - "#482878" - ], - [ - 0.2222222222222222, - "#3e4989" - ], - [ - 0.3333333333333333, - "#31688e" - ], - [ - 0.4444444444444444, - "#26828e" - ], - [ - 0.5555555555555556, - "#1f9e89" - ], - [ - 0.6666666666666666, - "#35b779" - ], - [ - 0.7777777777777778, - "#6ece58" - ], - [ - 0.8888888888888888, - "#b5de2b" - ], - [ - 1.0, - "#fde725" - ] - ], - "type": "histogram2dcontour" - } - ], - "histogram2d": [ - { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - }, - "colorscale": [ - [ - 0.0, - "#440154" - ], - [ - 0.1111111111111111, - "#482878" - ], - [ - 0.2222222222222222, - "#3e4989" - ], - [ - 0.3333333333333333, - "#31688e" - ], - [ - 0.4444444444444444, - "#26828e" - ], - [ - 0.5555555555555556, - "#1f9e89" - ], - [ - 0.6666666666666666, - "#35b779" - ], - [ - 0.7777777777777778, - "#6ece58" - ], - [ - 0.8888888888888888, - "#b5de2b" - ], - [ - 1.0, - "#fde725" - ] - ], - "type": "histogram2d" - } - ], - "histogram": [ - { - "marker": { - "line": { - "color": "white", - "width": 0.6 - } - }, - "type": "histogram" - } - ], - "mesh3d": [ - { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - }, - "type": "mesh3d" - } - ], - "parcoords": [ - { - "line": { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - } - }, - "type": "parcoords" - } - ], - "pie": [ - { - "automargin": true, - "type": "pie" - } - ], - "scatter3d": [ - { - "line": { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - } - }, - "marker": { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - } - }, - "type": "scatter3d" - } - ], - "scattercarpet": [ - { - "marker": { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - } - }, - "type": "scattercarpet" - } - ], - "scattergeo": [ - { - "marker": { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - } - }, - "type": "scattergeo" - } - ], - "scattergl": [ - { - "marker": { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - } - }, - "type": "scattergl" - } - ], - "scattermapbox": [ - { - "marker": { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - } - }, - "type": "scattermapbox" - } - ], - "scattermap": [ - { - "marker": { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - } - }, - "type": "scattermap" - } - ], - "scatterpolargl": [ - { - "marker": { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - } - }, - "type": "scatterpolargl" - } - ], - "scatterpolar": [ - { - "marker": { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - } - }, - "type": "scatterpolar" - } - ], - "scatter": [ - { - "fillpattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - }, - "type": "scatter" - } - ], - "scatterternary": [ - { - "marker": { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - } - }, - "type": "scatterternary" - } - ], - "surface": [ - { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - }, - "colorscale": [ - [ - 0.0, - "#440154" - ], - [ - 0.1111111111111111, - "#482878" - ], - [ - 0.2222222222222222, - "#3e4989" - ], - [ - 0.3333333333333333, - "#31688e" - ], - [ - 0.4444444444444444, - "#26828e" - ], - [ - 0.5555555555555556, - "#1f9e89" - ], - [ - 0.6666666666666666, - "#35b779" - ], - [ - 0.7777777777777778, - "#6ece58" - ], - [ - 0.8888888888888888, - "#b5de2b" - ], - [ - 1.0, - "#fde725" - ] - ], - "type": "surface" - } - ], - "table": [ - { - "cells": { - "fill": { - "color": "rgb(237,237,237)" - }, - "line": { - "color": "white" - } - }, - "header": { - "fill": { - "color": "rgb(217,217,217)" - }, - "line": { - "color": "white" - } - }, - "type": "table" - } - ] - }, - "layout": { - "annotationdefaults": { - "arrowhead": 0, - "arrowwidth": 1 - }, - "autotypenumbers": "strict", - "coloraxis": { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - } - }, - "colorscale": { - "diverging": [ - [ - 0.0, - "rgb(103,0,31)" - ], - [ - 0.1, - "rgb(178,24,43)" - ], - [ - 0.2, - "rgb(214,96,77)" - ], - [ - 0.3, - "rgb(244,165,130)" - ], - [ - 0.4, - "rgb(253,219,199)" - ], - [ - 0.5, - "rgb(247,247,247)" - ], - [ - 0.6, - "rgb(209,229,240)" - ], - [ - 0.7, - "rgb(146,197,222)" - ], - [ - 0.8, - "rgb(67,147,195)" - ], - [ - 0.9, - "rgb(33,102,172)" - ], - [ - 1.0, - "rgb(5,48,97)" - ] - ], - "sequential": [ - [ - 0.0, - "#440154" - ], - [ - 0.1111111111111111, - "#482878" - ], - [ - 0.2222222222222222, - "#3e4989" - ], - [ - 0.3333333333333333, - "#31688e" - ], - [ - 0.4444444444444444, - "#26828e" - ], - [ - 0.5555555555555556, - "#1f9e89" - ], - [ - 0.6666666666666666, - "#35b779" - ], - [ - 0.7777777777777778, - "#6ece58" - ], - [ - 0.8888888888888888, - "#b5de2b" - ], - [ - 1.0, - "#fde725" - ] - ], - "sequentialminus": [ - [ - 0.0, - "#440154" - ], - [ - 0.1111111111111111, - "#482878" - ], - [ - 0.2222222222222222, - "#3e4989" - ], - [ - 0.3333333333333333, - "#31688e" - ], - [ - 0.4444444444444444, - "#26828e" - ], - [ - 0.5555555555555556, - "#1f9e89" - ], - [ - 0.6666666666666666, - "#35b779" - ], - [ - 0.7777777777777778, - "#6ece58" - ], - [ - 0.8888888888888888, - "#b5de2b" - ], - [ - 1.0, - "#fde725" - ] - ] - }, - "colorway": [ - "#1F77B4", - "#FF7F0E", - "#2CA02C", - "#D62728", - "#9467BD", - "#8C564B", - "#E377C2", - "#7F7F7F", - "#BCBD22", - "#17BECF" - ], - "font": { - "color": "rgb(36,36,36)" - }, - "geo": { - "bgcolor": "white", - "lakecolor": "white", - "landcolor": "white", - "showlakes": true, - "showland": true, - "subunitcolor": "white" - }, - "hoverlabel": { - "align": "left" - }, - "hovermode": "closest", - "mapbox": { - "style": "light" - }, - "paper_bgcolor": "white", - "plot_bgcolor": "white", - "polar": { - "angularaxis": { - "gridcolor": "rgb(232,232,232)", - "linecolor": "rgb(36,36,36)", - "showgrid": false, - "showline": true, - "ticks": "outside" - }, - "bgcolor": "white", - "radialaxis": { - "gridcolor": "rgb(232,232,232)", - "linecolor": "rgb(36,36,36)", - "showgrid": false, - "showline": true, - "ticks": "outside" - } - }, - "scene": { - "xaxis": { - "backgroundcolor": "white", - "gridcolor": "rgb(232,232,232)", - "gridwidth": 2, - "linecolor": "rgb(36,36,36)", - "showbackground": true, - "showgrid": false, - "showline": true, - "ticks": "outside", - "zeroline": false, - "zerolinecolor": "rgb(36,36,36)" - }, - "yaxis": { - "backgroundcolor": "white", - "gridcolor": "rgb(232,232,232)", - "gridwidth": 2, - "linecolor": "rgb(36,36,36)", - "showbackground": true, - "showgrid": false, - "showline": true, - "ticks": "outside", - "zeroline": false, - "zerolinecolor": "rgb(36,36,36)" - }, - "zaxis": { - "backgroundcolor": "white", - "gridcolor": "rgb(232,232,232)", - "gridwidth": 2, - "linecolor": "rgb(36,36,36)", - "showbackground": true, - "showgrid": false, - "showline": true, - "ticks": "outside", - "zeroline": false, - "zerolinecolor": "rgb(36,36,36)" - } - }, - "shapedefaults": { - "fillcolor": "black", - "line": { - "width": 0 - }, - "opacity": 0.3 - }, - "ternary": { - "aaxis": { - "gridcolor": "rgb(232,232,232)", - "linecolor": "rgb(36,36,36)", - "showgrid": false, - "showline": true, - "ticks": "outside" - }, - "baxis": { - "gridcolor": "rgb(232,232,232)", - "linecolor": "rgb(36,36,36)", - "showgrid": false, - "showline": true, - "ticks": "outside" - }, - "bgcolor": "white", - "caxis": { - "gridcolor": "rgb(232,232,232)", - "linecolor": "rgb(36,36,36)", - "showgrid": false, - "showline": true, - "ticks": "outside" - } - }, - "title": { - "x": 0.05 - }, - "xaxis": { - "automargin": true, - "gridcolor": "rgb(232,232,232)", - "linecolor": "rgb(36,36,36)", - "showgrid": false, - "showline": true, - "ticks": "outside", - "title": { - "standoff": 15 - }, - "zeroline": false, - "zerolinecolor": "rgb(36,36,36)" - }, - "yaxis": { - "automargin": true, - "gridcolor": "rgb(232,232,232)", - "linecolor": "rgb(36,36,36)", - "showgrid": false, - "showline": true, - "ticks": "outside", - "title": { - "standoff": 15 - }, - "zeroline": false, - "zerolinecolor": "rgb(36,36,36)" - } - } - }, - "margin": { - "l": 20, - "r": 20, - "t": 60, - "b": 20 - }, - "title": { - "text": "Karney - GHA1" - }, - "width": 800, - "height": 280 - }, - "config": { - "plotlyServerURL": "https://plot.ly" - } - } - }, - "metadata": {}, - "output_type": "display_data", - "jetTransient": { - "display_id": null - } - }, - { - "data": { - "application/vnd.plotly.v1+json": { - "data": [ - { - "cells": { - "align": "center", - "values": [ - [ - "ES", - "approx", - "num" - ], - [ - "20", - "600", - "2000" - ], - [ - 0, - 0, - 2 - ], - [ - "1.07e+04", - "9.95e+03", - "nan" - ], - [ - "4.35e+03", - "2.77e+03", - "nan" - ], - [ - "0.000886", - "0.000888", - "nan" - ], - [ - "1.47", - "0.108", - "nan" - ] - ] - }, - "header": { - "align": "center", - "fill": { - "color": "lightgrey" - }, - "font": { - "size": 13 - }, - "values": [ - "Algorithmus", - "Parameter", - "NaN", - "dAlpha0 [\"]", - "dAlpha1 [\"]", - "dStrecke [m]", - "time [s]" - ] - }, - "type": "table" - } - ], - "layout": { - "template": { - "data": { - "barpolar": [ - { - "marker": { - "line": { - "color": "white", - "width": 0.5 - }, - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "barpolar" - } - ], - "bar": [ - { - "error_x": { - "color": "rgb(36,36,36)" - }, - "error_y": { - "color": "rgb(36,36,36)" - }, - "marker": { - "line": { - "color": "white", - "width": 0.5 - }, - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "bar" - } - ], - "carpet": [ - { - "aaxis": { - "endlinecolor": "rgb(36,36,36)", - "gridcolor": "white", - "linecolor": "white", - "minorgridcolor": "white", - "startlinecolor": "rgb(36,36,36)" - }, - "baxis": { - "endlinecolor": "rgb(36,36,36)", - "gridcolor": "white", - "linecolor": "white", - "minorgridcolor": "white", - "startlinecolor": "rgb(36,36,36)" - }, - "type": "carpet" - } - ], - "choropleth": [ - { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - }, - "type": "choropleth" - } - ], - "contourcarpet": [ - { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - }, - "type": "contourcarpet" - } - ], - "contour": [ - { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - }, - "colorscale": [ - [ - 0.0, - "#440154" - ], - [ - 0.1111111111111111, - "#482878" - ], - [ - 0.2222222222222222, - "#3e4989" - ], - [ - 0.3333333333333333, - "#31688e" - ], - [ - 0.4444444444444444, - "#26828e" - ], - [ - 0.5555555555555556, - "#1f9e89" - ], - [ - 0.6666666666666666, - "#35b779" - ], - [ - 0.7777777777777778, - "#6ece58" - ], - [ - 0.8888888888888888, - "#b5de2b" - ], - [ - 1.0, - "#fde725" - ] - ], - "type": "contour" - } - ], - "heatmap": [ - { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - }, - "colorscale": [ - [ - 0.0, - "#440154" - ], - [ - 0.1111111111111111, - "#482878" - ], - [ - 0.2222222222222222, - "#3e4989" - ], - [ - 0.3333333333333333, - "#31688e" - ], - [ - 0.4444444444444444, - "#26828e" - ], - [ - 0.5555555555555556, - "#1f9e89" - ], - [ - 0.6666666666666666, - "#35b779" - ], - [ - 0.7777777777777778, - "#6ece58" - ], - [ - 0.8888888888888888, - "#b5de2b" - ], - [ - 1.0, - "#fde725" - ] - ], - "type": "heatmap" - } - ], - "histogram2dcontour": [ - { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - }, - "colorscale": [ - [ - 0.0, - "#440154" - ], - [ - 0.1111111111111111, - "#482878" - ], - [ - 0.2222222222222222, - "#3e4989" - ], - [ - 0.3333333333333333, - "#31688e" - ], - [ - 0.4444444444444444, - "#26828e" - ], - [ - 0.5555555555555556, - "#1f9e89" - ], - [ - 0.6666666666666666, - "#35b779" - ], - [ - 0.7777777777777778, - "#6ece58" - ], - [ - 0.8888888888888888, - "#b5de2b" - ], - [ - 1.0, - "#fde725" - ] - ], - "type": "histogram2dcontour" - } - ], - "histogram2d": [ - { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - }, - "colorscale": [ - [ - 0.0, - "#440154" - ], - [ - 0.1111111111111111, - "#482878" - ], - [ - 0.2222222222222222, - "#3e4989" - ], - [ - 0.3333333333333333, - "#31688e" - ], - [ - 0.4444444444444444, - "#26828e" - ], - [ - 0.5555555555555556, - "#1f9e89" - ], - [ - 0.6666666666666666, - "#35b779" - ], - [ - 0.7777777777777778, - "#6ece58" - ], - [ - 0.8888888888888888, - "#b5de2b" - ], - [ - 1.0, - "#fde725" - ] - ], - "type": "histogram2d" - } - ], - "histogram": [ - { - "marker": { - "line": { - "color": "white", - "width": 0.6 - } - }, - "type": "histogram" - } - ], - "mesh3d": [ - { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - }, - "type": "mesh3d" - } - ], - "parcoords": [ - { - "line": { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - } - }, - "type": "parcoords" - } - ], - "pie": [ - { - "automargin": true, - "type": "pie" - } - ], - "scatter3d": [ - { - "line": { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - } - }, - "marker": { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - } - }, - "type": "scatter3d" - } - ], - "scattercarpet": [ - { - "marker": { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - } - }, - "type": "scattercarpet" - } - ], - "scattergeo": [ - { - "marker": { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - } - }, - "type": "scattergeo" - } - ], - "scattergl": [ - { - "marker": { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - } - }, - "type": "scattergl" - } - ], - "scattermapbox": [ - { - "marker": { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - } - }, - "type": "scattermapbox" - } - ], - "scattermap": [ - { - "marker": { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - } - }, - "type": "scattermap" - } - ], - "scatterpolargl": [ - { - "marker": { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - } - }, - "type": "scatterpolargl" - } - ], - "scatterpolar": [ - { - "marker": { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - } - }, - "type": "scatterpolar" - } - ], - "scatter": [ - { - "fillpattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - }, - "type": "scatter" - } - ], - "scatterternary": [ - { - "marker": { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - } - }, - "type": "scatterternary" - } - ], - "surface": [ - { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - }, - "colorscale": [ - [ - 0.0, - "#440154" - ], - [ - 0.1111111111111111, - "#482878" - ], - [ - 0.2222222222222222, - "#3e4989" - ], - [ - 0.3333333333333333, - "#31688e" - ], - [ - 0.4444444444444444, - "#26828e" - ], - [ - 0.5555555555555556, - "#1f9e89" - ], - [ - 0.6666666666666666, - "#35b779" - ], - [ - 0.7777777777777778, - "#6ece58" - ], - [ - 0.8888888888888888, - "#b5de2b" - ], - [ - 1.0, - "#fde725" - ] - ], - "type": "surface" - } - ], - "table": [ - { - "cells": { - "fill": { - "color": "rgb(237,237,237)" - }, - "line": { - "color": "white" - } - }, - "header": { - "fill": { - "color": "rgb(217,217,217)" - }, - "line": { - "color": "white" - } - }, - "type": "table" - } - ] - }, - "layout": { - "annotationdefaults": { - "arrowhead": 0, - "arrowwidth": 1 - }, - "autotypenumbers": "strict", - "coloraxis": { - "colorbar": { - "outlinewidth": 1, - "tickcolor": "rgb(36,36,36)", - "ticks": "outside" - } - }, - "colorscale": { - "diverging": [ - [ - 0.0, - "rgb(103,0,31)" - ], - [ - 0.1, - "rgb(178,24,43)" - ], - [ - 0.2, - "rgb(214,96,77)" - ], - [ - 0.3, - "rgb(244,165,130)" - ], - [ - 0.4, - "rgb(253,219,199)" - ], - [ - 0.5, - "rgb(247,247,247)" - ], - [ - 0.6, - "rgb(209,229,240)" - ], - [ - 0.7, - "rgb(146,197,222)" - ], - [ - 0.8, - "rgb(67,147,195)" - ], - [ - 0.9, - "rgb(33,102,172)" - ], - [ - 1.0, - "rgb(5,48,97)" - ] - ], - "sequential": [ - [ - 0.0, - "#440154" - ], - [ - 0.1111111111111111, - "#482878" - ], - [ - 0.2222222222222222, - "#3e4989" - ], - [ - 0.3333333333333333, - "#31688e" - ], - [ - 0.4444444444444444, - "#26828e" - ], - [ - 0.5555555555555556, - "#1f9e89" - ], - [ - 0.6666666666666666, - "#35b779" - ], - [ - 0.7777777777777778, - "#6ece58" - ], - [ - 0.8888888888888888, - "#b5de2b" - ], - [ - 1.0, - "#fde725" - ] - ], - "sequentialminus": [ - [ - 0.0, - "#440154" - ], - [ - 0.1111111111111111, - "#482878" - ], - [ - 0.2222222222222222, - "#3e4989" - ], - [ - 0.3333333333333333, - "#31688e" - ], - [ - 0.4444444444444444, - "#26828e" - ], - [ - 0.5555555555555556, - "#1f9e89" - ], - [ - 0.6666666666666666, - "#35b779" - ], - [ - 0.7777777777777778, - "#6ece58" - ], - [ - 0.8888888888888888, - "#b5de2b" - ], - [ - 1.0, - "#fde725" - ] - ] - }, - "colorway": [ - "#1F77B4", - "#FF7F0E", - "#2CA02C", - "#D62728", - "#9467BD", - "#8C564B", - "#E377C2", - "#7F7F7F", - "#BCBD22", - "#17BECF" - ], - "font": { - "color": "rgb(36,36,36)" - }, - "geo": { - "bgcolor": "white", - "lakecolor": "white", - "landcolor": "white", - "showlakes": true, - "showland": true, - "subunitcolor": "white" - }, - "hoverlabel": { - "align": "left" - }, - "hovermode": "closest", - "mapbox": { - "style": "light" - }, - "paper_bgcolor": "white", - "plot_bgcolor": "white", - "polar": { - "angularaxis": { - "gridcolor": "rgb(232,232,232)", - "linecolor": "rgb(36,36,36)", - "showgrid": false, - "showline": true, - "ticks": "outside" - }, - "bgcolor": "white", - "radialaxis": { - "gridcolor": "rgb(232,232,232)", - "linecolor": "rgb(36,36,36)", - "showgrid": false, - "showline": true, - "ticks": "outside" - } - }, - "scene": { - "xaxis": { - "backgroundcolor": "white", - "gridcolor": "rgb(232,232,232)", - "gridwidth": 2, - "linecolor": "rgb(36,36,36)", - "showbackground": true, - "showgrid": false, - "showline": true, - "ticks": "outside", - "zeroline": false, - "zerolinecolor": "rgb(36,36,36)" - }, - "yaxis": { - "backgroundcolor": "white", - "gridcolor": "rgb(232,232,232)", - "gridwidth": 2, - "linecolor": "rgb(36,36,36)", - "showbackground": true, - "showgrid": false, - "showline": true, - "ticks": "outside", - "zeroline": false, - "zerolinecolor": "rgb(36,36,36)" - }, - "zaxis": { - "backgroundcolor": "white", - "gridcolor": "rgb(232,232,232)", - "gridwidth": 2, - "linecolor": "rgb(36,36,36)", - "showbackground": true, - "showgrid": false, - "showline": true, - "ticks": "outside", - "zeroline": false, - "zerolinecolor": "rgb(36,36,36)" - } - }, - "shapedefaults": { - "fillcolor": "black", - "line": { - "width": 0 - }, - "opacity": 0.3 - }, - "ternary": { - "aaxis": { - "gridcolor": "rgb(232,232,232)", - "linecolor": "rgb(36,36,36)", - "showgrid": false, - "showline": true, - "ticks": "outside" - }, - "baxis": { - "gridcolor": "rgb(232,232,232)", - "linecolor": "rgb(36,36,36)", - "showgrid": false, - "showline": true, - "ticks": "outside" - }, - "bgcolor": "white", - "caxis": { - "gridcolor": "rgb(232,232,232)", - "linecolor": "rgb(36,36,36)", - "showgrid": false, - "showline": true, - "ticks": "outside" - } - }, - "title": { - "x": 0.05 - }, - "xaxis": { - "automargin": true, - "gridcolor": "rgb(232,232,232)", - "linecolor": "rgb(36,36,36)", - "showgrid": false, - "showline": true, - "ticks": "outside", - "title": { - "standoff": 15 - }, - "zeroline": false, - "zerolinecolor": "rgb(36,36,36)" - }, - "yaxis": { - "automargin": true, - "gridcolor": "rgb(232,232,232)", - "linecolor": "rgb(36,36,36)", - "showgrid": false, - "showline": true, - "ticks": "outside", - "title": { - "standoff": 15 - }, - "zeroline": false, - "zerolinecolor": "rgb(36,36,36)" - } - } - }, - "margin": { - "l": 20, - "r": 20, - "t": 60, - "b": 20 - }, - "title": { - "text": "Karney - GHA2" - }, - "width": 800, - "height": 280 - }, - "config": { - "plotlyServerURL": "https://plot.ly" - } - } - }, - "metadata": {}, - "output_type": "display_data", - "jetTransient": { - "display_id": null - } - } - ], - "execution_count": 10 + "id": "f1fb73407f5b1c8a" }, { "metadata": { @@ -2356,8 +549,6 @@ }, "cell_type": "code", "source": [ - "import numpy as np\n", - "import math\n", "from collections import defaultdict\n", "\n", "def to_latex_sci(x, sig=3):\n", @@ -2574,13 +765,13 @@ "\n", "\n", "# --- Beispielaufruf ---\n", - "example_keys = list(results.keys()) # oder gefiltert auf Panou Gruppe etc.\n", + "example_keys = list(key for i, key in enumerate(results.keys()) if table_indices[i] == 3) # oder gefiltert auf Panou Gruppe etc.\n", "latex = build_latex_table_from_results(\n", " results,\n", - " gha_prefix=\"GHA2\",\n", + " gha_prefix=\"GHA1\",\n", " example_keys=example_keys,\n", - " caption=r\"Ergebnisse der Lösungsmethoden der 1. \\gls{GHA} auf einem erdähnlichen Ellipsoid\",\n", - " label=\"tab:results_algorithms\",\n", + " caption=r\"Ergebnisse der Lösungsmethoden der 1. \\gls{GHA} auf einem erdähnlichen Ellipsoid (Gruppe 3)\",\n", + " label=\"tab:results_gha1_g1\",\n", " include_nan_col=False, # True, wenn du NaN-Spalte willst\n", " wu=wu # wichtig, falls Winkelwerte rad sind\n", ")\n",