diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index dd7c851..d5cc3b5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -37,9 +37,9 @@ jobs: '${{ steps.cp.outputs.python-path }}' -m pytest -v --disable-warnings pCrunch # Debugging session - - name: Setup tmate session - if: contains( matrix.os, 'ubuntu') - uses: mxschmitt/action-tmate@v3 + #- name: Setup tmate session + # if: contains( matrix.os, 'ubuntu') + # uses: mxschmitt/action-tmate@v3 - name: Test examples run: | diff --git a/examples/example.ipynb b/examples/example.ipynb index 5f6aa4c..573cce7 100644 --- a/examples/example.ipynb +++ b/examples/example.ipynb @@ -41,7 +41,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 13, "metadata": {}, "outputs": [ { @@ -62,7 +62,7 @@ " os.path.join(output_dir, f) for f in os.listdir(output_dir)\n", " if valid_extension(f)\n", "]\n", - "\n", + "outfiles.sort()\n", "print(f\"Found {len(outfiles)} files.\")" ] }, @@ -75,14 +75,14 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 14, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "[, , ]\n" + "[, , ]\n" ] } ], @@ -96,32 +96,18 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 15, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "['Time' 'WindVxi' 'WindVyi' 'WindVzi' 'WaveElev' 'Wave1Vxi' 'Wave1Vyi'\n", - " 'Wave1Vzi' 'Wave1Axi' 'Wave1Ayi' 'Wave1Azi' 'GenPwr' 'GenTq' 'HSSBrTq'\n", - " 'BldPitch1' 'BldPitch2' 'BldPitch3' 'Azimuth' 'RotSpeed' 'GenSpeed'\n", - " 'NacYaw' 'NacYawErr' 'OoPDefl1' 'IPDefl1' 'TwstDefl1' 'OoPDefl2'\n", - " 'IPDefl2' 'TwstDefl2' 'OoPDefl3' 'IPDefl3' 'TwstDefl3' 'TwrClrnc1'\n", - " 'TwrClrnc2' 'TwrClrnc3' 'NcIMUTAxs' 'NcIMUTAys' 'NcIMUTAzs' 'TTDspFA'\n", - " 'TTDspSS' 'TTDspTwst' 'PtfmSurge' 'PtfmSway' 'PtfmHeave' 'PtfmRoll'\n", - " 'PtfmPitch' 'PtfmYaw' 'PtfmTAxt' 'PtfmTAyt' 'PtfmTAzt' 'RootFxc1'\n", - " 'RootFyc1' 'RootFzc1' 'RootMxc1' 'RootMyc1' 'RootMzc1' 'RootFxc2'\n", - " 'RootFyc2' 'RootFzc2' 'RootMxc2' 'RootMyc2' 'RootMzc2' 'RootFxc3'\n", - " 'RootFyc3' 'RootFzc3' 'RootMxc3' 'RootMyc3' 'RootMzc3' 'Spn1MLxb1'\n", - " 'Spn1MLyb1' 'Spn1MLzb1' 'Spn1MLxb2' 'Spn1MLyb2' 'Spn1MLzb2' 'Spn1MLxb3'\n", - " 'Spn1MLyb3' 'Spn1MLzb3' 'RotThrust' 'LSSGagFya' 'LSSGagFza' 'RotTorq'\n", - " 'LSSGagMya' 'LSSGagMza' 'YawBrFxp' 'YawBrFyp' 'YawBrFzp' 'YawBrMxp'\n", - " 'YawBrMyp' 'YawBrMzp' 'TwrBsFxt' 'TwrBsFyt' 'TwrBsFzt' 'TwrBsMxt'\n", - " 'TwrBsMyt' 'TwrBsMzt' 'TwHt1MLxt' 'TwHt1MLyt' 'TwHt1MLzt' 'Fair1Ten'\n", - " 'Fair1Ang' 'Anch1Ten' 'Anch1Ang' 'Fair2Ten' 'Fair2Ang' 'Anch2Ten'\n", - " 'Anch2Ang' 'Fair3Ten' 'Fair3Ang' 'Anch3Ten' 'Anch3Ang' 'TipSpdRat'\n", - " 'RotCp' 'RotCt' 'RotCq']\n" + "['Time' 'Wind1VelX' 'Wind1VelY' 'Wind1VelZ' 'TipDxb3' 'TipDyb3' 'TipRDxb3'\n", + " 'TipRDyb3' 'Spn5ALxb1' 'Spn5ALyb1' 'RotSpeed' 'LSSGagV' 'HSShftV'\n", + " 'RootFxb3' 'RootFyb3' 'RootMEdg3' 'RootMFlp3' 'Spn4MLxb1' 'Spn4MLyb1'\n", + " 'LSSGagFxs' 'LSSGagFys' 'LSSGagFzs' 'LSShftTq' 'HSShftTq' 'LSShftPwr'\n", + " 'HSShftPwr' 'GenTq' 'GenPwr']\n" ] } ], @@ -149,7 +135,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 16, "metadata": {}, "outputs": [], "source": [ @@ -187,7 +173,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 17, "metadata": {}, "outputs": [], "source": [ @@ -215,7 +201,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 18, "metadata": {}, "outputs": [ { @@ -239,27 +225,27 @@ " \n", " \n", " \n", - " WindVxi\n", - " WindVyi\n", - " WindVzi\n", - " WaveElev\n", - " Wave1Vxi\n", - " Wave1Vyi\n", - " Wave1Vzi\n", - " Wave1Axi\n", - " Wave1Ayi\n", - " Wave1Azi\n", + " Wind1VelX\n", + " Wind1VelY\n", + " Wind1VelZ\n", + " TipDxb3\n", + " TipDyb3\n", + " TipRDxb3\n", + " TipRDyb3\n", + " Spn5ALxb1\n", + " Spn5ALyb1\n", + " RotSpeed\n", " ...\n", - " RootMFlp3\n", - " Spn4MLxb1\n", - " Spn4MLyb1\n", - " LSSGagFxs\n", - " LSSGagFys\n", - " LSSGagFzs\n", - " LSShftTq\n", - " HSShftTq\n", - " LSShftPwr\n", - " HSShftPwr\n", + " Anch7Ten\n", + " Anch7Ang\n", + " Fair8Ten\n", + " Fair8Ang\n", + " Anch8Ten\n", + " Anch8Ang\n", + " TipSpdRat\n", + " RotCp\n", + " RotCt\n", + " RotCq\n", " \n", " \n", " \n", @@ -288,17 +274,17 @@ " \n", " \n", " \n", - " Test1.outb\n", - " 4.304633\n", - " -2.989339\n", - " -1.865983\n", - " -1.104790\n", - " -1.119737\n", + " AOC_WSt.out\n", + " 12.0\n", + " -0.0\n", " 0.0\n", - " -1.141634\n", - " -1.313537\n", - " 0.0\n", - " -1.325566\n", + " -0.06095\n", + " -0.008998\n", + " -0.146800\n", + " -1.280000\n", + " -0.003632\n", + " -13.630000\n", + " 1.016000\n", " ...\n", " NaN\n", " NaN\n", @@ -312,17 +298,17 @@ " NaN\n", " \n", " \n", - " Test2.outb\n", - " 6.610294\n", - " -3.429822\n", - " -2.825261\n", - " -1.490053\n", - " -1.520973\n", - " 0.0\n", - " -1.875418\n", - " -2.522711\n", + " AOC_WSt.outb\n", + " 12.0\n", + " -0.0\n", " 0.0\n", - " -2.531182\n", + " -0.06095\n", + " -0.008998\n", + " -0.146838\n", + " -1.280184\n", + " -0.003632\n", + " -13.630744\n", + " 1.015954\n", " ...\n", " NaN\n", " NaN\n", @@ -336,19 +322,7 @@ " NaN\n", " \n", " \n", - " DLC2.3_3.out\n", - " 8.197000\n", - " 0.000000\n", - " 0.000000\n", - " -1.135000\n", - " -0.540300\n", - " 0.0\n", - " -0.515600\n", - " -0.248200\n", - " 0.0\n", - " -0.183600\n", - " ...\n", - " NaN\n", + " DLC2.3_1.out\n", " NaN\n", " NaN\n", " NaN\n", @@ -358,10 +332,21 @@ " NaN\n", " NaN\n", " NaN\n", + " -0.049300\n", + " ...\n", + " 0.0\n", + " 0.0\n", + " 12876.9250\n", + " 4834.6250\n", + " 0.0\n", + " 0.0\n", + " 270.594943\n", + " 11.814832\n", + " 31.005534\n", + " 1.591906\n", " \n", " \n", - " step_0.outb\n", - " NaN\n", + " DLC2.3_2.out\n", " NaN\n", " NaN\n", " NaN\n", @@ -371,21 +356,21 @@ " NaN\n", " NaN\n", " NaN\n", + " -0.049710\n", " ...\n", - " NaN\n", - " NaN\n", - " NaN\n", - " NaN\n", - " NaN\n", - " NaN\n", - " NaN\n", - " NaN\n", - " NaN\n", - " NaN\n", + " 0.0\n", + " 0.0\n", + " 12910.2725\n", + " 4830.3545\n", + " 0.0\n", + " 0.0\n", + " 272.806077\n", + " 12.052701\n", + " 31.765697\n", + " 1.613663\n", " \n", " \n", - " AOC_WSt.outb\n", - " NaN\n", + " DLC2.3_3.out\n", " NaN\n", " NaN\n", " NaN\n", @@ -395,60 +380,61 @@ " NaN\n", " NaN\n", " NaN\n", + " -0.053140\n", " ...\n", - " -20.908183\n", - " 1.641742\n", - " -5.823535\n", - " 178.350302\n", - " -0.061129\n", - " -200.13404\n", - " 75.635627\n", - " 2.677367\n", - " 709.550948\n", - " 709.430941\n", + " 0.0\n", + " 0.0\n", + " 12897.7175\n", + " 4832.5860\n", + " 0.0\n", + " 0.0\n", + " 272.238298\n", + " 11.956121\n", + " 31.413593\n", + " 1.604839\n", " \n", " \n", "\n", - "

5 rows × 1799 columns

\n", + "

5 rows × 1113 columns

\n", "" ], "text/plain": [ - " WindVxi WindVyi WindVzi WaveElev Wave1Vxi Wave1Vyi \\\n", - " min min min min min min \n", - "Test1.outb 4.304633 -2.989339 -1.865983 -1.104790 -1.119737 0.0 \n", - "Test2.outb 6.610294 -3.429822 -2.825261 -1.490053 -1.520973 0.0 \n", - "DLC2.3_3.out 8.197000 0.000000 0.000000 -1.135000 -0.540300 0.0 \n", - "step_0.outb NaN NaN NaN NaN NaN NaN \n", - "AOC_WSt.outb NaN NaN NaN NaN NaN NaN \n", + " Wind1VelX Wind1VelY Wind1VelZ TipDxb3 TipDyb3 TipRDxb3 \\\n", + " min min min min min min \n", + "AOC_WSt.out 12.0 -0.0 0.0 -0.06095 -0.008998 -0.146800 \n", + "AOC_WSt.outb 12.0 -0.0 0.0 -0.06095 -0.008998 -0.146838 \n", + "DLC2.3_1.out NaN NaN NaN NaN NaN NaN \n", + "DLC2.3_2.out NaN NaN NaN NaN NaN NaN \n", + "DLC2.3_3.out NaN NaN NaN NaN NaN NaN \n", "\n", - " Wave1Vzi Wave1Axi Wave1Ayi Wave1Azi ... RootMFlp3 \\\n", - " min min min min ... integrated \n", - "Test1.outb -1.141634 -1.313537 0.0 -1.325566 ... NaN \n", - "Test2.outb -1.875418 -2.522711 0.0 -2.531182 ... NaN \n", - "DLC2.3_3.out -0.515600 -0.248200 0.0 -0.183600 ... NaN \n", - "step_0.outb NaN NaN NaN NaN ... NaN \n", - "AOC_WSt.outb NaN NaN NaN NaN ... -20.908183 \n", + " TipRDyb3 Spn5ALxb1 Spn5ALyb1 RotSpeed ... Anch7Ten \\\n", + " min min min min ... integrated \n", + "AOC_WSt.out -1.280000 -0.003632 -13.630000 1.016000 ... NaN \n", + "AOC_WSt.outb -1.280184 -0.003632 -13.630744 1.015954 ... NaN \n", + "DLC2.3_1.out NaN NaN NaN -0.049300 ... 0.0 \n", + "DLC2.3_2.out NaN NaN NaN -0.049710 ... 0.0 \n", + "DLC2.3_3.out NaN NaN NaN -0.053140 ... 0.0 \n", "\n", - " Spn4MLxb1 Spn4MLyb1 LSSGagFxs LSSGagFys LSSGagFzs \\\n", - " integrated integrated integrated integrated integrated \n", - "Test1.outb NaN NaN NaN NaN NaN \n", - "Test2.outb NaN NaN NaN NaN NaN \n", - "DLC2.3_3.out NaN NaN NaN NaN NaN \n", - "step_0.outb NaN NaN NaN NaN NaN \n", - "AOC_WSt.outb 1.641742 -5.823535 178.350302 -0.061129 -200.13404 \n", + " Anch7Ang Fair8Ten Fair8Ang Anch8Ten Anch8Ang \\\n", + " integrated integrated integrated integrated integrated \n", + "AOC_WSt.out NaN NaN NaN NaN NaN \n", + "AOC_WSt.outb NaN NaN NaN NaN NaN \n", + "DLC2.3_1.out 0.0 12876.9250 4834.6250 0.0 0.0 \n", + "DLC2.3_2.out 0.0 12910.2725 4830.3545 0.0 0.0 \n", + "DLC2.3_3.out 0.0 12897.7175 4832.5860 0.0 0.0 \n", "\n", - " LSShftTq HSShftTq LSShftPwr HSShftPwr \n", - " integrated integrated integrated integrated \n", - "Test1.outb NaN NaN NaN NaN \n", - "Test2.outb NaN NaN NaN NaN \n", - "DLC2.3_3.out NaN NaN NaN NaN \n", - "step_0.outb NaN NaN NaN NaN \n", - "AOC_WSt.outb 75.635627 2.677367 709.550948 709.430941 \n", + " TipSpdRat RotCp RotCt RotCq \n", + " integrated integrated integrated integrated \n", + "AOC_WSt.out NaN NaN NaN NaN \n", + "AOC_WSt.outb NaN NaN NaN NaN \n", + "DLC2.3_1.out 270.594943 11.814832 31.005534 1.591906 \n", + "DLC2.3_2.out 272.806077 12.052701 31.765697 1.613663 \n", + "DLC2.3_3.out 272.238298 11.956121 31.413593 1.604839 \n", "\n", - "[5 rows x 1799 columns]" + "[5 rows x 1113 columns]" ] }, - "execution_count": 7, + "execution_count": 18, "metadata": {}, "output_type": "execute_result" } @@ -460,7 +446,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 19, "metadata": {}, "outputs": [ { @@ -495,24 +481,44 @@ " \n", " \n", " \n", - " Test1.outb\n", - " 2108.201968\n", - " 12256.759434\n", - " 1605.138048\n", - " 6479.421752\n", - " 6327.050655\n", - " 12256.759434\n", - " 3.887742e+06\n", + " AOC_WSt.out\n", + " NaN\n", + " NaN\n", + " NaN\n", + " NaN\n", + " NaN\n", + " NaN\n", + " NaN\n", " \n", " \n", - " Test2.outb\n", - " 2880.976909\n", - " 14168.307178\n", - " 1813.222085\n", - " 8773.555158\n", - " 8798.187968\n", - " 14168.307178\n", - " 5.264308e+06\n", + " AOC_WSt.outb\n", + " NaN\n", + " NaN\n", + " NaN\n", + " NaN\n", + " NaN\n", + " NaN\n", + " NaN\n", + " \n", + " \n", + " DLC2.3_1.out\n", + " 459.805830\n", + " 9134.167593\n", + " 2672.055750\n", + " 5018.940468\n", + " 6147.974788\n", + " 9134.167593\n", + " 301137.859314\n", + " \n", + " \n", + " DLC2.3_2.out\n", + " 277.648587\n", + " 9079.452302\n", + " 2643.592784\n", + " 5134.911236\n", + " 6378.012638\n", + " 9079.452302\n", + " 308109.805751\n", " \n", " \n", " DLC2.3_3.out\n", @@ -522,49 +528,29 @@ " 5099.936575\n", " 6449.890708\n", " 8986.223847\n", - " 3.060075e+05\n", - " \n", - " \n", - " step_0.outb\n", - " 9549.757719\n", - " 55478.912370\n", - " 6376.015420\n", - " 36717.478050\n", - " 35928.506566\n", - " 55478.912370\n", - " 3.672081e+06\n", - " \n", - " \n", - " AOC_WSt.outb\n", - " NaN\n", - " NaN\n", - " NaN\n", - " NaN\n", - " NaN\n", - " NaN\n", - " NaN\n", + " 306007.537691\n", " \n", " \n", "\n", "" ], "text/plain": [ - " min max std mean \\\n", - "Test1.outb 2108.201968 12256.759434 1605.138048 6479.421752 \n", - "Test2.outb 2880.976909 14168.307178 1813.222085 8773.555158 \n", - "DLC2.3_3.out 347.604352 8986.223847 2657.649371 5099.936575 \n", - "step_0.outb 9549.757719 55478.912370 6376.015420 36717.478050 \n", - "AOC_WSt.outb NaN NaN NaN NaN \n", + " min max std mean median \\\n", + "AOC_WSt.out NaN NaN NaN NaN NaN \n", + "AOC_WSt.outb NaN NaN NaN NaN NaN \n", + "DLC2.3_1.out 459.805830 9134.167593 2672.055750 5018.940468 6147.974788 \n", + "DLC2.3_2.out 277.648587 9079.452302 2643.592784 5134.911236 6378.012638 \n", + "DLC2.3_3.out 347.604352 8986.223847 2657.649371 5099.936575 6449.890708 \n", "\n", - " median abs integrated \n", - "Test1.outb 6327.050655 12256.759434 3.887742e+06 \n", - "Test2.outb 8798.187968 14168.307178 5.264308e+06 \n", - "DLC2.3_3.out 6449.890708 8986.223847 3.060075e+05 \n", - "step_0.outb 35928.506566 55478.912370 3.672081e+06 \n", - "AOC_WSt.outb NaN NaN NaN " + " abs integrated \n", + "AOC_WSt.out NaN NaN \n", + "AOC_WSt.outb NaN NaN \n", + "DLC2.3_1.out 9134.167593 301137.859314 \n", + "DLC2.3_2.out 9079.452302 308109.805751 \n", + "DLC2.3_3.out 8986.223847 306007.537691 " ] }, - "execution_count": 8, + "execution_count": 19, "metadata": {}, "output_type": "execute_result" } @@ -576,21 +562,21 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 20, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Test1.outb 2108.201968\n", - "Test2.outb 2880.976909\n", - "DLC2.3_3.out 347.604352\n", - "step_0.outb 9549.757719\n", - "AOC_WSt.outb NaN\n", + "AOC_WSt.out NaN\n", + "AOC_WSt.outb NaN\n", + "DLC2.3_1.out 459.805830\n", + "DLC2.3_2.out 277.648587\n", + "DLC2.3_3.out 347.604352\n", "Name: (RootMc1, min), dtype: float64" ] }, - "execution_count": 9, + "execution_count": 20, "metadata": {}, "output_type": "execute_result" } @@ -601,34 +587,34 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 21, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "WindVxi min 4.304633\n", - "WindVyi min -2.989339\n", - "WindVzi min -1.865983\n", - "WaveElev min -1.104790\n", - "Wave1Vxi min -1.119737\n", - " ... \n", - "LSSGagFzs integrated NaN\n", - "LSShftTq integrated NaN\n", - "HSShftTq integrated NaN\n", - "LSShftPwr integrated NaN\n", - "HSShftPwr integrated NaN\n", - "Name: Test1.outb, Length: 1799, dtype: float64" + "Wind1VelX min NaN\n", + "Wind1VelY min NaN\n", + "Wind1VelZ min NaN\n", + "TipDxb3 min NaN\n", + "TipDyb3 min NaN\n", + " ... \n", + "Anch8Ang integrated 0.000000\n", + "TipSpdRat integrated 270.594943\n", + "RotCp integrated 11.814832\n", + "RotCt integrated 31.005534\n", + "RotCq integrated 1.591906\n", + "Name: DLC2.3_1.out, Length: 1113, dtype: float64" ] }, - "execution_count": 12, + "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Or by file\n", - "la.summary_stats.loc[\"Test1.outb\"]" + "la.summary_stats.loc[\"DLC2.3_1.out\"]" ] }, {