@@ -746,18 +746,17 @@ def ashraeiam(aoi, b=0.05):
746
746
def physicaliam (aoi , n = 1.526 , K = 4. , L = 0.002 ):
747
747
'''
748
748
Determine the incidence angle modifier using refractive index,
749
- glazing thickness , and extinction coefficient
749
+ extinction coefficient , and glazing thickness.
750
750
751
751
physicaliam calculates the incidence angle modifier as described in
752
752
De Soto et al. "Improvement and validation of a model for
753
753
photovoltaic array performance", section 3. The calculation is based
754
- upon a physical model of absorbtion and transmission through a
755
- cover. Required information includes, incident angle, cover
756
- extinction coefficient, cover thickness
754
+ on a physical model of absorbtion and transmission through a
755
+ cover.
757
756
758
757
Note: The authors of this function believe that eqn. 14 in [1] is
759
758
incorrect. This function uses the following equation in its place:
760
- theta_r = arcsin(1/n * sin(theta ))
759
+ theta_r = arcsin(1/n * sin(aoi ))
761
760
762
761
Parameters
763
762
----------
@@ -788,14 +787,8 @@ def physicaliam(aoi, n=1.526, K=4., L=0.002):
788
787
789
788
Returns
790
789
-------
791
- IAM : numeric
792
- The incident angle modifier as specified in eqns. 14-16 of [1].
793
- IAM is a column vector with the same number of elements as the
794
- largest input vector.
795
-
796
- Theta must be a numeric scalar or vector. For any values of
797
- theta where abs(aoi)>90, IAM is set to 0. For any values of aoi
798
- where -90 < aoi < 0, theta is set to abs(aoi) and evaluated.
790
+ iam : numeric
791
+ The incident angle modifier
799
792
800
793
References
801
794
----------
@@ -816,6 +809,11 @@ def physicaliam(aoi, n=1.526, K=4., L=0.002):
816
809
'''
817
810
zeroang = 1e-06
818
811
812
+ # hold a new reference to the input aoi object since we're going to
813
+ # overwrite the aoi reference below, but we'll need it for the
814
+ # series check at the end of the function
815
+ aoi_input = aoi
816
+
819
817
aoi = np .where (aoi == 0 , zeroang , aoi )
820
818
821
819
# angle of reflection
@@ -849,8 +847,8 @@ def physicaliam(aoi, n=1.526, K=4., L=0.002):
849
847
# for light coming from behind the plane, none can enter the module
850
848
iam = np .where (aoi > 90 , 0 , iam )
851
849
852
- if isinstance (aoi , pd .Series ):
853
- iam = pd .Series (iam , index = aoi .index )
850
+ if isinstance (aoi_input , pd .Series ):
851
+ iam = pd .Series (iam , index = aoi_input .index )
854
852
855
853
return iam
856
854
0 commit comments