From 49d03786dc910365785c6449302dfa2c2f8b2472 Mon Sep 17 00:00:00 2001 From: Hendrik Date: Sat, 7 Feb 2026 18:07:25 +0100 Subject: [PATCH] GHA1 ana richtig aufgerufen im Dashboard und im Test --- Tests/algorithms_test.ipynb | 1907 ++++++++++++++++++++++++++++- Tests/alpha_conversion_test.ipynb | 62 +- dashboard.py | 6 +- 3 files changed, 1891 insertions(+), 84 deletions(-) diff --git a/Tests/algorithms_test.ipynb b/Tests/algorithms_test.ipynb index 238190e..ceb870f 100644 --- a/Tests/algorithms_test.ipynb +++ b/Tests/algorithms_test.ipynb @@ -3,8 +3,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2026-02-06T14:51:27.226527Z", - "start_time": "2026-02-06T14:51:25.617943Z" + "end_time": "2026-02-07T16:59:00.652440Z", + "start_time": "2026-02-07T16:59:00.121091Z" } }, "cell_type": "code", @@ -19,8 +19,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2026-02-06T14:51:28.975727Z", - "start_time": "2026-02-06T14:51:27.809213Z" + "end_time": "2026-02-07T16:59:02.990888Z", + "start_time": "2026-02-07T16:59:00.668752Z" } }, "cell_type": "code", @@ -61,8 +61,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2026-02-06T14:51:30.011589Z", - "start_time": "2026-02-06T14:51:29.626051Z" + "end_time": "2026-02-07T16:59:03.608664Z", + "start_time": "2026-02-07T16:59:03.014887Z" } }, "cell_type": "code", @@ -80,8 +80,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2026-02-06T14:51:31.030091Z", - "start_time": "2026-02-06T14:51:30.833905Z" + "end_time": "2026-02-07T17:01:54.558895Z", + "start_time": "2026-02-07T17:01:54.016235Z" } }, "cell_type": "code", @@ -100,13 +100,13 @@ ], "id": "fc6c39b8d358e54b", "outputs": [], - "execution_count": 4 + "execution_count": 14 }, { "metadata": { "ExecuteTime": { - "end_time": "2026-02-06T15:21:03.374105Z", - "start_time": "2026-02-06T15:21:03.129308Z" + "end_time": "2026-02-07T17:00:45.868912Z", + "start_time": "2026-02-07T17:00:44.713991Z" } }, "cell_type": "code", @@ -140,10 +140,15 @@ ], "id": "6770dbd57d475127", "outputs": [], - "execution_count": 25 + "execution_count": 9 }, { - "metadata": {}, + "metadata": { + "ExecuteTime": { + "end_time": "2026-02-07T17:02:10.182032Z", + "start_time": "2026-02-07T17:01:58.900380Z" + } + }, "cell_type": "code", "source": [ "if test != \"Random\":\n", @@ -178,10 +183,10 @@ " 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", + " u1_ana, v1_ana = ell.cart2para(P1_ana)\n", + " _, _, alpha1_ana_ell = alpha_para2ell(ell, u1_ana, v1_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", @@ -276,8 +281,27 @@ " results[f\"beta0: {wu.rad2deg(beta0):.3f}, lamb0: {wu.rad2deg(lamb0):.3f}, alpha0: {wu.rad2deg(alpha0_ell):.3f}, s: {s}\"] = example_results" ], "id": "fc45e0f618a0e4d8", - "outputs": [], - "execution_count": null + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "----- Beispiel 1/4\n", + "----- Beispiel 2/4\n", + "----- Beispiel 3/4\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", + "----- Beispiel 4/4\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" + ] + } + ], + "execution_count": 15 }, { "metadata": {}, @@ -418,8 +442,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2026-02-06T15:21:05.121195Z", - "start_time": "2026-02-06T15:21:04.930958Z" + "end_time": "2026-02-06T21:26:49.148361Z", + "start_time": "2026-02-06T21:26:48.975151Z" } }, "cell_type": "code", @@ -429,13 +453,13 @@ ], "id": "4c20a0579c0f7038", "outputs": [], - "execution_count": 26 + "execution_count": 6 }, { "metadata": { "ExecuteTime": { - "end_time": "2026-02-06T14:29:13.359555Z", - "start_time": "2026-02-06T14:29:13.127178Z" + "end_time": "2026-02-07T17:02:37.451141Z", + "start_time": "2026-02-07T17:02:15.854020Z" } }, "cell_type": "code", @@ -465,10 +489,15 @@ ], "id": "2086b5bcd8416e33", "outputs": [], - "execution_count": 61 + "execution_count": null }, { - "metadata": {}, + "metadata": { + "ExecuteTime": { + "end_time": "2026-02-07T17:01:00.223306Z", + "start_time": "2026-02-07T17:00:59.325338Z" + } + }, "cell_type": "code", "source": [ "def format_max(values, is_angle=False):\n", @@ -554,14 +583,1812 @@ " fig.show()" ], "id": "eeb5a204cc4bbf7d", - "outputs": [], - "execution_count": null + "outputs": [ + { + "data": { + "application/vnd.plotly.v1+json": { + "data": [ + { + "cells": { + "align": "center", + "values": [ + [ + "ana", + "ana", + "ana", + "ana" + ], + [ + "20_2", + "20_8", + "50_2", + "50_8" + ], + [ + 2, + 2, + 2, + 2 + ], + [ + "3.2e+05", + "3.2e+05", + "3.2e+05", + "3.2e+05" + ], + [ + "6.68e+05", + "6.68e+05", + "6.68e+05", + "6.68e+05" + ], + [ + "3.22e+05", + "3.22e+05", + "3.22e+05", + "3.22e+05" + ], + [ + "0.0169", + "0.0235", + "0.158", + "0.384" + ] + ] + }, + "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": [ + [], + [], + [], + [], + [], + [], + [] + ] + }, + "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": 11 }, { "metadata": { "ExecuteTime": { - "end_time": "2026-02-06T15:21:25.399278Z", - "start_time": "2026-02-06T15:21:25.145849Z" + "end_time": "2026-02-06T16:25:27.834928Z", + "start_time": "2026-02-06T16:25:27.488557Z" } }, "cell_type": "code", @@ -773,7 +2600,10 @@ " # Metriken\n", " for mi in range(len(metric_headers)):\n", " m = max_abs_metric(results, example_keys, alg, mi, is_angle=angle_mask[mi], wu=wu)\n", - " row_cells.append(to_latex_sci(m))\n", + " if mi == 3:\n", + " row_cells.append(f\"${m:.2f}$\")\n", + " else:\n", + " row_cells.append(to_latex_sci(m))\n", "\n", " # Zeile + Linienlogik wie in deinem Beispiel\n", " latex_row = \" & \".join(row_cells) + r\" \\\\\"\n", @@ -815,22 +2645,29 @@ "text": [ "\\begin{table}[H]\n", "\\centering\n", - "\\caption{Ergebnisse der Lösungsmethoden der 2. GHA (Random)}\n", - "\\label{tab:results_Random_GHA2}\n", + "\\caption{Ergebnisse der Lösungsmethoden der 2. GHA (Panou)}\n", + "\\label{tab:results_Panou_GHA2}\n", "\\begin{tabular}{|c|c|c|c|c|c|c|}\n", "\\hline\n", "Methode & Parameterwerte & NaN & $\\max(|\\Delta \\alpha_0|)$ [$''$] & $\\max(|\\Delta \\alpha_1|)$ [$''$] & $\\max(|\\Delta s|)$ [m] & time [s] \\\\\n", "\\Xhline{1.5pt}\n", - "\\multirow{3}{*}{approximiert} & 600 & 0 & $2.075\\cdot10^{+04}$ & $2.063\\cdot10^{+04}$ & $1.730\\cdot10^{-01}$ & $2.396\\cdot10^{-01}$ \\\\\n", - " & 1250 & 0 & $2.075\\cdot10^{+04}$ & $2.063\\cdot10^{+04}$ & $1.744\\cdot10^{-01}$ & $4.663\\cdot10^{-01}$ \\\\\n", - " & 6000 & 0 & $2.075\\cdot10^{+04}$ & $2.063\\cdot10^{+04}$ & $1.749\\cdot10^{-01}$ & $3.877\\cdot10^{+00}$ \\\\\\hline\n", + "\\multirow{4}{*}{numerisch} & 200 & 0 & $1.738\\cdot10^{+01}$ & $1.858\\cdot10^{+01}$ & $7.262\\cdot10^{+03}$ & $3.67$ \\\\\n", + " & 500 & 0 & $4.679\\cdot10^{-01}$ & $4.667\\cdot10^{-01}$ & $1.796\\cdot10^{+02}$ & $9.07$ \\\\\n", + " & 1000 & 0 & $2.913\\cdot10^{-02}$ & $2.910\\cdot10^{-02}$ & $1.111\\cdot10^{+01}$ & $18.95$ \\\\\n", + " & 5000 & 0 & $4.453\\cdot10^{-05}$ & $6.276\\cdot10^{-05}$ & $1.750\\cdot10^{-02}$ & $92.75$ \\\\\\hline\n", + "\\multirow{3}{*}{approximiert} & 600 & 0 & $2.201\\cdot10^{+03}$ & $2.201\\cdot10^{+03}$ & $1.458\\cdot10^{+01}$ & $0.17$ \\\\\n", + " & 1250 & 0 & $2.201\\cdot10^{+03}$ & $2.201\\cdot10^{+03}$ & $1.600\\cdot10^{+01}$ & $0.36$ \\\\\n", + " & 6000 & 0 & $2.201\\cdot10^{+03}$ & $2.201\\cdot10^{+03}$ & $1.647\\cdot10^{+01}$ & $2.80$ \\\\\\hline\n", + "\\multirow{3}{*}{ES} & 60 & 0 & $1.779\\cdot10^{+05}$ & $1.779\\cdot10^{+05}$ & $1.480\\cdot10^{+02}$ & $5.14$ \\\\\n", + " & 600 & 0 & $1.779\\cdot10^{+05}$ & $1.779\\cdot10^{+05}$ & $4.493\\cdot10^{+01}$ & $41.70$ \\\\\n", + " & 1250 & 0 & $1.779\\cdot10^{+05}$ & $1.779\\cdot10^{+05}$ & $4.640\\cdot10^{+01}$ & $80.40$ \\\\\\hline\n", "\\end{tabular}\n", "\\end{table}\n", "\\noindent\n" ] } ], - "execution_count": 28 + "execution_count": 48 }, { "metadata": {}, diff --git a/Tests/alpha_conversion_test.ipynb b/Tests/alpha_conversion_test.ipynb index 7b9e496..ec55093 100644 --- a/Tests/alpha_conversion_test.ipynb +++ b/Tests/alpha_conversion_test.ipynb @@ -3,19 +3,17 @@ { "metadata": {}, "cell_type": "code", - "outputs": [], - "execution_count": null, "source": [ "%load_ext autoreload\n", "%autoreload 2" ], - "id": "a78faf7f4883772f" + "id": "a78faf7f4883772f", + "outputs": [], + "execution_count": null }, { "metadata": {}, "cell_type": "code", - "outputs": [], - "execution_count": null, "source": [ "%reload_ext autoreload\n", "%autoreload 2\n", @@ -24,19 +22,19 @@ "from GHA_triaxial.utils import alpha_para2ell, alpha_ell2para\n", "import numpy as np" ], - "id": "46aa84a937fea491" + "id": "46aa84a937fea491", + "outputs": [], + "execution_count": null }, { "metadata": {}, "cell_type": "code", - "outputs": [], - "execution_count": null, "source": [ "ell = EllipsoidTriaxial.init_name(\"KarneyTest2024\")\n", "diffs = []\n", - "for beta_deg in range(-180, 181, 45):\n", - " for lamb_deg in range(-90, 91, 45):\n", - " for alpha_deg in range(0, 360, 45):\n", + "for beta_deg in range(-90, 91, 15):\n", + " for lamb_deg in range(-180, 180, 15):\n", + " for alpha_deg in range(0, 360, 15):\n", " beta = wu.deg2rad(beta_deg)\n", " lamb = wu.deg2rad(lamb_deg)\n", " u, v = ell.ell2para(beta, lamb)\n", @@ -53,13 +51,13 @@ " diffs.append((beta_deg, lamb_deg, alpha_deg, diff_1, diff_2))\n", "diffs = np.array(diffs)" ], - "id": "82fc6cbbe7d5abcb" + "id": "82fc6cbbe7d5abcb", + "outputs": [], + "execution_count": null }, { "metadata": {}, "cell_type": "code", - "outputs": [], - "execution_count": null, "source": [ "i_max_ell = np.argmax(diffs[:, 3])\n", "max_ell = diffs[i_max_ell, 3]\n", @@ -73,41 +71,9 @@ "print(f'Für parametrisches Alpha = {point_max_para[2]}° und beta = {point_max_para[0]}°, lamb = {point_max_para[1]}°: diff = {max_ell}\"')\n", "pass" ], - "id": "97b5b8c9ca5377ab" - }, - { - "metadata": { - "ExecuteTime": { - "end_time": "2026-01-20T15:33:40.785362Z", - "start_time": "2026-01-20T15:33:34.296487Z" - } - }, - "cell_type": "code", - "source": [ - "ell = EllipsoidTriaxial.init_name(\"KarneyTest2024\")\n", - "diffs = []\n", - "for beta_deg in range(-180, 181, 45):\n", - " for lamb_deg in range(-90, 91, 45):\n", - " for alpha_deg in range(0, 360, 45):\n", - " beta = wu.deg2rad(beta_deg)\n", - " lamb = wu.deg2rad(lamb_deg)\n", - " u, v = ell.ell2para(beta, lamb)\n", - " alpha = wu.deg2rad(alpha_deg)\n", - "\n", - " alpha_para_1, *_ = alpha_ell2para(ell, beta, lamb, alpha)\n", - " alpha_ell_1, *_ = alpha_para2ell(ell, u, v, alpha_para_1)\n", - " diff_1 = wu.deg2rad(abs(alpha_ell_1 - alpha))/3600\n", - "\n", - " alpha_ell_2, *_ = alpha_para2ell(ell, u, v, alpha)\n", - " alpha_para_2, *_ = alpha_ell2para(ell, beta, lamb, alpha_ell_2)\n", - " diff_2 = wu.deg2rad(abs(alpha_para_2 - alpha))/3600\n", - "\n", - " diffs.append((beta_deg, lamb_deg, alpha_deg, diff_1, diff_2))\n", - "diffs = np.array(diffs)" - ], - "id": "98b9b220118deb3f", + "id": "97b5b8c9ca5377ab", "outputs": [], - "execution_count": 6 + "execution_count": null } ], "metadata": { diff --git a/dashboard.py b/dashboard.py index 0280ffc..a203ff7 100644 --- a/dashboard.py +++ b/dashboard.py @@ -12,6 +12,7 @@ from threading import Timer from ellipsoide import EllipsoidTriaxial import winkelumrechnungen as wu import ausgaben as aus +from GHA_triaxial.utils import alpha_ell2para, alpha_para2ell from GHA_triaxial.gha1_ana import gha1_ana from GHA_triaxial.gha1_num import gha1_num @@ -637,10 +638,13 @@ def compute_gha1_ana(n1, cb_ana, n_in, beta0, lamb0, s, a0, ax, ay, b): beta_rad = wu.deg2rad(float(beta0)) lamb_rad = wu.deg2rad(float(lamb0)) alpha_rad = wu.deg2rad(float(a0)) + _, _, alpha_rad_para = alpha_ell2para(ell, beta_rad, lamb_rad, alpha_rad) s_val = float(s) P0 = ell.ell2cart(beta_rad, lamb_rad) - P1_ana, alpha2 = gha1_ana(ell, P0, alpha_rad, s_val, n_in) + P1_ana, alpha2_para = gha1_ana(ell, P0, alpha_rad_para, s_val, n_in) + u1, v1 = ell.cart2para(P1_ana) + alpha2 = alpha_para2ell(ell, u1, v1, alpha2_para) beta2_ana, lamb2_ana = ell.cart2ell(P1_ana) out = html.Div([