88from pvlib .location import Location
99from pvlib import irradiance , atmosphere
1010
11- import logging
12- pvl_logger = logging .getLogger ('pvlib' )
13-
1411
1512class SingleAxisTracker (PVSystem ):
1613 """
@@ -307,15 +304,6 @@ def singleaxis(apparent_zenith, apparent_azimuth,
307304 Photovoltaics: Research and Applications, v. 19, pp. 747-753.
308305 """
309306
310- pvl_logger .debug ('tracking.singleaxis' )
311-
312- pvl_logger .debug ('axis_tilt=%s, axis_azimuth=%s, max_angle=%s, '
313- 'backtrack=%s, gcr=%.3f' ,
314- axis_tilt , axis_azimuth , max_angle , backtrack , gcr )
315-
316- pvl_logger .debug ('\n apparent_zenith=\n %s\n apparent_azimuth=\n %s' ,
317- apparent_zenith .head (), apparent_azimuth .head ())
318-
319307 # MATLAB to Python conversion by
320308 # Will Holmgren (@wholmgren), U. Arizona. March, 2015.
321309
@@ -354,7 +342,6 @@ def singleaxis(apparent_zenith, apparent_azimuth,
354342 # wholmgren: strange to see axis_azimuth calculated differently from az,
355343 # (not that it matters, or at least it shouldn't...).
356344 axis_azimuth_south = axis_azimuth - 180
357- pvl_logger .debug ('axis_azimuth_south=%s' , axis_azimuth_south )
358345
359346 # translate input array tilt angle axis_tilt to [1] coordinate system.
360347
@@ -418,7 +405,6 @@ def singleaxis(apparent_zenith, apparent_azimuth,
418405 # Account for backtracking; modified from [1] to account for rotation
419406 # angle convention being used here.
420407 if backtrack :
421- pvl_logger .debug ('applying backtracking' )
422408 axes_distance = 1 / gcr
423409 temp = np .minimum (axes_distance * cosd (wid ), 1 )
424410
@@ -431,7 +417,6 @@ def singleaxis(apparent_zenith, apparent_azimuth,
431417 widc [~ v ] = wid [~ v ] - wc [~ v ] # Eq 4 applied when wid in QI
432418 widc [v ] = wid [v ] + wc [v ] # Eq 4 applied when wid in QIV
433419 else :
434- pvl_logger .debug ('no backtracking' )
435420 widc = wid
436421
437422 tracker_theta = widc .copy ()
@@ -469,34 +454,27 @@ def singleaxis(apparent_zenith, apparent_azimuth,
469454 rot_x = np .array ([[1 , 0 , 0 ],
470455 [0 , cosd (- axis_tilt ), - sind (- axis_tilt )],
471456 [0 , sind (- axis_tilt ), cosd (- axis_tilt )]])
472- pvl_logger .debug ('rot_x=\n %s' , rot_x )
473457
474458 # panel_norm_earth contains the normal vector
475459 # expressed in earth-surface coordinates
476460 # (z normal to surface, y aligned with tracker axis parallel to earth)
477461 panel_norm_earth = np .dot (rot_x , panel_norm ).T
478- pvl_logger .debug ('panel_norm_earth=%s' , panel_norm_earth )
479462
480463 # projection to plane tangent to earth surface,
481464 # in earth surface coordinates
482465 projected_normal = np .array ([panel_norm_earth [:, 0 ],
483466 panel_norm_earth [:, 1 ],
484467 panel_norm_earth [:, 2 ]* 0 ]).T
485- pvl_logger .debug ('projected_normal=%s' , projected_normal )
486468
487469 # calculate vector magnitudes
488470 panel_norm_earth_mag = np .sqrt (np .nansum (panel_norm_earth ** 2 , axis = 1 ))
489471 projected_normal_mag = np .sqrt (np .nansum (projected_normal ** 2 , axis = 1 ))
490- pvl_logger .debug ('panel_norm_earth_mag=%s, projected_normal_mag=%s' ,
491- panel_norm_earth_mag , projected_normal_mag )
492472
493473 # renormalize the projected vector
494474 # avoid creating nan values.
495475 non_zeros = projected_normal_mag != 0
496476 projected_normal [non_zeros ] = (projected_normal [non_zeros ].T /
497477 projected_normal_mag [non_zeros ]).T
498- pvl_logger .debug ('renormalized projected_normal=%s' ,
499- projected_normal )
500478
501479 # calculation of surface_azimuth
502480 # 1. Find the angle.
0 commit comments