new sensors fixed
I think
@@ -1151,7 +1151,7 @@ class RadianceObj:
# Update values for rotating system around torque tube.
if axisofrotationTorqueTube == True:
- modoffset = zgap + diam
+ modoffset = zgap + diam/2.0
tto = 0
if text is None:
@@ -1238,7 +1238,7 @@ class RadianceObj:
'y':y,
'scenex': x+xgap,
'sceney': y*Ny + ygap*(Ny-1),
- 'scenez': zgap+diam,
+ 'scenez': zgap+diam/2.0,
'numpanels':Ny,
'bifi':bifi,
'text':text,
@@ -2441,19 +2441,33 @@ class AnalysisObj:
sceney = moduleDict['sceney']
'''
+ if modWanted == 0 or rowWanted ==0:
+ print " FYI Modules and Rows start at index 1."
+
if modWanted is None:
modWanted = round(nMods / 2.0)
if rowWanted is None:
rowWanted = round(nRows / 2.0)
+ # Adjusting because modules and rows numbering starts at 0, not 1.
+
+
+ if modWanted > 0:
+ modWanted = modWanted - 1
+
+ if rowWanted > 0:
+ rowWanted = rowWanted - 1
+
+
if abs(np.tan(azimuth*dtor) ) <=1 or abs(np.tan(azimuth*dtor) ) > 1:
+ print "ModWanted, RowWanted ", modWanted, rowWanted, " out of ", nMods, nRows
- x0 = (modWanted-1.0)*scenex - ((nMods-1)*scenex/2.0)
- y0 = (rowWanted-1.0)*pitch - ((nRows-1)*pitch/2.0)
+ x0 = (modWanted)*scenex - ((nMods-1)*scenex/2.0)
+ y0 = (rowWanted)*pitch - ((nRows-1)*pitch/2.0)
- x1 = x0 * np.cos (azimuth*dtor) - y0 * np.cos(azimuth*dtor)
+ x1 = x0 * np.cos (azimuth*dtor) - y0 * np.sin(azimuth*dtor)
y1 = x0 * np.sin (azimuth*dtor) + y0 * np.cos(azimuth*dtor)
# Edge of Panel
@@ -2474,12 +2488,13 @@ class AnalysisObj:
xinc = (sceney/(sensorsy + 1.0)) * np.cos((tilt)*dtor) * np.sin((azimuth)*dtor)
- yinc = (sceney/(sensorsy + 1.0)) * np.cos((tilt)*dtor) * np.cos((azimuth)*dtor)
+ yinc = -(sceney/(sensorsy + 1.0)) * np.cos((tilt)*dtor) * np.cos((azimuth)*dtor)
zinc = (sceney/(sensorsy + 1.0)) * np.sin(tilt*dtor)
debug = True
if debug is True:
- print "Coordinate Center Point of Desired Panel after azm rotation", x0,y0
+ print "Azimuth", azimuth
+ print "Coordinate Center Point of Desired Panel before azm rotation", x0,y0
print "Coordinate Center Point of Desired Panel after azm rotation", x1,y1
print "Edge of Panel", x2, y2, z2
print "Offset Shift", x3, y3, z3
