From 1532c97111ffe7685f42b50f89bc1d883ba9217f Mon Sep 17 00:00:00 2001 From: "Tammo.Weber" Date: Tue, 3 Feb 2026 21:45:24 +0100 Subject: [PATCH] =?UTF-8?q?Koordinatenart=20f=C3=BCr=20den=20Plot=20w?= =?UTF-8?q?=C3=A4hlbar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dashboard.py | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/dashboard.py b/dashboard.py index 7caa4b5..6eca749 100644 --- a/dashboard.py +++ b/dashboard.py @@ -13,7 +13,7 @@ from GHA_triaxial.approx_gha1 import gha1_approx from GHA_triaxial.panou_2013_2GHA_num import gha2_num from GHA_triaxial.ES_gha2 import gha2_ES -from GHA_triaxial.approx_gha2 import gha2 +from GHA_triaxial.approx_gha2 import gha2_approx app = Dash(__name__, suppress_callback_exceptions=True) @@ -194,7 +194,9 @@ app.layout = html.Div( {"label": "Bursa1972", "value": "Bursa1972"}, {"label": "Bursa1970", "value": "Bursa1970"}, {"label": "BesselBiaxial", "value": "BesselBiaxial"}, + {"label": "KarneyTest2024", "value": "KarneyTest2024"}, {"label": "Fiction", "value": "Fiction"}, + ], value="", style={"width": "300px", "marginBottom": "16px"}, @@ -241,12 +243,25 @@ app.layout = html.Div( "minWidth": "520px", "position": "sticky", "top": "0", - "marginTop": "-150px", + "marginTop": "-50px", }, children=[ + html.Label("Koordinatenart wählen:"), + dcc.Dropdown( + id="dropdown-coors-type", + options=[ + {"label": "Ellipsoidisch", "value": "ell"}, + {"label": "Parametrisch", "value": "para"}, + {"label": "Geodätisch", "value": "geod"}, + + ], + value="ell", + clearable=False, + style={"width": "300px"}, + ), dcc.Graph( id="ellipsoid-plot", - style={"height": "90vh", "width": "100%"}, + style={"height": "85vh", "width": "100%"}, config={"responsive": True} ) ], @@ -297,7 +312,7 @@ def render_content(tab): options=[ {"label": "Analytisch", "value": "analytisch"}, {"label": "Numerisch", "value": "numerisch"}, - {"label": "Stochastisch (ES)", "value": "stochastisch"}, + #{"label": "Stochastisch (ES)", "value": "stochastisch"}, {"label": "Approximiert", "value": "approx"}, ], value=[], @@ -602,7 +617,7 @@ def compute_gha2_num(n2, beta0, lamb0, beta1, lamb1, ax, ay, b, method2): P0 = ell.ell2cart(beta0_rad, lamb0_rad) P1 = ell.ell2cart(beta1_rad, lamb1_rad) - a0_num, a1_num, s_num, beta_arr, lamb_arr = gha2_num(ell, beta0_rad, lamb0_rad, beta1_rad, lamb1_rad, all_points=True) + a0_num, a1_num, s_num, beta_arr, lamb_arr = gha2_num(ell, beta0_rad, lamb0_rad, beta1_rad, lamb1_rad, all_points=True, n=3000) polyline = [] for b_rad, l_rad in zip(beta_arr, lamb_arr): @@ -652,7 +667,7 @@ def compute_gha2_stoch(n2, beta0, lamb0, beta1, lamb1, ax, ay, b, method2): P0 = ell.ell2cart(beta0_rad, lamb0_rad) P1 = ell.ell2cart(beta1_rad, lamb1_rad) - a0_stoch, a1_stoch, s_stoch, points = gha2_ES(ell, P0, P1, all_points=True, sigmaStep=1e-5) + a0_stoch, a1_stoch, s_stoch, points = gha2_ES(ell, P0, P1, all_points=True) out = html.Div([ html.Strong("Stochastisch (ES): "), @@ -691,7 +706,7 @@ def compute_gha2_approx(n2, beta0, lamb0, beta1, lamb1, ax, ay, b, method2): P0 = ell.ell2cart(beta0_rad, lamb0_rad) P1 = ell.ell2cart(beta1_rad, lamb1_rad) - a0_app, a1_app, s_app, points = gha2(ell, P0, P1, ds=1e-4, all_points=True) + a0_app, a1_app, s_app, points = gha2_approx(ell, P0, P1, ds=1e-4, all_points=True) out = html.Div([ html.Strong("Approximiert: "), @@ -706,6 +721,7 @@ def compute_gha2_approx(n2, beta0, lamb0, beta1, lamb1, ax, ay, b, method2): Input("input-ax", "value"), Input("input-ay", "value"), Input("input-b", "value"), + Input("dropdown-coors-type", "value"), Input("store-gha1-ana", "data"), Input("store-gha1-num", "data"), Input("store-gha1-stoch", "data"), @@ -714,13 +730,13 @@ def compute_gha2_approx(n2, beta0, lamb0, beta1, lamb1, ax, ay, b, method2): Input("store-gha2-stoch", "data"), Input("store-gha2-approx", "data"), ) -def render_all(ax, ay, b, store_gha1_ana, store_gha1_num, store_gha1_stoch, store_gha1_approx, store_gha2_num, store_gha2_stoch, store_gha2_approx): +def render_all(ax, ay, b, coords_type, store_gha1_ana, store_gha1_num, store_gha1_stoch, store_gha1_approx, store_gha2_num, store_gha2_stoch, store_gha2_approx): if None in (ax, ay, b): return go.Figure() ell = EllipsoidTriaxial(ax, ay, b) fig = ellipsoid_figure(ell, title="") - fig = figure_constant_lines(fig, ell, "ell") + fig = figure_constant_lines(fig, ell, coords_type) def add_from_store(fig, store): if not store: