Update bifacial_radiance.py
hpc is complaining about not knwoing the full path of the files (basically on makescene, the .rad full address). trying to add the path into it.
@@ -84,7 +84,7 @@ else: # module imported or loaded normally
from bifacial_radiance.load import loadTrackerDict
from time import sleep
-from pathlib import Path
+#from pathlib import Path
@@ -149,6 +149,10 @@ def _interactive_directory(title=None):
root.attributes("-topmost", True) #Bring to front
return filedialog.askdirectory(parent = root, title = title)
+def load_inputvariablesfile():
+
+ import input_bf
+
class RadianceObj:
@@ -1927,12 +1931,12 @@ class SceneObj:
if axis_tilt is not 0 and rad_azimuth == 90:
text += '-rx %s -t 0 0 %s ' %(axis_tilt, self.scenex*(round(nMods/2.0)*1.0-1)*np.sin(axis_tilt * np.pi/180) )
- text += os.path.join(testfolder, self.modulefile) #Hpc change
+ text += os.path.join(self.path, self.modulefile) #Hpc change
# save the .RAD file
#radfile = 'objects\\%s_%s_%s_%sx%s.rad'%(radname,height,pitch, nMods, nRows)
- radfile = os.path.join(testfolder,'objects','%s_%0.5s_%0.5s_%sx%s.rad'%(radname,height,pitch, nMods, nRows) ) # update in 0.2.3 to shorten radnames
+ radfile = os.path.join(self.path,'objects','%s_%0.5s_%0.5s_%sx%s.rad'%(radname,height,pitch, nMods, nRows) ) # update in 0.2.3 to shorten radnames
# py2 and 3 compatible: binary write, encode text first
@@ -2753,6 +2757,8 @@ if __name__ == "__main__":
# testfolder = _interactive_directory(title = 'Select or create an empty directory for the Radiance tree')
testfolder = r'C:\Users\sayala\Documents\RadianceScenes\Demo3'
demo = RadianceObj('simple_panel',path = testfolder) # Create a RadianceObj 'object'
+
+ '''
demo.setGround(0.62) # input albedo number or material name like 'concrete'. To see options, run this without any input.
try:
epwfile = demo.getEPW(37.5,-77.6) # pull TMY data for any global lat/lon
@@ -2796,3 +2802,4 @@ if __name__ == "__main__":
print('Annual RADIANCE bifacial ratio for 1-axis tracking: %0.3f' %(sum(demo.Wm2Back)/sum(demo.Wm2Front)) )
+'''
\ No newline at end of file
