From 3888f6488530183aa26933dcfd4e6a998c9a884e Mon Sep 17 00:00:00 2001 From: Niklas Baertl <utkql@student.kit.edu> Date: Tue, 21 Jan 2025 10:28:08 +0100 Subject: [PATCH] arrays A3 --- Aeromechanik/Aeromechanik.ipynb | 127 +++++++++++++++++++++++++++++++- 1 file changed, 125 insertions(+), 2 deletions(-) diff --git a/Aeromechanik/Aeromechanik.ipynb b/Aeromechanik/Aeromechanik.ipynb index 063fbeb..91c6950 100644 --- a/Aeromechanik/Aeromechanik.ipynb +++ b/Aeromechanik/Aeromechanik.ipynb @@ -107,6 +107,39 @@ "# Durchführung" ] }, + { + "cell_type": "code", + "execution_count": 1, + "id": "6d43a349", + "metadata": {}, + "outputs": [], + "source": [ + "#Imports for code\n", + "from IPython.display import Image\n", + "import pandas as pd\n", + "import numpy as np\n", + "import unumpy as unp\n", + "from uncertainties import ufloat, unumpy as unp\n", + "\n", + "import uncertainties\n", + "from uncertainties import ufloat\n", + "from uncertainties.unumpy import uarray as uarr\n", + "from uncertainties.unumpy import nominal_values, nominal_values as nomv, std_devs, std_devs as stdv\n", + "from uncertainties.umath import sqrt as usqrt, sin as usin,exp as uexp\n", + "import matplotlib.pyplot as plt\n", + "import os\n", + "\n", + "import kafe2\n", + "from kafe2 import XYContainer, Fit, Plot, ContoursProfiler\n", + "from scipy.signal import find_peaks\n", + "import math\n", + "from io import StringIO\n", + "from numpy import nan\n", + "from scipy import interpolate\n", + "import PhyPraKit as ppk\n", + "from scipy.signal import find_peaks_cwt" + ] + }, { "cell_type": "markdown", "id": "adf238e6-5a0e-449a-acda-37a9eab56166", @@ -435,6 +468,36 @@ "---" ] }, + { + "cell_type": "code", + "execution_count": 2, + "id": "87966da7", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[['r in m' 0.02 0.29 0.4]\n", + " ['fw in N' 0.16 0.32 0.54]]\n" + ] + } + ], + "source": [ + "offset = 0.015\n", + "dfw = 0.02\n", + "\n", + "fwr = np.array([\n", + "np.nan, 0.02, 0.29, 0.4,\n", + "np.nan, 0.16, 0.32, 0.54\n", + "]).reshape(2,4).astype('object')\n", + "\n", + "fwr[0,0] = 'r in m'\n", + "fwr[1,0] = 'fw in N'\n", + "\n", + "print(fwr)" + ] + }, { "cell_type": "markdown", "id": "97deef39-6ccc-4db6-8ce0-21f14e0f5a2e", @@ -485,6 +548,30 @@ "---" ] }, + { + "cell_type": "code", + "execution_count": null, + "id": "e976c8f1", + "metadata": {}, + "outputs": [], + "source": [ + "#mittlere Scheibe\n", + "\n", + "offset = 0.01\n", + "dfw = 0.02\n", + "df = 20\n", + "\n", + "fwr = np.array([\n", + "np.nan, 605, 805, 1000, 1200, 1400, 1600, 1810, 2000, 2200, 2400, 2600,\n", + "np.nan, 0.02, 0.025, 0.045, 0.06, 0.09, 0.12, 0.14, 0.17, 0.21, 0.26, 0.305\n", + "]).reshape(2,12).astype('object')\n", + "\n", + "fwr[0,0] = 'f in m'\n", + "fwr[1,0] = 'fw in N'\n", + "\n", + "print(fwr)" + ] + }, { "cell_type": "markdown", "id": "d2f10141-828a-4fbe-83f0-0d0ea90f8fe0", @@ -539,6 +626,30 @@ "---" ] }, + { + "cell_type": "code", + "execution_count": null, + "id": "df595b82", + "metadata": {}, + "outputs": [], + "source": [ + "#mittlere Scheibe\n", + "\n", + "offset = 0.045\n", + "dfw = 0.02\n", + "df = 20\n", + "\n", + "fwr = np.array([\n", + "np.nan, 605, 805, 1000, 1200, 1400, 1600, 1810, 2000, 2200, 2400, 2600,\n", + "np.nan, 0.02, 0.025, 0.045, 0.06, 0.09, 0.12, 0.14, 0.17, 0.21, 0.26, 0.305\n", + "]).reshape(2,12).astype('object')\n", + "\n", + "fwr[0,0] = 'f in m'\n", + "fwr[1,0] = 'fw in N'\n", + "\n", + "print(fwr)" + ] + }, { "cell_type": "markdown", "id": "a9faea00-ce2c-4f89-a521-6d1d2cac448c", @@ -600,6 +711,18 @@ "---" ] }, + { + "cell_type": "code", + "execution_count": null, + "id": "496cad38", + "metadata": {}, + "outputs": [], + "source": [ + "offset_drag = 0.03\n", + "offset_lift = 0.1\n", + "\n" + ] + }, { "cell_type": "markdown", "id": "071af68d-6570-43af-a947-a54b9b45ec3e", @@ -686,7 +809,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "cgda", "language": "python", "name": "python3" }, @@ -700,7 +823,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.3" + "version": "3.11.4" } }, "nbformat": 4, -- GitLab