diff --git a/Tests/algorithms_test.ipynb b/Tests/algorithms_test.ipynb index 05b2635..238190e 100644 --- a/Tests/algorithms_test.ipynb +++ b/Tests/algorithms_test.ipynb @@ -1,21 +1,29 @@ { "cells": [ { - "metadata": {}, + "metadata": { + "ExecuteTime": { + "end_time": "2026-02-06T14:51:27.226527Z", + "start_time": "2026-02-06T14:51:25.617943Z" + } + }, "cell_type": "code", - "outputs": [], - "execution_count": null, "source": [ "%load_ext autoreload\n", "%autoreload 2" ], - "id": "89aa93e9dbedd113" + "id": "89aa93e9dbedd113", + "outputs": [], + "execution_count": 1 }, { - "metadata": {}, + "metadata": { + "ExecuteTime": { + "end_time": "2026-02-06T14:51:28.975727Z", + "start_time": "2026-02-06T14:51:27.809213Z" + } + }, "cell_type": "code", - "outputs": [], - "execution_count": null, "source": [ "%reload_ext autoreload\n", "%autoreload 2\n", @@ -46,13 +54,18 @@ "from GHA_triaxial.numeric_examples_panou import get_tables as get_tables_panou\n", "from GHA_triaxial.numeric_examples_karney import get_random_examples as get_examples_karney" ], - "id": "2005e5a8854eea1e" + "id": "2005e5a8854eea1e", + "outputs": [], + "execution_count": 2 }, { - "metadata": {}, + "metadata": { + "ExecuteTime": { + "end_time": "2026-02-06T14:51:30.011589Z", + "start_time": "2026-02-06T14:51:29.626051Z" + } + }, "cell_type": "code", - "outputs": [], - "execution_count": null, "source": [ "@contextmanager\n", "def suppress_print():\n", @@ -60,13 +73,18 @@ " with redirect_stdout(fnull), redirect_stderr(fnull):\n", " yield" ], - "id": "90f107a11ff0de7e" + "id": "90f107a11ff0de7e", + "outputs": [], + "execution_count": 3 }, { - "metadata": {}, + "metadata": { + "ExecuteTime": { + "end_time": "2026-02-06T14:51:31.030091Z", + "start_time": "2026-02-06T14:51:30.833905Z" + } + }, "cell_type": "code", - "outputs": [], - "execution_count": null, "source": [ "# dsPart = [60, 125, 600, 1250, 6000, 60000] entspricht bei der Erde ca. 100km, 50km, 10km, 5km, 1km, 100m\n", "\n", @@ -80,13 +98,18 @@ "dsPart_gha2_ES = [60, 600, 1250]\n", "dsPart_gha2_approx = [600, 1250, 6000]" ], - "id": "fc6c39b8d358e54b" + "id": "fc6c39b8d358e54b", + "outputs": [], + "execution_count": 4 }, { - "metadata": {}, + "metadata": { + "ExecuteTime": { + "end_time": "2026-02-06T15:21:03.374105Z", + "start_time": "2026-02-06T15:21:03.129308Z" + } + }, "cell_type": "code", - "outputs": [], - "execution_count": null, "source": [ "# test = \"Karney\"\n", "# test = \"Panou\"\n", @@ -115,15 +138,12 @@ " examples.append([beta0, lamb0, alpha0_ell, s])\n", " pass" ], - "id": "6770dbd57d475127" + "id": "6770dbd57d475127", + "outputs": [], + "execution_count": 25 }, { - "metadata": { - "ExecuteTime": { - "end_time": "2026-02-06T14:13:16.909538Z", - "start_time": "2026-02-06T14:13:16.436261Z" - } - }, + "metadata": {}, "cell_type": "code", "source": [ "if test != \"Random\":\n", @@ -172,9 +192,10 @@ " example_results[f\"GHA1_ana_{maxM}_{parts}\"] = (nan, nan, nan, nan)\n", "\n", " for dsPart in dsPart_gha1_ES:\n", + " ds = ell.ax/dsPart\n", " start = time.perf_counter()\n", " try:\n", - " P1_ES, alpha1_ES = gha1_ES(ell, beta0, lamb0, alpha0_ell, s, maxSegLen=dsPart)\n", + " P1_ES, alpha1_ES = gha1_ES(ell, beta0, lamb0, alpha0_ell, s, maxSegLen=ds)\n", " end = time.perf_counter()\n", " beta1_ES, lamb1_ES = ell.cart2ell(P1_ES)\n", " d_beta1 = abs(beta1_ES - beta1)\n", @@ -256,17 +277,10 @@ ], "id": "fc45e0f618a0e4d8", "outputs": [], - "execution_count": 53 + "execution_count": null }, { - "metadata": { - "jupyter": { - "is_executing": true - }, - "ExecuteTime": { - "start_time": "2026-02-06T14:48:29.343679Z" - } - }, + "metadata": {}, "cell_type": "code", "source": [ "if test == \"Random\":\n", @@ -277,8 +291,8 @@ "\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", - " # _, _, alpha0_para = alpha_ell2para(ell, beta0, lamb0, alpha0_ell)\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", @@ -320,9 +334,10 @@ " example_results[f\"GHA1_approx_{dsPart}\"] = (nan, nan, nan, nan)\n", "\n", " for dsPart in dsPart_gha1_ES:\n", + " ds = ell.ax/dsPart\n", " start = time.perf_counter()\n", " try:\n", - " P1_ES, alpha1_ES = gha1_ES(ell, beta0, lamb0, alpha0_ell, s, maxSegLen=dsPart)\n", + " P1_ES, alpha1_ES = gha1_ES(ell, beta0, lamb0, alpha0_ell, s, maxSegLen=ds)\n", " end = time.perf_counter()\n", " beta1_ES, lamb1_ES = ell.cart2ell(P1_ES)\n", " d_beta1 = abs(beta1_ES - beta1)\n", @@ -386,16 +401,7 @@ "\n" ], "id": "6e20a077d522d5", - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "----- Beispiel 1/30\n", - "Fehler in der Umrechnung cart2ell\n" - ] - } - ], + "outputs": [], "execution_count": null }, { @@ -410,15 +416,20 @@ "id": "74fbd4d33c288839" }, { - "metadata": {}, + "metadata": { + "ExecuteTime": { + "end_time": "2026-02-06T15:21:05.121195Z", + "start_time": "2026-02-06T15:21:04.930958Z" + } + }, "cell_type": "code", - "outputs": [], - "execution_count": null, "source": [ - "with open(f\"gha_results{test}_all.pkl\", \"rb\") as f:\n", + "with open(f\"gha_results{test}.pkl\", \"rb\") as f:\n", " results = pickle.load(f)" ], - "id": "4c20a0579c0f7038" + "id": "4c20a0579c0f7038", + "outputs": [], + "execution_count": 26 }, { "metadata": { @@ -457,12 +468,7 @@ "execution_count": 61 }, { - "metadata": { - "ExecuteTime": { - "end_time": "2026-02-06T14:30:49.469820Z", - "start_time": "2026-02-06T14:30:49.058791Z" - } - }, + "metadata": {}, "cell_type": "code", "source": [ "def format_max(values, is_angle=False):\n", @@ -548,1838 +554,32 @@ " fig.show()" ], "id": "eeb5a204cc4bbf7d", - "outputs": [ - { - "data": { - "application/vnd.plotly.v1+json": { - "data": [ - { - "cells": { - "align": "center", - "values": [ - [], - [], - [], - [], - [], - [], - [] - ] - }, - "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": "Random - 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", - "ES", - "ES", - "approx", - "approx", - "approx" - ], - [ - "1250", - "60", - "600", - "1250", - "600", - "6000" - ], - [ - 0, - 0, - 0, - 0, - 0, - 0 - ], - [ - "0.0284", - "0.0286", - "0.0285", - "0.0286", - "0.0286", - "0.0286" - ], - [ - "0.0279", - "0.0278", - "0.0278", - "0.0279", - "0.0279", - "0.0279" - ], - [ - "0.000192", - "0.0492", - "0.000769", - "0.000192", - "0.000769", - "2.81e-06" - ], - [ - "59.7", - "4.51", - "31", - "0.23", - "0.135", - "1.69" - ] - ] - }, - "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": "Random - GHA2" - }, - "width": 800, - "height": 280 - }, - "config": { - "plotlyServerURL": "https://plot.ly" - } - } - }, - "metadata": {}, - "output_type": "display_data", - "jetTransient": { - "display_id": null - } - } - ], - "execution_count": 64 + "outputs": [], + "execution_count": null }, { "metadata": { "ExecuteTime": { - "end_time": "2026-02-06T14:37:24.303781Z", - "start_time": "2026-02-06T14:37:24.022319Z" + "end_time": "2026-02-06T15:21:25.399278Z", + "start_time": "2026-02-06T15:21:25.145849Z" } }, "cell_type": "code", "source": [ "from collections import defaultdict\n", "\n", - "def to_latex_sci(x, sig=3):\n", + "def to_latex_sci(x, decimals=3, exp_digits=2):\n", " \"\"\"\n", - " Formatiert eine Zahl als LaTeX, z.B. 8.02e-08 -> $8.02\\\\cdot10^{-8}$.\n", - " Für normale Zahlen -> $0.216$.\n", - " Für nan -> nan (ohne $...$).\n", + " Immer wissenschaftliche Schreibweise in LaTeX mit:\n", + " - fester Mantisse (z.B. 1.234)\n", + " - Exponent immer mit Vorzeichen (+/-)\n", + " - Exponent immer feste Stellenzahl (z.B. +03, -01)\n", + "\n", + " Beispiel:\n", + " 0.216 -> $2.160\\\\cdot10^{-01}$\n", + " 12.3 -> $1.230\\\\cdot10^{+01}$\n", " \"\"\"\n", + "\n", " if x is None:\n", " return \"nan\"\n", " try:\n", @@ -2390,17 +590,21 @@ " if math.isnan(xf):\n", " return \"nan\"\n", "\n", - " # nahe 0 -> 0\n", " if xf == 0.0:\n", - " return \"$0$\"\n", + " exp_fmt = f\"+{0:0{exp_digits}d}\"\n", + " mant = f\"{0:.{decimals}f}\"\n", + " return f\"${mant}\\\\cdot10^{{{exp_fmt}}}$\"\n", "\n", - " s = f\"{xf:.{sig}g}\" # z.B. '8.02e-08' oder '0.216'\n", - " if \"e\" in s or \"E\" in s:\n", - " mant, exp = s.lower().split(\"e\")\n", - " exp = int(exp)\n", - " return f\"${mant}\\\\cdot10^{{{exp}}}$\"\n", - " else:\n", - " return f\"${s}$\"\n", + " s = f\"{xf:.{decimals}e}\" # z.B. 2.160e-01\n", + " mant, exp = s.split(\"e\")\n", + " exp = int(exp)\n", + "\n", + " # Exponent formatieren: Vorzeichen + feste Länge\n", + " sign = \"+\" if exp >= 0 else \"-\"\n", + " exp_abs = abs(exp)\n", + " exp_fmt = f\"{sign}{exp_abs:0{exp_digits}d}\"\n", + "\n", + " return f\"${mant}\\\\cdot10^{{{exp_fmt}}}$\"\n", "\n", "\n", "def nan_count_for_algorithm(results, example_keys, algorithm):\n", @@ -2522,7 +726,6 @@ " if caption:\n", " lines.append(rf\"\\caption{{{caption}}}\")\n", " lines.append(rf\"\\label{{{label}}}\")\n", - " lines.append(\"\")\n", " lines.append(rf\"\\begin{{tabular}}{{{colspec}}}\")\n", " lines.append(r\"\\hline\")\n", " lines.append(\" & \".join(header_cells) + r\" \\\\\")\n", @@ -2570,7 +773,7 @@ " # 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, sig=3))\n", + " row_cells.append(to_latex_sci(m))\n", "\n", " # Zeile + Linienlogik wie in deinem Beispiel\n", " latex_row = \" & \".join(row_cells) + r\" \\\\\"\n", @@ -2581,22 +784,24 @@ " lines.append(latex_row)\n", "\n", " lines.append(r\"\\end{tabular}\")\n", - " lines.append(\"\")\n", " lines.append(r\"\\end{table}\")\n", + " lines.append(r\"\\noindent\")\n", "\n", " return \"\\n\".join(lines)\n", "\n", "\n", "# --- Beispielaufruf ---\n", "example_keys = list(key for i, key in enumerate(results.keys()))\n", - "example_keys = example_keys[:14]\n", + "if test == \"Panou\":\n", + " example_keys = example_keys[:14]\n", + "gha = \"GHA2\"\n", "# example_keys = list(key for i, key in enumerate(results.keys()) if table_indices[i] == 3) # gefiltert auf Panou Gruppe etc.\n", "latex = build_latex_table_from_results(\n", " results,\n", - " gha_prefix=\"GHA2\",\n", + " gha_prefix=gha,\n", " example_keys=example_keys,\n", - " caption=r\"Ergebnisse der Lösungsmethoden der 2. GHA auf einem erdähnlichen Ellipsoid (Gruppe 3)\",\n", - " label=\"tab:results_gha1_g1\",\n", + " caption=f\"Ergebnisse der Lösungsmethoden der {gha[3]}. GHA ({test})\",\n", + " label=f\"tab:results_{test}_{gha}\",\n", " include_nan_col=True, # True, wenn du NaN-Spalte willst\n", " wu=wu # wichtig, falls Winkelwerte rad sind\n", ")\n", @@ -2610,26 +815,22 @@ "text": [ "\\begin{table}[H]\n", "\\centering\n", - "\\caption{Ergebnisse der Lösungsmethoden der 2. \\gls{GHA} auf einem erdähnlichen Ellipsoid (Gruppe 3)}\n", - "\\label{tab:results_gha1_g1}\n", - "\n", + "\\caption{Ergebnisse der Lösungsmethoden der 2. GHA (Random)}\n", + "\\label{tab:results_Random_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 & $0.0286$ & $0.0279$ & $0.000769$ & $0.135$ \\\\\n", - " & 1250 & 0 & $0.0286$ & $0.0279$ & $0.000192$ & $0.23$ \\\\\n", - " & 6000 & 0 & $0.0286$ & $0.0279$ & $2.81\\cdot10^{-6}$ & $1.69$ \\\\\\hline\n", - "\\multirow{3}{*}{ES} & 60 & 0 & $0.0286$ & $0.0278$ & $0.0492$ & $4.51$ \\\\\n", - " & 600 & 0 & $0.0285$ & $0.0278$ & $0.000769$ & $31$ \\\\\n", - " & 1250 & 0 & $0.0284$ & $0.0279$ & $0.000192$ & $59.7$ \\\\\\hline\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", "\\end{tabular}\n", - "\n", - "\\end{table}\n" + "\\end{table}\n", + "\\noindent\n" ] } ], - "execution_count": 65 + "execution_count": 28 }, { "metadata": {}, diff --git a/Tests/alpha_conversion_test.ipynb b/Tests/alpha_conversion_test.ipynb index 62c501a..7b9e496 100644 --- a/Tests/alpha_conversion_test.ipynb +++ b/Tests/alpha_conversion_test.ipynb @@ -1,30 +1,21 @@ { "cells": [ { + "metadata": {}, "cell_type": "code", - "id": "initial_id", - "metadata": { - "collapsed": true, - "ExecuteTime": { - "end_time": "2026-01-20T15:30:31.978159Z", - "start_time": "2026-01-20T15:30:31.835157Z" - } - }, + "outputs": [], + "execution_count": null, "source": [ "%load_ext autoreload\n", "%autoreload 2" ], - "outputs": [], - "execution_count": 1 + "id": "a78faf7f4883772f" }, { - "metadata": { - "ExecuteTime": { - "end_time": "2026-01-20T15:30:33.910807Z", - "start_time": "2026-01-20T15:30:32.803089Z" - } - }, + "metadata": {}, "cell_type": "code", + "outputs": [], + "execution_count": null, "source": [ "%reload_ext autoreload\n", "%autoreload 2\n", @@ -33,9 +24,56 @@ "from GHA_triaxial.utils import alpha_para2ell, alpha_ell2para\n", "import numpy as np" ], - "id": "9ad815aea55574e3", + "id": "46aa84a937fea491" + }, + { + "metadata": {}, + "cell_type": "code", "outputs": [], - "execution_count": 2 + "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", + " 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": "82fc6cbbe7d5abcb" + }, + { + "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", + "point_max_ell = diffs[i_max_ell, :3]\n", + "\n", + "i_max_para = np.argmax(diffs[:, 4])\n", + "max_para = diffs[i_max_para, 4]\n", + "point_max_para = diffs[i_max_para, :4]\n", + "\n", + "print(f'Für elliptisches Alpha = {point_max_ell[2]}° und beta = {point_max_ell[0]}°, lamb = {point_max_ell[1]}°: diff = {max_ell}\"')\n", + "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": { @@ -70,40 +108,6 @@ "id": "98b9b220118deb3f", "outputs": [], "execution_count": 6 - }, - { - "metadata": { - "ExecuteTime": { - "end_time": "2026-01-20T15:33:50.497990Z", - "start_time": "2026-01-20T15:33:50.261115Z" - } - }, - "cell_type": "code", - "source": [ - "i_max_ell = np.argmax(diffs[:, 3])\n", - "max_ell = diffs[i_max_ell, 3]\n", - "point_max_ell = diffs[i_max_ell, :3]\n", - "\n", - "i_max_para = np.argmax(diffs[:, 4])\n", - "max_para = diffs[i_max_para, 4]\n", - "point_max_para = diffs[i_max_para, :4]\n", - "\n", - "print(f'Für elliptisches Alpha = {point_max_ell[2]}° und beta = {point_max_ell[0]}°, lamb = {point_max_ell[1]}°: diff = {max_ell}\"')\n", - "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": "3c74b65b0e85e3c2", - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Für elliptisches Alpha = 315.0° und beta = -90.0°, lamb = -90.0°: diff = 3.426945967752335e-05\"\n", - "Für parametrisches Alpha = 315.0° und beta = -90.0°, lamb = -90.0°: diff = 3.426945967752335e-05\"\n" - ] - } - ], - "execution_count": 7 } ], "metadata": {