From 0b872f76be757fbd2d2730db969915f41a4e598b Mon Sep 17 00:00:00 2001 From: cdeline Date: Thu, 26 Sep 2024 15:55:31 -0600 Subject: [PATCH] update columns and naming included in `results` and `compiled_results` - add rearX, rearY, rearZ. remove module, row. add module_CEC_type. --- bifacial_radiance/main.py | 11 +- .../21 - Weather to Module Performance.ipynb | 442 ++++++++++-------- .../21 - Weather to Module Performance.py | 30 +- 3 files changed, 282 insertions(+), 201 deletions(-) diff --git a/bifacial_radiance/main.py b/bifacial_radiance/main.py index d8bcfe40..378881a5 100644 --- a/bifacial_radiance/main.py +++ b/bifacial_radiance/main.py @@ -3077,7 +3077,8 @@ def _printRow(analysisobj, key): else: keyname = 'timestamp' return pd.concat([pd.DataFrame({keyname:key},index=[0]), - analysisobj.results], axis=1) + analysisobj.results.drop(columns=['module','row'], + errors='ignore')], axis=1) @@ -3107,12 +3108,15 @@ def _printRow(analysisobj, key): module_local = trackerdict[key]['scenes'][analysis.sceneNum].module else: module_local = module + analysis.calculatePerformance(meteo_data=meteo_data, module=module_local, cumulativesky=self.cumulativesky, CECMod2=CECMod2) self.compiledResults = pd.concat([self.compiledResults, - _printRow(analysis, key)], ignore_index=True) + _printRow(analysis, key).assign( + module_CEC_name=module_local.CECMod.name)], + ignore_index=True) except KeyError: pass @@ -4373,7 +4377,8 @@ def results(self): """ try: keylist = ['rowWanted', 'modWanted', 'sceneNum', 'name', 'x', 'y','z', - 'Wm2Front', 'Wm2Back', 'Wm2Ground', 'backRatio', 'mattype', 'rearMat' ] + 'rearX', 'rearY', 'rearZ', 'Wm2Front', 'Wm2Back', 'Wm2Ground', + 'backRatio', 'mattype', 'rearMat' ] resultdict = {k: v for k, v in self.__dict__.items() if k in keylist} results = pd.DataFrame.from_dict(resultdict, orient='index').T.rename( columns={'modWanted':'modNum', 'rowWanted':'rowNum'}) diff --git a/docs/tutorials/21 - Weather to Module Performance.ipynb b/docs/tutorials/21 - Weather to Module Performance.ipynb index be8392b9..168a1fdf 100644 --- a/docs/tutorials/21 - Weather to Module Performance.ipynb +++ b/docs/tutorials/21 - Weather to Module Performance.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 2, "id": "07a01d38-bfea-453c-9040-72f6cc872bf3", "metadata": {}, "outputs": [ @@ -13,7 +13,7 @@ "Working on a Windows 10\n", "Python version 3.9.13 (main, Aug 25 2022, 23:51:50) [MSC v.1916 64 bit (AMD64)]\n", "Pandas version 1.5.3\n", - "bifacial_radiance version 0.4.4.dev373+g013fa7c.d20240911\n" + "bifacial_radiance version 0.4.4.dev25+g9486645.d20240925\n" ] } ], @@ -41,7 +41,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 3, "id": "23074a65", "metadata": {}, "outputs": [ @@ -69,17 +69,17 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 4, "id": "51fe7bf3", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "'0.4.4.dev373+g013fa7c.d20240911'" + "'0.4.4.dev25+g9486645.d20240925'" ] }, - "execution_count": 3, + "execution_count": 4, "metadata": {}, "output_type": "execute_result" } @@ -103,7 +103,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 5, "id": "1423a9f2", "metadata": {}, "outputs": [], @@ -124,7 +124,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 6, "id": "fd6a686c", "metadata": {}, "outputs": [ @@ -154,7 +154,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 7, "id": "250eb585", "metadata": {}, "outputs": [ @@ -194,7 +194,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 8, "id": "9370c9c2", "metadata": { "scrolled": true @@ -226,7 +226,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 9, "id": "111bdbd2", "metadata": {}, "outputs": [], @@ -236,7 +236,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 10, "id": "1f2e3cd4", "metadata": {}, "outputs": [ @@ -267,7 +267,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 11, "id": "10e35e7c", "metadata": {}, "outputs": [ @@ -300,7 +300,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 12, "id": "29c4a111", "metadata": {}, "outputs": [ @@ -321,7 +321,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 13, "id": "71bbd496", "metadata": {}, "outputs": [ @@ -334,24 +334,24 @@ "Created 1axis_2021-01-13_1100.oct\n", "Created 1axis_2021-01-13_1200.oct\n", "\n", - "Append=False. Over-writing any existing `AnalysisObj` in trackerdict.\n", + "Analysis1axis: append=False. Over-writing any existing `AnalysisObj` in trackerdict.\n", "\n", "Linescan in process: 1axis_2021-01-13_1100_Scene0_Row1_Module3_Front\n", "Linescan in process: 1axis_2021-01-13_1100_Scene0_Row1_Module3_Back\n", "Saved: results\\irr_1axis_2021-01-13_1100_Scene0_Row1_Module3.csv\n", - "Index: 2021-01-13_1100. Wm2Front: 254.17053333333334. Wm2Back: 39.891439999999996\n", + "Index: 2021-01-13_1100. Wm2Front: 254.37783333333334. Wm2Back: 40.0465\n", "Linescan in process: 1axis_2021-01-13_1200_Scene0_Row1_Module3_Front\n", "Linescan in process: 1axis_2021-01-13_1200_Scene0_Row1_Module3_Back\n", "Saved: results\\irr_1axis_2021-01-13_1200_Scene0_Row1_Module3.csv\n", - "Index: 2021-01-13_1200. Wm2Front: 253.29183333333333. Wm2Back: 38.00911333333333\n", + "Index: 2021-01-13_1200. Wm2Front: 253.61329999999998. Wm2Back: 37.96939666666667\n", "Linescan in process: 1axis_2021-01-13_1100_Scene1_Row1_Module1_Front\n", "Linescan in process: 1axis_2021-01-13_1100_Scene1_Row1_Module1_Back\n", "Saved: results\\irr_1axis_2021-01-13_1100_Scene1_Row1_Module1.csv\n", - "Index: 2021-01-13_1100. Wm2Front: 253.40509999999998. Wm2Back: 52.94233666666667\n", + "Index: 2021-01-13_1100. Wm2Front: 253.51493333333335. Wm2Back: 52.92065666666667\n", "Linescan in process: 1axis_2021-01-13_1200_Scene1_Row1_Module1_Front\n", "Linescan in process: 1axis_2021-01-13_1200_Scene1_Row1_Module1_Back\n", "Saved: results\\irr_1axis_2021-01-13_1200_Scene1_Row1_Module1.csv\n", - "Index: 2021-01-13_1200. Wm2Front: 253.2938333333333. Wm2Back: 50.9307\n" + "Index: 2021-01-13_1200. Wm2Front: 252.98073333333332. Wm2Back: 50.79347333333333\n" ] } ], @@ -364,7 +364,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 14, "id": "a3a10f10", "metadata": {}, "outputs": [ @@ -374,10 +374,10 @@ "text": [ "Linescan in process: 1axis_groundscan_2021-01-13_1100Silvanas__Row1_Module1_Front\n", "Saved: results\\irr_1axis_groundscan_2021-01-13_1100Silvanas__Row1_Module1.csv\n", - "Index: 2021-01-13_1100. Wm2Ground: 205.03148000000002. sensorsground: 10\n", + "Index: 2021-01-13_1100. Wm2Ground: 204.88986. sensorsground: 10\n", "Linescan in process: 1axis_groundscan_2021-01-13_1200Silvanas__Row1_Module1_Front\n", "Saved: results\\irr_1axis_groundscan_2021-01-13_1200Silvanas__Row1_Module1.csv\n", - "Index: 2021-01-13_1200. Wm2Ground: 237.71761. sensorsground: 10\n" + "Index: 2021-01-13_1200. Wm2Ground: 237.75890999999996. sensorsground: 10\n" ] } ], @@ -388,8 +388,8 @@ }, { "cell_type": "code", - "execution_count": 14, - "id": "6296cabe", + "execution_count": 15, + "id": "2942a802", "metadata": {}, "outputs": [ { @@ -421,15 +421,17 @@ " x\n", " y\n", " z\n", + " rearZ\n", " mattype\n", " rearMat\n", " Wm2Front\n", " Wm2Back\n", " backRatio\n", + " rearX\n", + " rearY\n", " surf_azm\n", " surf_tilt\n", " theta\n", - " temp_air\n", " \n", " \n", " \n", @@ -443,15 +445,17 @@ " [0.3734448, 0.01462469, -0.3441954]\n", " [2.28669e-17, 8.955042e-19, -2.107589e-17]\n", " [1.166863, 1.51507, 1.863277]\n", + " [1.151075, 1.499282, 1.847489]\n", " [a2.0.a0.test-module.6457, a2.0.a0.test-module...\n", " [a2.0.a0.test-module.2310, a2.0.a0.test-module...\n", - " [254.0681, 254.95580000000004, 254.3216]\n", - " [39.50778, 39.82523, 40.90701]\n", - " [0.1555001375610021, 0.15620383531641435, 0.16...\n", + " [253.9854, 254.9895, 254.1586]\n", + " [39.46907, 39.66438, 41.00605]\n", + " [0.1553983599121843, 0.15555238332408464, 0.16...\n", + " [0.3581237, -0.000696414, -0.3595166]\n", + " [2.192875e-17, -4.264306e-20, -2.201404e-17]\n", " 90.0\n", " 44.14\n", " -44.14\n", - " 4.6\n", " \n", " \n", " 1\n", @@ -463,15 +467,17 @@ " [-14.62656, -14.98538, -15.3442]\n", " [2.28669e-17, 8.955042e-19, -2.107589e-17]\n", " [2.166863, 2.51507, 2.863277]\n", + " [2.151075, 2.499282, 2.847489]\n", " [a0.0.a0.test.6457, a0.0.a0.test.6457, a0.0.a0...\n", " [a0.0.a0.test.2310, a0.0.a0.test.2310, a0.0.a0...\n", - " [253.0643, 253.8386, 253.63700000000003]\n", - " [52.60152, 53.10697, 52.92946]\n", - " [0.20785749764981606, 0.2092146773001533, 0.20...\n", + " [253.0249, 253.8044, 253.7155]\n", + " [52.58993, 53.09413, 53.07791]\n", + " [0.20784405865170325, 0.20919227880888272, 0.2...\n", + " [-14.64188, -15.0007, -15.35952]\n", + " [2.192875e-17, -4.264306e-20, -2.201404e-17]\n", " 90.0\n", " 44.14\n", " -44.14\n", - " 4.6\n", " \n", " \n", " 2\n", @@ -483,15 +489,17 @@ " [-15.0, -14.44444, -13.88889, -13.33333, -12.7...\n", " [0.0, 3.401797e-17, 6.803593e-17, 1.020539e-16...\n", " [0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.0...\n", + " NaN\n", " [groundplane, groundplane, groundplane, ground...\n", " NaN\n", - " [198.7301, 201.02699999999996, 204.6268, 206.4...\n", + " [199.43860000000004, 201.74889999999996, 204.7...\n", + " NaN\n", + " NaN\n", " NaN\n", " NaN\n", " 90.0\n", " 44.14\n", " -44.14\n", - " 4.6\n", " \n", " \n", " 3\n", @@ -503,15 +511,17 @@ " [0.473756, 0.007594116, -0.4585678]\n", " [2.900919e-17, 4.650055e-19, -2.807918e-17]\n", " [1.338767, 1.519579, 1.700391]\n", + " [1.318255, 1.499068, 1.67988]\n", " [a2.0.a0.test-module.6457, a2.0.a0.test-module...\n", " [a2.0.a0.test-module.2310, a2.0.a0.test-module...\n", - " [252.768, 252.9163, 253.3978]\n", - " [37.82638, 37.77132, 38.61288]\n", - " [0.1496480185465781, 0.149342571662753, 0.1523...\n", + " [253.5078, 253.6133, 253.7188]\n", + " [37.62749, 37.65656, 38.62414]\n", + " [0.14842676072783273, 0.14847964014647438, 0.1...\n", + " [0.4658003, -0.0003616246, -0.4665235]\n", + " [2.852204e-17, -2.214312e-20, -2.856633e-17]\n", " 90.0\n", " 21.20\n", " -21.20\n", - " 6.5\n", " \n", " \n", " 4\n", @@ -523,15 +533,17 @@ " [-14.52624, -14.99241, -15.45857]\n", " [2.900919e-17, 4.650055e-19, -2.807918e-17]\n", " [2.338767, 2.519579, 2.700391]\n", + " [2.318255, 2.499068, 2.67988]\n", " [a0.0.a0.test.6457, a0.0.a0.test.6457, a0.0.a0...\n", " [a0.0.a0.test.2310, a0.0.a0.test.2310, a0.0.a0...\n", - " [252.9312, 253.0649, 253.1985]\n", - " [50.65721, 51.0674, 50.72511]\n", - " [0.20027979830167927, 0.2017948684512611, 0.20...\n", + " [252.92009999999996, 252.98069999999998, 253.0...\n", + " [50.52337, 50.86739, 50.98965999999999]\n", + " [0.19975941113651652, 0.20107142137158537, 0.2...\n", + " [-14.5342, -15.00036, -15.46652]\n", + " [2.852204e-17, -2.214312e-20, -2.856633e-17]\n", " 90.0\n", " 21.20\n", " -21.20\n", - " 6.5\n", " \n", " \n", " 5\n", @@ -543,15 +555,17 @@ " [-15.0, -14.44444, -13.88889, -13.33333, -12.7...\n", " [0.0, 3.401797e-17, 6.803593e-17, 1.020539e-16...\n", " [0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.0...\n", + " NaN\n", " [groundplane, groundplane, groundplane, ground...\n", " NaN\n", - " [228.0597, 229.9865, 233.2411, 237.3016, 239.1...\n", + " [227.8342, 230.13659999999996, 233.87209999999...\n", + " NaN\n", + " NaN\n", " NaN\n", " NaN\n", " 90.0\n", " 21.20\n", " -21.20\n", - " 6.5\n", " \n", " \n", "\n", @@ -590,6 +604,14 @@ "4 [2.338767, 2.519579, 2.700391] \n", "5 [0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.0... \n", "\n", + " rearZ \\\n", + "0 [1.151075, 1.499282, 1.847489] \n", + "1 [2.151075, 2.499282, 2.847489] \n", + "2 NaN \n", + "3 [1.318255, 1.499068, 1.67988] \n", + "4 [2.318255, 2.499068, 2.67988] \n", + "5 NaN \n", + "\n", " mattype \\\n", "0 [a2.0.a0.test-module.6457, a2.0.a0.test-module... \n", "1 [a0.0.a0.test.6457, a0.0.a0.test.6457, a0.0.a0... \n", @@ -607,39 +629,47 @@ "5 NaN \n", "\n", " Wm2Front \\\n", - "0 [254.0681, 254.95580000000004, 254.3216] \n", - "1 [253.0643, 253.8386, 253.63700000000003] \n", - "2 [198.7301, 201.02699999999996, 204.6268, 206.4... \n", - "3 [252.768, 252.9163, 253.3978] \n", - "4 [252.9312, 253.0649, 253.1985] \n", - "5 [228.0597, 229.9865, 233.2411, 237.3016, 239.1... \n", + "0 [253.9854, 254.9895, 254.1586] \n", + "1 [253.0249, 253.8044, 253.7155] \n", + "2 [199.43860000000004, 201.74889999999996, 204.7... \n", + "3 [253.5078, 253.6133, 253.7188] \n", + "4 [252.92009999999996, 252.98069999999998, 253.0... \n", + "5 [227.8342, 230.13659999999996, 233.87209999999... \n", "\n", - " Wm2Back \\\n", - "0 [39.50778, 39.82523, 40.90701] \n", - "1 [52.60152, 53.10697, 52.92946] \n", - "2 NaN \n", - "3 [37.82638, 37.77132, 38.61288] \n", - "4 [50.65721, 51.0674, 50.72511] \n", - "5 NaN \n", + " Wm2Back \\\n", + "0 [39.46907, 39.66438, 41.00605] \n", + "1 [52.58993, 53.09413, 53.07791] \n", + "2 NaN \n", + "3 [37.62749, 37.65656, 38.62414] \n", + "4 [50.52337, 50.86739, 50.98965999999999] \n", + "5 NaN \n", + "\n", + " backRatio \\\n", + "0 [0.1553983599121843, 0.15555238332408464, 0.16... \n", + "1 [0.20784405865170325, 0.20919227880888272, 0.2... \n", + "2 NaN \n", + "3 [0.14842676072783273, 0.14847964014647438, 0.1... \n", + "4 [0.19975941113651652, 0.20107142137158537, 0.2... \n", + "5 NaN \n", "\n", - " backRatio surf_azm surf_tilt \\\n", - "0 [0.1555001375610021, 0.15620383531641435, 0.16... 90.0 44.14 \n", - "1 [0.20785749764981606, 0.2092146773001533, 0.20... 90.0 44.14 \n", - "2 NaN 90.0 44.14 \n", - "3 [0.1496480185465781, 0.149342571662753, 0.1523... 90.0 21.20 \n", - "4 [0.20027979830167927, 0.2017948684512611, 0.20... 90.0 21.20 \n", - "5 NaN 90.0 21.20 \n", + " rearX \\\n", + "0 [0.3581237, -0.000696414, -0.3595166] \n", + "1 [-14.64188, -15.0007, -15.35952] \n", + "2 NaN \n", + "3 [0.4658003, -0.0003616246, -0.4665235] \n", + "4 [-14.5342, -15.00036, -15.46652] \n", + "5 NaN \n", "\n", - " theta temp_air \n", - "0 -44.14 4.6 \n", - "1 -44.14 4.6 \n", - "2 -44.14 4.6 \n", - "3 -21.20 6.5 \n", - "4 -21.20 6.5 \n", - "5 -21.20 6.5 " + " rearY surf_azm surf_tilt theta \n", + "0 [2.192875e-17, -4.264306e-20, -2.201404e-17] 90.0 44.14 -44.14 \n", + "1 [2.192875e-17, -4.264306e-20, -2.201404e-17] 90.0 44.14 -44.14 \n", + "2 NaN 90.0 44.14 -44.14 \n", + "3 [2.852204e-17, -2.214312e-20, -2.856633e-17] 90.0 21.20 -21.20 \n", + "4 [2.852204e-17, -2.214312e-20, -2.856633e-17] 90.0 21.20 -21.20 \n", + "5 NaN 90.0 21.20 -21.20 " ] }, - "execution_count": 14, + "execution_count": 15, "metadata": {}, "output_type": "execute_result" } @@ -659,7 +689,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 16, "id": "7bbf6db6", "metadata": {}, "outputs": [ @@ -702,13 +732,14 @@ " x\n", " y\n", " z\n", + " rearZ\n", " mattype\n", " rearMat\n", " Wm2Front\n", " Wm2Back\n", " backRatio\n", - " module\n", - " row\n", + " rearX\n", + " rearY\n", " POA_eff\n", " Gfront_mean\n", " Grear_mean\n", @@ -722,6 +753,7 @@ " DNI\n", " DHI\n", " GHI\n", + " module_CEC_name\n", " \n", " \n", " \n", @@ -735,26 +767,28 @@ " [0.3734448, 0.01462469, -0.3441954]\n", " [2.28669e-17, 8.955042e-19, -2.107589e-17]\n", " [1.166863, 1.51507, 1.863277]\n", + " [1.151075, 1.499282, 1.847489]\n", " [a2.0.a0.test-module.6457, a2.0.a0.test-module...\n", " [a2.0.a0.test-module.2310, a2.0.a0.test-module...\n", - " [254.0681, 254.95580000000004, 254.3216]\n", - " [39.50778, 39.82523, 40.90701]\n", - " [0.1555001375610021, 0.15620383531641435, 0.16...\n", - " 3\n", - " 1\n", - " 290.520506\n", - " 254.448500\n", - " 40.080007\n", - " 91.863627\n", - " 80.368605\n", - " 14.176545\n", - " 14.302877\n", - " 0.028544\n", - " 91.837406\n", + " [253.9854, 254.9895, 254.1586]\n", + " [39.46907, 39.66438, 41.00605]\n", + " [0.1553983599121843, 0.15555238332408464, 0.16...\n", + " [0.3581237, -0.000696414, -0.3595166]\n", + " [2.192875e-17, -4.264306e-20, -2.201404e-17]\n", + " 290.419683\n", + " 254.377833\n", + " 40.046500\n", + " 91.831552\n", + " 80.346050\n", + " 14.168628\n", + " 14.295042\n", + " 0.031494\n", + " 91.802630\n", " 3.8\n", " 144\n", " 149\n", " 211\n", + " SunPower SPR-E19-310-COM\n", " \n", " \n", " 1\n", @@ -766,26 +800,28 @@ " [-14.62656, -14.98538, -15.3442]\n", " [2.28669e-17, 8.955042e-19, -2.107589e-17]\n", " [2.166863, 2.51507, 2.863277]\n", + " [2.151075, 2.499282, 2.847489]\n", " [a0.0.a0.test.6457, a0.0.a0.test.6457, a0.0.a0...\n", " [a0.0.a0.test.2310, a0.0.a0.test.2310, a0.0.a0...\n", - " [253.0643, 253.8386, 253.63700000000003]\n", - " [52.60152, 53.10697, 52.92946]\n", - " [0.20785749764981606, 0.2092146773001533, 0.20...\n", - " 1\n", - " 1\n", - " 295.816753\n", - " 253.513300\n", - " 52.879317\n", - " 123.717364\n", - " 106.056879\n", - " 16.686877\n", - " 16.651900\n", - " 0.008745\n", - " 123.706545\n", + " [253.0249, 253.8044, 253.7155]\n", + " [52.58993, 53.09413, 53.07791]\n", + " [0.20784405865170325, 0.20919227880888272, 0.2...\n", + " [-14.64188, -15.0007, -15.35952]\n", + " [2.192875e-17, -4.264306e-20, -2.201404e-17]\n", + " 295.851459\n", + " 253.514933\n", + " 52.920657\n", + " 123.731803\n", + " 106.057563\n", + " 16.699815\n", + " 16.664762\n", + " 0.008722\n", + " 123.721012\n", " 3.8\n", " 144\n", " 149\n", " 211\n", + " Prism Solar Technologies Inc. BHC72-400\n", " \n", " \n", " 2\n", @@ -797,26 +833,28 @@ " [-15.0, -14.44444, -13.88889, -13.33333, -12.7...\n", " [0.0, 3.401797e-17, 6.803593e-17, 1.020539e-16...\n", " [0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.0...\n", + " NaN\n", " [groundplane, groundplane, groundplane, ground...\n", " NaN\n", - " [198.7301, 201.02699999999996, 204.6268, 206.4...\n", + " [199.43860000000004, 201.74889999999996, 204.7...\n", " NaN\n", " NaN\n", - " 1\n", - " 1\n", - " 205.031480\n", - " 205.031480\n", + " NaN\n", + " NaN\n", + " 204.889860\n", + " 204.889860\n", " 0.000000\n", - " 85.685065\n", - " 85.685065\n", + " 85.625380\n", + " 85.625380\n", " 0.000000\n", " 0.000000\n", " 0.000000\n", - " 85.685065\n", + " 85.625380\n", " 3.8\n", " 144\n", " 149\n", " 211\n", + " Prism Solar Technologies Inc. BHC72-400\n", " \n", " \n", " 3\n", @@ -828,26 +866,28 @@ " [0.473756, 0.007594116, -0.4585678]\n", " [2.900919e-17, 4.650055e-19, -2.807918e-17]\n", " [1.338767, 1.519579, 1.700391]\n", + " [1.318255, 1.499068, 1.67988]\n", " [a2.0.a0.test-module.6457, a2.0.a0.test-module...\n", " [a2.0.a0.test-module.2310, a2.0.a0.test-module...\n", - " [252.768, 252.9163, 253.3978]\n", - " [37.82638, 37.77132, 38.61288]\n", - " [0.1496480185465781, 0.149342571662753, 0.1523...\n", - " 3\n", - " 1\n", - " 287.290541\n", - " 253.027367\n", - " 38.070193\n", - " 90.169005\n", - " 79.323353\n", - " 13.541292\n", - " 13.672709\n", - " 0.017078\n", - " 90.153606\n", + " [253.5078, 253.6133, 253.7188]\n", + " [37.62749, 37.65656, 38.62414]\n", + " [0.14842676072783273, 0.14847964014647438, 0.1...\n", + " [0.4658003, -0.0003616246, -0.4665235]\n", + " [2.852204e-17, -2.214312e-20, -2.856633e-17]\n", + " 287.785757\n", + " 253.613300\n", + " 37.969397\n", + " 90.325515\n", + " 79.509085\n", + " 13.474237\n", + " 13.604017\n", + " 0.020285\n", + " 90.307193\n", " 3.9\n", " 97\n", " 200\n", " 249\n", + " SunPower SPR-E19-310-COM\n", " \n", " \n", " 4\n", @@ -859,26 +899,28 @@ " [-14.52624, -14.99241, -15.45857]\n", " [2.900919e-17, 4.650055e-19, -2.807918e-17]\n", " [2.338767, 2.519579, 2.700391]\n", + " [2.318255, 2.499068, 2.67988]\n", " [a0.0.a0.test.6457, a0.0.a0.test.6457, a0.0.a0...\n", " [a0.0.a0.test.2310, a0.0.a0.test.2310, a0.0.a0...\n", - " [252.9312, 253.0649, 253.1985]\n", - " [50.65721, 51.0674, 50.72511]\n", - " [0.20027979830167927, 0.2017948684512611, 0.20...\n", - " 1\n", - " 1\n", - " 293.718125\n", - " 253.064867\n", - " 50.816573\n", - " 122.023014\n", - " 105.155337\n", - " 16.064363\n", - " 16.040724\n", - " 0.007130\n", - " 122.014314\n", + " [252.92009999999996, 252.98069999999998, 253.0...\n", + " [50.52337, 50.86739, 50.98965999999999]\n", + " [0.19975941113651652, 0.20107142137158537, 0.2...\n", + " [-14.5342, -15.00036, -15.46652]\n", + " [2.852204e-17, -2.214312e-20, -2.856633e-17]\n", + " 293.615512\n", + " 252.980733\n", + " 50.793473\n", + " 121.980576\n", + " 105.120321\n", + " 16.062401\n", + " 16.039006\n", + " 0.008120\n", + " 121.970671\n", " 3.9\n", " 97\n", " 200\n", " 249\n", + " Prism Solar Technologies Inc. BHC72-400\n", " \n", " \n", " 5\n", @@ -890,26 +932,28 @@ " [-15.0, -14.44444, -13.88889, -13.33333, -12.7...\n", " [0.0, 3.401797e-17, 6.803593e-17, 1.020539e-16...\n", " [0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.0...\n", + " NaN\n", " [groundplane, groundplane, groundplane, ground...\n", " NaN\n", - " [228.0597, 229.9865, 233.2411, 237.3016, 239.1...\n", + " [227.8342, 230.13659999999996, 233.87209999999...\n", " NaN\n", " NaN\n", - " 1\n", - " 1\n", - " 237.717610\n", - " 237.717610\n", + " NaN\n", + " NaN\n", + " 237.758910\n", + " 237.758910\n", " 0.000000\n", - " 98.760926\n", - " 98.760926\n", + " 98.778151\n", + " 98.778151\n", " 0.000000\n", " 0.000000\n", " 0.000000\n", - " 98.760926\n", + " 98.778151\n", " 3.9\n", " 97\n", " 200\n", " 249\n", + " Prism Solar Technologies Inc. BHC72-400\n", " \n", " \n", "\n", @@ -948,6 +992,14 @@ "4 [2.338767, 2.519579, 2.700391] \n", "5 [0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.0... \n", "\n", + " rearZ \\\n", + "0 [1.151075, 1.499282, 1.847489] \n", + "1 [2.151075, 2.499282, 2.847489] \n", + "2 NaN \n", + "3 [1.318255, 1.499068, 1.67988] \n", + "4 [2.318255, 2.499068, 2.67988] \n", + "5 NaN \n", + "\n", " mattype \\\n", "0 [a2.0.a0.test-module.6457, a2.0.a0.test-module... \n", "1 [a0.0.a0.test.6457, a0.0.a0.test.6457, a0.0.a0... \n", @@ -965,44 +1017,68 @@ "5 NaN \n", "\n", " Wm2Front \\\n", - "0 [254.0681, 254.95580000000004, 254.3216] \n", - "1 [253.0643, 253.8386, 253.63700000000003] \n", - "2 [198.7301, 201.02699999999996, 204.6268, 206.4... \n", - "3 [252.768, 252.9163, 253.3978] \n", - "4 [252.9312, 253.0649, 253.1985] \n", - "5 [228.0597, 229.9865, 233.2411, 237.3016, 239.1... \n", + "0 [253.9854, 254.9895, 254.1586] \n", + "1 [253.0249, 253.8044, 253.7155] \n", + "2 [199.43860000000004, 201.74889999999996, 204.7... \n", + "3 [253.5078, 253.6133, 253.7188] \n", + "4 [252.92009999999996, 252.98069999999998, 253.0... \n", + "5 [227.8342, 230.13659999999996, 233.87209999999... \n", "\n", - " Wm2Back \\\n", - "0 [39.50778, 39.82523, 40.90701] \n", - "1 [52.60152, 53.10697, 52.92946] \n", - "2 NaN \n", - "3 [37.82638, 37.77132, 38.61288] \n", - "4 [50.65721, 51.0674, 50.72511] \n", - "5 NaN \n", + " Wm2Back \\\n", + "0 [39.46907, 39.66438, 41.00605] \n", + "1 [52.58993, 53.09413, 53.07791] \n", + "2 NaN \n", + "3 [37.62749, 37.65656, 38.62414] \n", + "4 [50.52337, 50.86739, 50.98965999999999] \n", + "5 NaN \n", + "\n", + " backRatio \\\n", + "0 [0.1553983599121843, 0.15555238332408464, 0.16... \n", + "1 [0.20784405865170325, 0.20919227880888272, 0.2... \n", + "2 NaN \n", + "3 [0.14842676072783273, 0.14847964014647438, 0.1... \n", + "4 [0.19975941113651652, 0.20107142137158537, 0.2... \n", + "5 NaN \n", + "\n", + " rearX \\\n", + "0 [0.3581237, -0.000696414, -0.3595166] \n", + "1 [-14.64188, -15.0007, -15.35952] \n", + "2 NaN \n", + "3 [0.4658003, -0.0003616246, -0.4665235] \n", + "4 [-14.5342, -15.00036, -15.46652] \n", + "5 NaN \n", + "\n", + " rearY POA_eff Gfront_mean \\\n", + "0 [2.192875e-17, -4.264306e-20, -2.201404e-17] 290.419683 254.377833 \n", + "1 [2.192875e-17, -4.264306e-20, -2.201404e-17] 295.851459 253.514933 \n", + "2 NaN 204.889860 204.889860 \n", + "3 [2.852204e-17, -2.214312e-20, -2.856633e-17] 287.785757 253.613300 \n", + "4 [2.852204e-17, -2.214312e-20, -2.856633e-17] 293.615512 252.980733 \n", + "5 NaN 237.758910 237.758910 \n", "\n", - " backRatio module row POA_eff \\\n", - "0 [0.1555001375610021, 0.15620383531641435, 0.16... 3 1 290.520506 \n", - "1 [0.20785749764981606, 0.2092146773001533, 0.20... 1 1 295.816753 \n", - "2 NaN 1 1 205.031480 \n", - "3 [0.1496480185465781, 0.149342571662753, 0.1523... 3 1 287.290541 \n", - "4 [0.20027979830167927, 0.2017948684512611, 0.20... 1 1 293.718125 \n", - "5 NaN 1 1 237.717610 \n", + " Grear_mean Pout_raw Pout_Gfront BGG BGE Mismatch \\\n", + "0 40.046500 91.831552 80.346050 14.168628 14.295042 0.031494 \n", + "1 52.920657 123.731803 106.057563 16.699815 16.664762 0.008722 \n", + "2 0.000000 85.625380 85.625380 0.000000 0.000000 0.000000 \n", + "3 37.969397 90.325515 79.509085 13.474237 13.604017 0.020285 \n", + "4 50.793473 121.980576 105.120321 16.062401 16.039006 0.008120 \n", + "5 0.000000 98.778151 98.778151 0.000000 0.000000 0.000000 \n", "\n", - " Gfront_mean Grear_mean Pout_raw Pout_Gfront BGG BGE \\\n", - "0 254.448500 40.080007 91.863627 80.368605 14.176545 14.302877 \n", - "1 253.513300 52.879317 123.717364 106.056879 16.686877 16.651900 \n", - "2 205.031480 0.000000 85.685065 85.685065 0.000000 0.000000 \n", - "3 253.027367 38.070193 90.169005 79.323353 13.541292 13.672709 \n", - "4 253.064867 50.816573 122.023014 105.155337 16.064363 16.040724 \n", - "5 237.717610 0.000000 98.760926 98.760926 0.000000 0.000000 \n", + " Pout Wind Speed DNI DHI GHI \\\n", + "0 91.802630 3.8 144 149 211 \n", + "1 123.721012 3.8 144 149 211 \n", + "2 85.625380 3.8 144 149 211 \n", + "3 90.307193 3.9 97 200 249 \n", + "4 121.970671 3.9 97 200 249 \n", + "5 98.778151 3.9 97 200 249 \n", "\n", - " Mismatch Pout Wind Speed DNI DHI GHI \n", - "0 0.028544 91.837406 3.8 144 149 211 \n", - "1 0.008745 123.706545 3.8 144 149 211 \n", - "2 0.000000 85.685065 3.8 144 149 211 \n", - "3 0.017078 90.153606 3.9 97 200 249 \n", - "4 0.007130 122.014314 3.9 97 200 249 \n", - "5 0.000000 98.760926 3.9 97 200 249 " + " module_CEC_name \n", + "0 SunPower SPR-E19-310-COM \n", + "1 Prism Solar Technologies Inc. BHC72-400 \n", + "2 Prism Solar Technologies Inc. BHC72-400 \n", + "3 SunPower SPR-E19-310-COM \n", + "4 Prism Solar Technologies Inc. BHC72-400 \n", + "5 Prism Solar Technologies Inc. BHC72-400 " ] }, "metadata": {}, diff --git a/docs/tutorials/21 - Weather to Module Performance.py b/docs/tutorials/21 - Weather to Module Performance.py index f2d663dd..29e76e64 100644 --- a/docs/tutorials/21 - Weather to Module Performance.py +++ b/docs/tutorials/21 - Weather to Module Performance.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # coding: utf-8 -# In[1]: +# In[2]: # This information helps with debugging and getting support :) @@ -20,7 +20,7 @@ # This tutorial shows how to use the new function on bifacial_radiance calculatePerformanceModule performance, as well as how to find CEC Module parameters. # -# In[2]: +# In[3]: import os @@ -36,7 +36,7 @@ print ("Your simulation will be stored in %s" % testfolder) -# In[3]: +# In[4]: import bifacial_radiance @@ -49,7 +49,7 @@ # ## Geting a CEC Module to pass into demo.makeModule -# In[4]: +# In[5]: url = 'https://raw.githubusercontent.com/NREL/SAM/patch/deploy/libraries/CEC%20Modules.csv' @@ -60,7 +60,7 @@ # # Make sure you select only 1 module from the database -- sometimes there are similar names. -# In[5]: +# In[6]: modfilter2 = db.index.str.startswith('SunPower') & db.index.str.endswith('SPR-E19-310-COM') @@ -75,7 +75,7 @@ -# In[6]: +# In[7]: # Selecting only two times as examples @@ -88,7 +88,7 @@ # The CEC data should be passed into the ModuleObj, either at time of creation, or sometime before it is passed into makeScene. -# In[7]: +# In[8]: mymodule = demo.makeModule(name='test-module', x=1, y=2, bifi=0.9, CECMod=CECMod) @@ -96,13 +96,13 @@ # The same data could instead be passed after the ModuleObj's definition, or at time of performance analysis: -# In[8]: +# In[9]: mymodule.addCEC(CECMod) -# In[9]: +# In[10]: # Let's make a second module, and set it to the default Prism Solar module type @@ -111,7 +111,7 @@ # We're going to set up two scenes, each with a different module type! -# In[10]: +# In[11]: sceneDict = {'tilt': 0, 'azimuth': 180, 'pitch': 5,'hub_height':1.5, 'nMods':5, 'nRows': 2} @@ -122,14 +122,14 @@ # Make a second scene with the other module type -# In[11]: +# In[12]: sceneDict2 = {'tilt': 0, 'azimuth': 180, 'pitch': 5,'hub_height':2.5, 'nMods':2, 'nRows': 1, 'originx': -15} trackerdict = demo.makeScene1axis(trackerdict, module = mymodule2, sceneDict=sceneDict2, append=True) -# In[12]: +# In[13]: # Compile both scenes into one octfile. Run 2 different analyses, one on each scene @@ -138,14 +138,14 @@ trackerdict = demo.analysis1axis(sensorsy=3, sceneNum=1) -# In[13]: +# In[14]: # Include an AgriPV groundscan too trackerdict = demo.analysis1axisground(sceneNum=1, sensorsground=10, customname='Silvanas_') -# In[14]: +# In[15]: # show the initial irradiance results before continuing: @@ -154,7 +154,7 @@ # ## Calculating the Performance and Exporting the Results to a CSV -# In[15]: +# In[16]: # Calculate performance.