5
5
6
6
import numpy as np
7
7
import pandas as pd
8
+ from pandas .util .testing import assert_index_equal
8
9
9
10
from pvlib .tools import cosd , sind
10
11
@@ -51,7 +52,8 @@ def singleaxis(apparent_zenith, apparent_azimuth, latitude=1,
51
52
52
53
axis_azimuth : float
53
54
A value denoting the compass direction along which
54
- the axis of rotation lies, in decimal degrees.
55
+ the axis of rotation lies.
56
+ Measured in decimal degrees East of North.
55
57
56
58
max_angle : float
57
59
A value denoting the maximum rotation angle, in
@@ -99,7 +101,7 @@ def singleaxis(apparent_zenith, apparent_azimuth, latitude=1,
99
101
pvl_logger .debug ('tracking.singleaxis' )
100
102
101
103
# MATLAB to Python conversion by
102
- # Will Holmgren, U. Arizona, March, 2015. @wholmgren
104
+ # Will Holmgren (@wholmgren) , U. Arizona. March, 2015.
103
105
104
106
# Calculate sun position x, y, z using coordinate system as in [1], Eq 2.
105
107
@@ -117,6 +119,12 @@ def singleaxis(apparent_zenith, apparent_azimuth, latitude=1,
117
119
# Rotate sun azimuth to coordinate system as in [1]
118
120
# to calculate sun position.
119
121
122
+ try :
123
+ assert_index_equal (apparent_azimuth .index , apparent_zenith .index )
124
+ except AssertionError :
125
+ raise ValueError ('apparent_azimuth.index and ' +
126
+ 'apparent_zenith.index must match.' )
127
+
120
128
times = apparent_azimuth .index
121
129
122
130
az = apparent_azimuth - 180
0 commit comments