diff --git a/bifacial_radiance/data/module.json b/bifacial_radiance/data/module.json index 9d10643e..f75b3954 100644 --- a/bifacial_radiance/data/module.json +++ b/bifacial_radiance/data/module.json @@ -1,4 +1,22 @@ { + "PVmod": { + "bifi": 1, + "glass": false, + "modulefile": "objects/PVmod.rad", + "modulematerial": "black", + "numpanels": 1, + "offsetfromaxis": 0, + "scenex": 2.01, + "sceney": 1.0, + "scenez": 0.1, + "text": "! genbox black PVmod 2 1 0.02 | xform -t -1.0 -0.5 0 -a 1 -t 0 1.0 0", + "x": 2, + "xgap": 0.01, + "y": 1, + "ygap": 0.0, + "z": 0.02, + "zgap": 0.1 + }, "PrismSolar-Bi60": { "bifi": 1, "cellModule": { diff --git a/bifacial_radiance/main.py b/bifacial_radiance/main.py index 346ff901..6e432ab5 100644 --- a/bifacial_radiance/main.py +++ b/bifacial_radiance/main.py @@ -3143,39 +3143,64 @@ def generate_spectral_tmys(self, wavelengths, weather_file, location_name, spect weather_file=weather_file, location_name=location_name, output_folder=output_folder) - def runViewFactor(self, sensorsy, key=None, tracking=None, backtrack=None, transFactor=None, limit_angle=None): + def runViewFactor(self, sensorsy, tracking=None, backtrack=None, transFactor=None, limit_angle=None): """ - Description + Convert RadianceObj parameters into inputs that can be passed in to the bifacialvf simulation. Parameters ------------ - variable : type + sensorsy : int + Variable descriptions, options, default value, etc. + if more than one line indented here. + tracking : boolean + Variable descriptions, options, default value, etc. + if more than one line indented here. + backtrack : boolean + Variable descriptions, options, default value, etc. + if more than one line indented here. + transFactor : float + Variable descriptions, options, default value, etc. + if more than one line indented here. + limit_angle : int Variable descriptions, options, default value, etc. if more than one line indented here. Returns ------- - No retyrn at the moment + No return at the moment """ import bifacialvf - TMYtoread=bifacialvf.getEPW(lat=self.metdata.latitude,lon=self.metdata.longitude) - myTMY3, meta = bifacialvf.readInputTMY(TMYtoread) + # TMYtoread=bifacialvf.getEPW(lat=self.metdata.latitude,lon=self.metdata.longitude) + # myTMY3, meta = bifacialvf.readInputTMY(TMYtoread) # TODO Sofia: Make a dataframe with #WeatherDF (pd.DataFrame): A pandas DataFrame containing for each timestep #columns: dni, dhi, it can also have Tdry, Wspd, zenith, azimuth, # And a dictionary with # meta (dict): A dictionary conatining keys: 'latitude', 'longitude', 'TZ', 'Name' - - myTMY3 = pd.DataFrame(data=zip(self.metdata.dni, self.metdata.dhi), colums=('dni', 'dhi', etc)) - - if self.metdata.windspeed is not None: - # check naming convention existing and expected - myTMY3['Wspd'] = self.metdata.windspeed - ## + myTMY3 = pd.DataFrame(data=zip(self.metdata.albedo, self.metdata.datetime, self.metdata.dewpoint, + self.metdata.dni, self.metdata.dhi, [self.metdata.elevation], self.metdata.ghi, + self.metdata.label, self.metdata.pressure, + self.metdata.solpos, self.metdata.sunrisesetdata, self.metdata.temp_air, + [self.metdata.timezone], self.metdata.wind_speed + ), columns=['albedo', 'city', 'datetime', 'dewpoint', 'dhi', 'dni', 'elevation', + 'ghi', 'label', 'pressure', 'solpos', + 'sunrisesetdata', 'temp_air', 'timezone', 'wind_speed']) + + # if self.metdata.windspeed is not None: + # # check naming convention existing and expected + # myTMY3['Wspd'] = self.metdata.windspeed + + ## + meta = { + 'latitude': self.metdata.latitude, + 'longitude': self.metdata.longitude, + 'Name': self.metdata.city, + 'TZ': self.metdata.timezone + } CW = self.module.sceney writefiletitle = self.name @@ -3186,16 +3211,28 @@ def runViewFactor(self, sensorsy, key=None, tracking=None, backtrack=None, trans sensorsy = sensorsy deltastyle = 'TMY3' - if key is not None: - tilt_norm = self.trackerdict[-0.0]['scene'].sceneDict['tilt'] / CW - sazm_norm = self.trackerdict[-0.0]['scene'].sceneDict['azimuth'] / CW - pitch_norm = self.trackerdict[-0.0]['scene'].sceneDict['pitch'] / CW - height_norm = self.trackerdict[-0.0]['scene'].sceneDict['clearance_height'] / CW + if self.trackerdictSim: + fookey = list(self.trackerdict.keys())[0] + if self.trackerdict[fookey]['scene'].sceneDict['fixed_tilt_angle'] is not None: + tilt_norm = self.trackerdict[fookey]['scene'].sceneDict['tilt'] / CW + sazm_norm = self.trackerdict[fookey]['scene'].sceneDict['azimuth'] / CW + pitch_norm = self.trackerdict[fookey]['scene'].sceneDict['pitch'] / CW + height_norm = self.trackerdict[fookey]['scene'].sceneDict['clearance_height'] / CW + else: + # how exactly should it be recalculated? + tilt_norm = self.trackerdict[fookey]['scene'].sceneDict['tilt'] / CW + sazm_norm = self.trackerdict[fookey]['scene'].sceneDict['azimuth'] / CW + pitch_norm = self.trackerdict[fookey]['scene'].sceneDict['pitch'] / CW + height_norm = self.trackerdict[fookey]['scene'].sceneDict['hub_height'] / CW else: - tilt_norm = self.scene.sceneDict['tilt'] / CW - sazm_norm = self.scene.sceneDict['azimuth'] / CW - pitch_norm = self.scene.sceneDict['pitch'] / CW - height_norm = self.scene.sceneDict['clearance_height'] / CW + if self.scene.sceneDict['fixed_tilt_angle'] is None: + tilt_norm = self.scene.sceneDict['tilt'] / CW + sazm_norm = self.scene.sceneDict['azimuth'] / CW + pitch_norm = self.scene.sceneDict['pitch'] / CW + height_norm = self.scene.sceneDict['clearance_height'] / CW + # else: + # Option A + # Option B if tracking is None: tracking=False @@ -5180,22 +5217,3 @@ def quickExample(testfolder=None): sum(analysis.Wm2Back) / sum(analysis.Wm2Front) ) ) return analysis - - -''' -GOAL:function that runs a view factor given a radiance object.​ - - First identifies all the variables from the radObj and translates them to bifacialVF inputs​ - - CW = radObj.sceney​ - - height_norm = radObj.scene[‘clearance_ehight’] / collectorwidth​ - - Pitch_norm…​ - - tilt, etc..​ - - And then runs bifacialvf.bifacialvf( pass all things here) ​ - - radObj.runViewFactor()​ -''' diff --git a/docs/development/bifacial_vf_test.ipynb b/docs/development/bifacial_vf_test.ipynb new file mode 100644 index 00000000..0e2d9a30 --- /dev/null +++ b/docs/development/bifacial_vf_test.ipynb @@ -0,0 +1,746 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "5e8ab57e", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Your simulation will be stored in Simulations/bifacial_vf\n" + ] + } + ], + "source": [ + "import os\n", + "from pathlib import Path\n", + "\n", + "testfolder = 'Simulations/bifacial_vf'\n", + "\n", + "if not os.path.exists(testfolder):\n", + " os.makedirs(testfolder)\n", + " \n", + "print (\"Your simulation will be stored in %s\" % testfolder)" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "ea7bf497", + "metadata": {}, + "outputs": [], + "source": [ + "import bifacial_radiance as br\n", + "import bifacialvf as bf\n", + "import numpy as np\n", + "import pandas as pd\n", + "import matplotlib.pyplot as plt" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "6cd9aac2", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Working on a Darwin 21.6.0\n", + "Python version 3.11.5 (main, Sep 11 2023, 08:19:27) [Clang 14.0.6 ]\n", + "Pandas version 2.0.3\n", + "bifacial_radiance version 0.4.2+238.g94bf539.dirty\n", + "pyplot 3.7.2\n", + "bifacialvf version 0.1.8.1\n" + ] + } + ], + "source": [ + "# This information helps with debugging and getting support :)\n", + "import sys, platform\n", + "print(\"Working on a \", platform.system(), platform.release())\n", + "print(\"Python version \", sys.version)\n", + "print(\"Pandas version \", pd.__version__)\n", + "print(\"bifacial_radiance version \", br.__version__)\n", + "print(\"pyplot \", plt.matplotlib.__version__)\n", + "print(\"bifacialvf version \", bf.__version__)" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "1a4ddbc7", + "metadata": {}, + "outputs": [], + "source": [ + "simulationname = 'bifacialvf_fixedtilt'\n", + "\n", + "# Location:\n", + "lat = 39.7555\n", + "lon = -105.2211\n", + "\n", + "# Scene Parameters:\n", + "azimuth_ang=90\n", + "tilt=10\n", + "\n", + "# MakeModule Parameters\n", + "moduletype='PVmod'\n", + "numpanels=1\n", + "module_x = 2 # m\n", + "module_y = 1 # m. slope we will measure\n", + "sensorsy=2\n", + "sensorsground=5\n", + "fixed_tilt_angle = None\n", + "\n", + "# SceneDict Parameters\n", + "pitch = 5.7\n", + "albedo = 0.2\n", + "azimuth = 180\n", + "clearance_height = 0.2\n", + "nMods = 20 \n", + "nRows = 3\n", + "fixed_tilt_angle = None\n", + "\n", + "sceneDict = {'tilt':tilt,'pitch':pitch,'clearance_height':clearance_height,'azimuth':azimuth, 'nMods': nMods, 'nRows': nRows, 'fixed_tilt_angle': fixed_tilt_angle} " + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "a3668517", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "path = Simulations/bifacial_vf\n", + "Loading albedo, 1 value(s), 0.200 avg\n", + "1 nonzero albedo values.\n", + "Getting weather file: USA_CO_Golden-NREL.724666_TMY3.epw\n", + " ... OK!\n" + ] + } + ], + "source": [ + "demo = br.RadianceObj(simulationname,path = testfolder)\n", + "demo.setGround(albedo)\n", + "epwfile = demo.getEPW(lat, lon)" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "85fb6790", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Module Name: PVmod\n", + "Module PVmod updated in module.json\n", + "Pre-existing .rad file objects/PVmod.rad will be overwritten\n", + "\n" + ] + } + ], + "source": [ + "module=demo.makeModule(name=moduletype,x=module_x,y=module_y)" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "1efff1b1", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'metdata': {}, 'data': {}, 'path': '/Users/storopov/Documents/bifacialvf-jn/Simulations/bifacial_vf', 'name': 'bifacialvf_fixedtilt', 'materialfiles': ['materials/ground.rad'], 'skyfiles': [], 'radfiles': [], 'octfile': [], 'Wm2Front': 0, 'Wm2Back': 0, 'backRatio': 0, 'hpc': False, 'CompiledResults': None, 'trackerdictSim': False, 'nowstr': '2024-01-18_114127', 'basename': 'bifacialvf_fixedtilt', 'columns': ['CompiledResults', 'Wm2Back', 'Wm2Front', 'backRatio', 'basename', 'data', 'hpc', 'materialfiles', 'metdata', 'name', 'nowstr', 'octfile', 'path', 'radfiles', 'skyfiles', 'trackerdictSim'], 'methods': ['NSRDBWeatherData', 'addMaterial', 'addPiles', 'analysis1axis', 'appendtoScene', 'calculateResults', 'exportTrackerDict', 'genCumSky', 'genCumSky1axis', 'gendaylit', 'gendaylit1axis', 'gendaylit2manual', 'generate_spectra', 'generate_spectral_tmys', 'getEPW', 'getSingleTimestampTrackerAngle', 'getfilelist', 'loadtrackerdict', 'makeCustomObject', 'makeModule', 'makeOct', 'makeOct1axis', 'makeScene', 'makeScene1axis', 'printModules', 'readSAM', 'readWeatherFile', 'returnMaterialFiles', 'returnOctFiles', 'runViewFactor', 'save', 'set1axis', 'setGround'], 'ground': {'normval': array([0.20068]), 'ReflAvg': array([0.2]), 'Rrefl': array([0.2]), 'Grefl': array([0.2]), 'Brefl': array([0.2]), 'ground_type': 'custom', 'material_file': 'ground.rad', 'columns': ['Brefl', 'Grefl', 'ReflAvg', 'Rrefl', 'ground_type', 'material_file', 'normval'], 'methods': ['printGroundMaterials']}, 'epwfile': 'EPWs/USA_CO_Golden-NREL.724666_TMY3.epw', 'module': {'x': 2, 'y': 1, 'z': 0.02, 'modulematerial': 'black', 'scenex': 2.01, 'sceney': 1.0, 'scenez': 0.1, 'numpanels': 1, 'bifi': 1, 'text': '! genbox black PVmod 2 1 0.02 | xform -t -1.0 -0.5 0 -a 1 -t 0 1.0 0', 'modulefile': 'objects/PVmod.rad', 'glass': False, 'offsetfromaxis': 0, 'xgap': 0.01, 'ygap': 0.0, 'zgap': 0.1}}" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "demo" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "612cd6a4", + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "8760 line in WeatherFile. Assuming this is a standard hourly WeatherFile for the year for purposes of saving Gencumulativesky temporary weather files in EPW folder.\n", + "Coercing year to 2021\n", + "Filtering dates\n", + "Saving file EPWs/metdata_temp.csv, # points: 8760\n", + "Calculating Sun position for Metdata that is right-labeled with a delta of -30 mins. i.e. 12 is 11:30 sunpos\n" + ] + } + ], + "source": [ + "#Valid options: mm_dd, mm_dd_HH, mm_dd_HHMM, YYYY-mm-dd_HHMM\n", + "metdata = demo.readWeatherFile(epwfile, coerce_year=2021, starttime='2021-06-21_12', endtime='2021-06-21_13')" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "5b77a8f9", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'latitude': 39.74, 'longitude': -105.18, 'elevation': 1829.0, 'timezone': -7.0, 'city': 'Denver Centennial Golden Nr', 'datetime': [Timestamp('2021-06-21 12:00:00-0700', tz='UTC-07:00'), Timestamp('2021-06-21 13:00:00-0700', tz='UTC-07:00')], 'ghi': array([961, 520]), 'dhi': array([158, 313]), 'dni': array([843, 217]), 'albedo': array([0.15, 0.15]), 'dewpoint': array([14.4, 13.3]), 'pressure': array([83500, 83500]), 'temp_air': array([26.1, 22.8]), 'wind_speed': array([ 7.7, 10.3]), 'meastracker_angle': None, 'solpos': apparent_zenith zenith apparent_elevation \\\n", + "corrected_timestamp \n", + "2021-06-21 11:30:00-07:00 17.699322 17.703619 72.300678 \n", + "2021-06-21 12:30:00-07:00 17.295897 17.300089 72.704103 \n", + "\n", + " elevation azimuth equation_of_time \n", + "corrected_timestamp \n", + "2021-06-21 11:30:00-07:00 72.296381 154.648377 -1.909200 \n", + "2021-06-21 12:30:00-07:00 72.699911 201.558385 -1.918194 , 'sunrisesetdata': sunrise \\\n", + "2021-06-21 12:00:00-07:00 2021-06-21 04:32:58.820602112-07:00 \n", + "2021-06-21 13:00:00-07:00 2021-06-21 04:32:58.820602112-07:00 \n", + "\n", + " sunset \\\n", + "2021-06-21 12:00:00-07:00 2021-06-21 19:32:04.802181888-07:00 \n", + "2021-06-21 13:00:00-07:00 2021-06-21 19:32:04.802181888-07:00 \n", + "\n", + " transit minutedelta \\\n", + "2021-06-21 12:00:00-07:00 2021-06-21 12:02:38.244584704-07:00 30 \n", + "2021-06-21 13:00:00-07:00 2021-06-21 12:02:38.244584704-07:00 30 \n", + "\n", + " corrected_timestamp \n", + "2021-06-21 12:00:00-07:00 2021-06-21 11:30:00-07:00 \n", + "2021-06-21 13:00:00-07:00 2021-06-21 12:30:00-07:00 , 'label': 'right', 'columns': ['albedo', 'city', 'datetime', 'dewpoint', 'dhi', 'dni', 'elevation', 'ghi', 'label', 'latitude', 'longitude', 'meastracker_angle', 'pressure', 'solpos', 'sunrisesetdata', 'temp_air', 'timezone', 'wind_speed']}" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "metdata" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "314937d1", + "metadata": { + "scrolled": true + }, + "outputs": [], + "source": [ + "scene = demo.makeScene(module,sceneDict)" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "e7c155bc", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'skies/sky2_39.74_-105.18_2021-06-21_1200.rad'" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "demo.gendaylit(timeindex=0) " + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "e6d55790", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Created bifacialvf_fixedtilt.oct\n" + ] + } + ], + "source": [ + "octfile = demo.makeOct()" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "921c6013", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'metdata': {'latitude': 39.74, 'longitude': -105.18, 'elevation': 1829.0, 'timezone': -7.0, 'city': 'Denver Centennial Golden Nr', 'datetime': [Timestamp('2021-06-21 12:00:00-0700', tz='UTC-07:00'), Timestamp('2021-06-21 13:00:00-0700', tz='UTC-07:00')], 'ghi': array([961, 520]), 'dhi': array([158, 313]), 'dni': array([843, 217]), 'albedo': array([0.15, 0.15]), 'dewpoint': array([14.4, 13.3]), 'pressure': array([83500, 83500]), 'temp_air': array([26.1, 22.8]), 'wind_speed': array([ 7.7, 10.3]), 'meastracker_angle': None, 'solpos': apparent_zenith zenith apparent_elevation \\\n", + " corrected_timestamp \n", + " 2021-06-21 11:30:00-07:00 17.699322 17.703619 72.300678 \n", + " 2021-06-21 12:30:00-07:00 17.295897 17.300089 72.704103 \n", + " \n", + " elevation azimuth equation_of_time \n", + " corrected_timestamp \n", + " 2021-06-21 11:30:00-07:00 72.296381 154.648377 -1.909200 \n", + " 2021-06-21 12:30:00-07:00 72.699911 201.558385 -1.918194 , 'sunrisesetdata': sunrise \\\n", + " 2021-06-21 12:00:00-07:00 2021-06-21 04:32:58.820602112-07:00 \n", + " 2021-06-21 13:00:00-07:00 2021-06-21 04:32:58.820602112-07:00 \n", + " \n", + " sunset \\\n", + " 2021-06-21 12:00:00-07:00 2021-06-21 19:32:04.802181888-07:00 \n", + " 2021-06-21 13:00:00-07:00 2021-06-21 19:32:04.802181888-07:00 \n", + " \n", + " transit minutedelta \\\n", + " 2021-06-21 12:00:00-07:00 2021-06-21 12:02:38.244584704-07:00 30 \n", + " 2021-06-21 13:00:00-07:00 2021-06-21 12:02:38.244584704-07:00 30 \n", + " \n", + " corrected_timestamp \n", + " 2021-06-21 12:00:00-07:00 2021-06-21 11:30:00-07:00 \n", + " 2021-06-21 13:00:00-07:00 2021-06-21 12:30:00-07:00 , 'label': 'right', 'columns': ['albedo', 'city', 'datetime', 'dewpoint', 'dhi', 'dni', 'elevation', 'ghi', 'label', 'latitude', 'longitude', 'meastracker_angle', 'pressure', 'solpos', 'sunrisesetdata', 'temp_air', 'timezone', 'wind_speed']},\n", + " 'data': {},\n", + " 'path': '/Users/storopov/Documents/bifacialvf-jn/Simulations/bifacial_vf',\n", + " 'name': 'bifacialvf_fixedtilt',\n", + " 'materialfiles': ['materials/ground.rad'],\n", + " 'skyfiles': ['skies/sky2_39.74_-105.18_2021-06-21_1200.rad'],\n", + " 'radfiles': ['objects/PVmod_C_0.20000_rtr_5.70000_tilt_10.00000_20modsx3rows_origin0,0.rad'],\n", + " 'octfile': 'bifacialvf_fixedtilt.oct',\n", + " 'Wm2Front': 0,\n", + " 'Wm2Back': 0,\n", + " 'backRatio': 0,\n", + " 'hpc': False,\n", + " 'CompiledResults': None,\n", + " 'trackerdictSim': False,\n", + " 'nowstr': '2024-01-18_114127',\n", + " 'basename': 'bifacialvf_fixedtilt',\n", + " 'columns': ['CompiledResults',\n", + " 'Wm2Back',\n", + " 'Wm2Front',\n", + " 'backRatio',\n", + " 'basename',\n", + " 'data',\n", + " 'hpc',\n", + " 'materialfiles',\n", + " 'metdata',\n", + " 'name',\n", + " 'nowstr',\n", + " 'octfile',\n", + " 'path',\n", + " 'radfiles',\n", + " 'skyfiles',\n", + " 'trackerdictSim'],\n", + " 'methods': ['NSRDBWeatherData',\n", + " 'addMaterial',\n", + " 'addPiles',\n", + " 'analysis1axis',\n", + " 'appendtoScene',\n", + " 'calculateResults',\n", + " 'exportTrackerDict',\n", + " 'genCumSky',\n", + " 'genCumSky1axis',\n", + " 'gendaylit',\n", + " 'gendaylit1axis',\n", + " 'gendaylit2manual',\n", + " 'generate_spectra',\n", + " 'generate_spectral_tmys',\n", + " 'getEPW',\n", + " 'getSingleTimestampTrackerAngle',\n", + " 'getfilelist',\n", + " 'loadtrackerdict',\n", + " 'makeCustomObject',\n", + " 'makeModule',\n", + " 'makeOct',\n", + " 'makeOct1axis',\n", + " 'makeScene',\n", + " 'makeScene1axis',\n", + " 'printModules',\n", + " 'readSAM',\n", + " 'readWeatherFile',\n", + " 'returnMaterialFiles',\n", + " 'returnOctFiles',\n", + " 'runViewFactor',\n", + " 'save',\n", + " 'set1axis',\n", + " 'setGround'],\n", + " 'ground': {'normval': array([0.20068]), 'ReflAvg': array([0.2]), 'Rrefl': array([0.2]), 'Grefl': array([0.2]), 'Brefl': array([0.2]), 'ground_type': 'custom', 'material_file': 'ground.rad', 'columns': ['Brefl', 'Grefl', 'ReflAvg', 'Rrefl', 'ground_type', 'material_file', 'normval'], 'methods': ['printGroundMaterials']},\n", + " 'epwfile': 'EPWs/USA_CO_Golden-NREL.724666_TMY3.epw',\n", + " 'module': {'x': 2, 'y': 1, 'z': 0.02, 'modulematerial': 'black', 'scenex': 2.01, 'sceney': 1.0, 'scenez': 0.1, 'numpanels': 1, 'bifi': 1, 'text': '! genbox black PVmod 2 1 0.02 | xform -t -1.0 -0.5 0 -a 1 -t 0 1.0 0', 'modulefile': 'objects/PVmod.rad', 'glass': False, 'offsetfromaxis': 0, 'xgap': 0.01, 'ygap': 0.0, 'zgap': 0.1},\n", + " 'gencumsky_metfile': 'EPWs/metdata_temp.csv',\n", + " 'scene': {'module': {'x': 2, 'y': 1, 'z': 0.02, 'modulematerial': 'black', 'scenex': 2.01, 'sceney': 1.0, 'scenez': 0.1, 'numpanels': 1, 'bifi': 1, 'text': '! genbox black PVmod 2 1 0.02 | xform -t -1.0 -0.5 0 -a 1 -t 0 1.0 0', 'modulefile': 'objects/PVmod.rad', 'glass': False, 'offsetfromaxis': 0, 'xgap': 0.01, 'ygap': 0.0, 'zgap': 0.1}, 'modulefile': 'objects/PVmod.rad', 'hpc': False, 'name': 'Scene0', 'gcr': 0.17543859649122806, 'text': '!xform -rx 10 -t 0 0 0.28682408883346516 -a 20 -t 2.01 0 0 -a 3 -t 0 5.7 0 -i 1 -t -18.089999999999996 -5.7 0 -rz 0 -t 0 0 0 objects/PVmod.rad', 'radfiles': 'objects/PVmod_C_0.20000_rtr_5.70000_tilt_10.00000_20modsx3rows_origin0,0.rad', 'sceneDict': {'tilt': 10, 'pitch': 5.7, 'clearance_height': 0.2, 'azimuth': 180, 'nMods': 20, 'nRows': 3, 'fixed_tilt_angle': None, 'axis_tilt': 0, 'originx': 0, 'originy': 0}}}" + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "demo.__dict__" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "813a1673", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'x': 2, 'y': 1, 'z': 0.02, 'modulematerial': 'black', 'scenex': 2.01, 'sceney': 1.0, 'scenez': 0.1, 'numpanels': 1, 'bifi': 1, 'text': '! genbox black PVmod 2 1 0.02 | xform -t -1.0 -0.5 0 -a 1 -t 0 1.0 0', 'modulefile': 'objects/PVmod.rad', 'glass': False, 'offsetfromaxis': 0, 'xgap': 0.01, 'ygap': 0.0, 'zgap': 0.1}" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "demo.module" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "807a73b8", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'module': {'x': 2, 'y': 1, 'z': 0.02, 'modulematerial': 'black', 'scenex': 2.01, 'sceney': 1.0, 'scenez': 0.1, 'numpanels': 1, 'bifi': 1, 'text': '! genbox black PVmod 2 1 0.02 | xform -t -1.0 -0.5 0 -a 1 -t 0 1.0 0', 'modulefile': 'objects/PVmod.rad', 'glass': False, 'offsetfromaxis': 0, 'xgap': 0.01, 'ygap': 0.0, 'zgap': 0.1},\n", + " 'modulefile': 'objects/PVmod.rad',\n", + " 'hpc': False,\n", + " 'name': 'Scene0',\n", + " 'gcr': 0.17543859649122806,\n", + " 'text': '!xform -rx 10 -t 0 0 0.28682408883346516 -a 20 -t 2.01 0 0 -a 3 -t 0 5.7 0 -i 1 -t -18.089999999999996 -5.7 0 -rz 0 -t 0 0 0 objects/PVmod.rad',\n", + " 'radfiles': 'objects/PVmod_C_0.20000_rtr_5.70000_tilt_10.00000_20modsx3rows_origin0,0.rad',\n", + " 'sceneDict': {'tilt': 10,\n", + " 'pitch': 5.7,\n", + " 'clearance_height': 0.2,\n", + " 'azimuth': 180,\n", + " 'nMods': 20,\n", + " 'nRows': 3,\n", + " 'fixed_tilt_angle': None,\n", + " 'axis_tilt': 0,\n", + " 'originx': 0,\n", + " 'originy': 0}}" + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "demo.scene.__dict__" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "id": "85e884fa", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "2" + ] + }, + "execution_count": 16, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "demo.scene.module.x" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "1e5e1000", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "10" + ] + }, + "execution_count": 17, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "demo.scene.sceneDict['tilt']" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "6ed460fa", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "-7.0" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "demo.metdata.timezone" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "id": "f53d52ca", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'metdata': {'latitude': 39.74, 'longitude': -105.18, 'elevation': 1829.0, 'timezone': -7.0, 'city': 'Denver Centennial Golden Nr', 'datetime': [Timestamp('2021-06-21 12:00:00-0700', tz='UTC-07:00'), Timestamp('2021-06-21 13:00:00-0700', tz='UTC-07:00')], 'ghi': array([961, 520]), 'dhi': array([158, 313]), 'dni': array([843, 217]), 'albedo': array([0.15, 0.15]), 'dewpoint': array([14.4, 13.3]), 'pressure': array([83500, 83500]), 'temp_air': array([26.1, 22.8]), 'wind_speed': array([ 7.7, 10.3]), 'meastracker_angle': None, 'solpos': apparent_zenith zenith apparent_elevation \\\n", + "corrected_timestamp \n", + "2021-06-21 11:30:00-07:00 17.699322 17.703619 72.300678 \n", + "2021-06-21 12:30:00-07:00 17.295897 17.300089 72.704103 \n", + "\n", + " elevation azimuth equation_of_time \n", + "corrected_timestamp \n", + "2021-06-21 11:30:00-07:00 72.296381 154.648377 -1.909200 \n", + "2021-06-21 12:30:00-07:00 72.699911 201.558385 -1.918194 , 'sunrisesetdata': sunrise \\\n", + "2021-06-21 12:00:00-07:00 2021-06-21 04:32:58.820602112-07:00 \n", + "2021-06-21 13:00:00-07:00 2021-06-21 04:32:58.820602112-07:00 \n", + "\n", + " sunset \\\n", + "2021-06-21 12:00:00-07:00 2021-06-21 19:32:04.802181888-07:00 \n", + "2021-06-21 13:00:00-07:00 2021-06-21 19:32:04.802181888-07:00 \n", + "\n", + " transit minutedelta \\\n", + "2021-06-21 12:00:00-07:00 2021-06-21 12:02:38.244584704-07:00 30 \n", + "2021-06-21 13:00:00-07:00 2021-06-21 12:02:38.244584704-07:00 30 \n", + "\n", + " corrected_timestamp \n", + "2021-06-21 12:00:00-07:00 2021-06-21 11:30:00-07:00 \n", + "2021-06-21 13:00:00-07:00 2021-06-21 12:30:00-07:00 , 'label': 'right', 'columns': ['albedo', 'city', 'datetime', 'dewpoint', 'dhi', 'dni', 'elevation', 'ghi', 'label', 'latitude', 'longitude', 'meastracker_angle', 'pressure', 'solpos', 'sunrisesetdata', 'temp_air', 'timezone', 'wind_speed']}, 'data': {}, 'path': '/Users/storopov/Documents/bifacialvf-jn/Simulations/bifacial_vf', 'name': 'bifacialvf_fixedtilt', 'materialfiles': ['materials/ground.rad'], 'skyfiles': ['skies/sky2_39.74_-105.18_2021-06-21_1200.rad'], 'radfiles': ['objects/PVmod_C_0.20000_rtr_5.70000_tilt_10.00000_20modsx3rows_origin0,0.rad'], 'octfile': 'bifacialvf_fixedtilt.oct', 'Wm2Front': 0, 'Wm2Back': 0, 'backRatio': 0, 'hpc': False, 'CompiledResults': None, 'trackerdictSim': False, 'nowstr': '2024-01-18_114127', 'basename': 'bifacialvf_fixedtilt', 'columns': ['CompiledResults', 'Wm2Back', 'Wm2Front', 'backRatio', 'basename', 'data', 'hpc', 'materialfiles', 'metdata', 'name', 'nowstr', 'octfile', 'path', 'radfiles', 'skyfiles', 'trackerdictSim'], 'methods': ['NSRDBWeatherData', 'addMaterial', 'addPiles', 'analysis1axis', 'appendtoScene', 'calculateResults', 'exportTrackerDict', 'genCumSky', 'genCumSky1axis', 'gendaylit', 'gendaylit1axis', 'gendaylit2manual', 'generate_spectra', 'generate_spectral_tmys', 'getEPW', 'getSingleTimestampTrackerAngle', 'getfilelist', 'loadtrackerdict', 'makeCustomObject', 'makeModule', 'makeOct', 'makeOct1axis', 'makeScene', 'makeScene1axis', 'printModules', 'readSAM', 'readWeatherFile', 'returnMaterialFiles', 'returnOctFiles', 'runViewFactor', 'save', 'set1axis', 'setGround'], 'ground': {'normval': array([0.20068]), 'ReflAvg': array([0.2]), 'Rrefl': array([0.2]), 'Grefl': array([0.2]), 'Brefl': array([0.2]), 'ground_type': 'custom', 'material_file': 'ground.rad', 'columns': ['Brefl', 'Grefl', 'ReflAvg', 'Rrefl', 'ground_type', 'material_file', 'normval'], 'methods': ['printGroundMaterials']}, 'epwfile': 'EPWs/USA_CO_Golden-NREL.724666_TMY3.epw', 'module': {'x': 2, 'y': 1, 'z': 0.02, 'modulematerial': 'black', 'scenex': 2.01, 'sceney': 1.0, 'scenez': 0.1, 'numpanels': 1, 'bifi': 1, 'text': '! genbox black PVmod 2 1 0.02 | xform -t -1.0 -0.5 0 -a 1 -t 0 1.0 0', 'modulefile': 'objects/PVmod.rad', 'glass': False, 'offsetfromaxis': 0, 'xgap': 0.01, 'ygap': 0.0, 'zgap': 0.1}, 'gencumsky_metfile': 'EPWs/metdata_temp.csv', 'scene': {'module': {'x': 2, 'y': 1, 'z': 0.02, 'modulematerial': 'black', 'scenex': 2.01, 'sceney': 1.0, 'scenez': 0.1, 'numpanels': 1, 'bifi': 1, 'text': '! genbox black PVmod 2 1 0.02 | xform -t -1.0 -0.5 0 -a 1 -t 0 1.0 0', 'modulefile': 'objects/PVmod.rad', 'glass': False, 'offsetfromaxis': 0, 'xgap': 0.01, 'ygap': 0.0, 'zgap': 0.1}, 'modulefile': 'objects/PVmod.rad', 'hpc': False, 'name': 'Scene0', 'gcr': 0.17543859649122806, 'text': '!xform -rx 10 -t 0 0 0.28682408883346516 -a 20 -t 2.01 0 0 -a 3 -t 0 5.7 0 -i 1 -t -18.089999999999996 -5.7 0 -rz 0 -t 0 0 0 objects/PVmod.rad', 'radfiles': 'objects/PVmod_C_0.20000_rtr_5.70000_tilt_10.00000_20modsx3rows_origin0,0.rad', 'sceneDict': {'tilt': 10, 'pitch': 5.7, 'clearance_height': 0.2, 'azimuth': 180, 'nMods': 20, 'nRows': 3, 'fixed_tilt_angle': None, 'axis_tilt': 0, 'originx': 0, 'originy': 0}}}" + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "demo" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "id": "b2fefe62", + "metadata": {}, + "outputs": [], + "source": [ + "myTMY3 = pd.DataFrame(data=zip(demo.metdata.albedo, demo.metdata.city, demo.metdata.datetime, demo.metdata.dewpoint, \n", + " demo.metdata.dni, demo.metdata.dhi, [demo.metdata.elevation], demo.metdata.ghi,\n", + " demo.metdata.label, demo.metdata.pressure,\n", + " demo.metdata.solpos, demo.metdata.sunrisesetdata, demo.metdata.temp_air,\n", + " [demo.metdata.timezone], demo.metdata.wind_speed\n", + " ), columns=['albedo', 'city', 'datetime', 'dewpoint', 'dhi', 'dni', 'elevation', \n", + " 'ghi', 'label', 'pressure', 'solpos', \n", + " 'sunrisesetdata', 'temp_air', 'timezone', 'wind_speed'])" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "id": "06e4fe2f", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
albedocitydatetimedewpointdhidnielevationghilabelpressuresolpossunrisesetdatatemp_airtimezonewind_speed
00.15D2021-06-21 12:00:00-07:0014.48431581829.0961r83500apparent_zenithsunrise26.1-7.07.7
\n", + "
" + ], + "text/plain": [ + " albedo city datetime dewpoint dhi dni elevation ghi \\\n", + "0 0.15 D 2021-06-21 12:00:00-07:00 14.4 843 158 1829.0 961 \n", + "\n", + " label pressure solpos sunrisesetdata temp_air timezone \\\n", + "0 r 83500 apparent_zenith sunrise 26.1 -7.0 \n", + "\n", + " wind_speed \n", + "0 7.7 " + ] + }, + "execution_count": 27, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "myTMY3" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "id": "3f17ccfd", + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "ename": "IndexError", + "evalue": "index 1 is out of bounds for axis 0 with size 1", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mIndexError\u001b[0m Traceback (most recent call last)", + "File \u001b[0;32m~/anaconda3/lib/python3.11/site-packages/pandas/core/indexes/range.py:912\u001b[0m, in \u001b[0;36mRangeIndex.__getitem__\u001b[0;34m(self, key)\u001b[0m\n\u001b[1;32m 911\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m--> 912\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_range[new_key]\n\u001b[1;32m 913\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mIndexError\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m err:\n", + "\u001b[0;31mIndexError\u001b[0m: range object index out of range", + "\nThe above exception was the direct cause of the following exception:\n", + "\u001b[0;31mIndexError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[20], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m vf \u001b[38;5;241m=\u001b[39m demo\u001b[38;5;241m.\u001b[39mrunViewFactor(sensorsy\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m4\u001b[39m)\n", + "File \u001b[0;32m~/Documents/GitHub/bifacial_radiance/bifacial_radiance/main.py:3249\u001b[0m, in \u001b[0;36mRadianceObj.runViewFactor\u001b[0;34m(self, sensorsy, tracking, backtrack, transFactor, limit_angle)\u001b[0m\n\u001b[1;32m 3246\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m transFactor \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m 3247\u001b[0m transFactor \u001b[38;5;241m=\u001b[39m \u001b[38;5;241m1\u001b[39m \u001b[38;5;241m-\u001b[39m (\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mmodule\u001b[38;5;241m.\u001b[39mx \u001b[38;5;241m*\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mmodule\u001b[38;5;241m.\u001b[39my \u001b[38;5;241m-\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mmodule\u001b[38;5;241m.\u001b[39mygap)\u001b[38;5;241m/\u001b[39m(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mmodule\u001b[38;5;241m.\u001b[39mscenex \u001b[38;5;241m*\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mmodule\u001b[38;5;241m.\u001b[39msceney)\n\u001b[0;32m-> 3249\u001b[0m bifacialvf\u001b[38;5;241m.\u001b[39msimulate(myTMY3, meta, writefiletitle\u001b[38;5;241m=\u001b[39mwritefiletitle, \n\u001b[1;32m 3250\u001b[0m tilt\u001b[38;5;241m=\u001b[39mtilt_norm, sazm\u001b[38;5;241m=\u001b[39msazm_norm, pitch\u001b[38;5;241m=\u001b[39mpitch_norm, clearance_height\u001b[38;5;241m=\u001b[39mheight_norm, \n\u001b[1;32m 3251\u001b[0m rowType\u001b[38;5;241m=\u001b[39mrowType, transFactor\u001b[38;5;241m=\u001b[39mtransFactor, sensorsy\u001b[38;5;241m=\u001b[39msensorsy, \n\u001b[1;32m 3252\u001b[0m PVfrontSurface\u001b[38;5;241m=\u001b[39mPVfrontSurface, PVbackSurface\u001b[38;5;241m=\u001b[39mPVbackSurface, \n\u001b[1;32m 3253\u001b[0m albedo\u001b[38;5;241m=\u001b[39malbedo_norm, tracking\u001b[38;5;241m=\u001b[39mtracking, backtrack\u001b[38;5;241m=\u001b[39mbacktrack, \n\u001b[1;32m 3254\u001b[0m limit_angle\u001b[38;5;241m=\u001b[39mlimit_angle, deltastyle\u001b[38;5;241m=\u001b[39mdeltastyle)\n\u001b[1;32m 3256\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m\n", + "File \u001b[0;32m~/Documents/GitHub/bifacialvf/bifacialvf/bifacialvf.py:309\u001b[0m, in \u001b[0;36msimulate\u001b[0;34m(myTMY3, meta, writefiletitle, tilt, sazm, clearance_height, hub_height, pitch, rowType, transFactor, sensorsy, PVfrontSurface, PVbackSurface, albedo, tracking, backtrack, limit_angle, calculatePVMismatch, cellsnum, portraitorlandscape, bififactor, calculateBilInterpol, BilInterpolParams, deltastyle, agriPV)\u001b[0m\n\u001b[1;32m 306\u001b[0m name \u001b[38;5;241m=\u001b[39m meta[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mcity\u001b[39m\u001b[38;5;124m'\u001b[39m] \u001b[38;5;66;03m#EPW\u001b[39;00m\n\u001b[1;32m 308\u001b[0m \u001b[38;5;66;03m## infer the data frequency in minutes\u001b[39;00m\n\u001b[0;32m--> 309\u001b[0m dataInterval \u001b[38;5;241m=\u001b[39m (myTMY3\u001b[38;5;241m.\u001b[39mindex[\u001b[38;5;241m1\u001b[39m]\u001b[38;5;241m-\u001b[39mmyTMY3\u001b[38;5;241m.\u001b[39mindex[\u001b[38;5;241m0\u001b[39m])\u001b[38;5;241m.\u001b[39mtotal_seconds()\u001b[38;5;241m/\u001b[39m\u001b[38;5;241m60\u001b[39m\n\u001b[1;32m 311\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m ((\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mazimuth\u001b[39m\u001b[38;5;124m'\u001b[39m \u001b[38;5;129;01min\u001b[39;00m myTMY3) \u001b[38;5;129;01mand\u001b[39;00m (\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mzenith\u001b[39m\u001b[38;5;124m'\u001b[39m \u001b[38;5;129;01min\u001b[39;00m myTMY3) \u001b[38;5;129;01mand\u001b[39;00m (\u001b[38;5;124m'\u001b[39m\u001b[38;5;124melevation\u001b[39m\u001b[38;5;124m'\u001b[39m \u001b[38;5;129;01min\u001b[39;00m myTMY3)):\n\u001b[1;32m 312\u001b[0m solpos, sunup \u001b[38;5;241m=\u001b[39m sunrisecorrectedsunposition(myTMY3, meta, deltastyle \u001b[38;5;241m=\u001b[39m deltastyle)\n", + "File \u001b[0;32m~/anaconda3/lib/python3.11/site-packages/pandas/core/indexes/range.py:914\u001b[0m, in \u001b[0;36mRangeIndex.__getitem__\u001b[0;34m(self, key)\u001b[0m\n\u001b[1;32m 912\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_range[new_key]\n\u001b[1;32m 913\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mIndexError\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m err:\n\u001b[0;32m--> 914\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mIndexError\u001b[39;00m(\n\u001b[1;32m 915\u001b[0m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mindex \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mkey\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m is out of bounds for axis 0 with size \u001b[39m\u001b[38;5;132;01m{\u001b[39;00m\u001b[38;5;28mlen\u001b[39m(\u001b[38;5;28mself\u001b[39m)\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 916\u001b[0m ) \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01merr\u001b[39;00m\n\u001b[1;32m 917\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m is_scalar(key):\n\u001b[1;32m 918\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mIndexError\u001b[39;00m(\n\u001b[1;32m 919\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124monly integers, slices (`:`), \u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 920\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mellipsis (`...`), numpy.newaxis (`None`) \u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 921\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mand integer or boolean \u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 922\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124marrays are valid indices\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 923\u001b[0m )\n", + "\u001b[0;31mIndexError\u001b[0m: index 1 is out of bounds for axis 0 with size 1" + ] + } + ], + "source": [ + "vf = demo.runViewFactor(sensorsy=4)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "677789f7", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c9ccba37", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.5" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +}