Skip to content

Commit

Permalink
GetSingleTimestampTrackerAngle
Browse files Browse the repository at this point in the history
Updated to actually use "self.metdata" by default. Updated all tutorials to either specify no metdata or explicity pass it as a parameter. (Tutorials 4, 14, 17). No change to pytest as it already used explicit parameters and compatible is with the change.
  • Loading branch information
mcbrown042 committed Aug 8, 2022
1 parent 29a47a1 commit af3fa09
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 39 deletions.
10 changes: 6 additions & 4 deletions bifacial_radiance/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1280,7 +1280,7 @@ def _readSOLARGIS(self, filename=None, label='center'):
return data, metadata


def getSingleTimestampTrackerAngle(self, metdata, timeindex, gcr=None,
def getSingleTimestampTrackerAngle(self, timeindex, metdata=None, gcr=None,
azimuth=180, axis_tilt=0,
limit_angle=45, backtrack=True):
"""
Expand All @@ -1291,12 +1291,12 @@ def getSingleTimestampTrackerAngle(self, metdata, timeindex, gcr=None,
Parameters
----------
timeindex : int
Index between 0 to ~4000 indicating hour to simulate.
metdata : :py:class:`~bifacial_radiance.MetObj`
Meterological object to set up geometry. Usually set automatically by
`bifacial_radiance` after running :py:class:`bifacial_radiance.readepw`.
Default = self.metdata
timeindex : int
Index between 0 to 8760 indicating hour to simulate.
gcr : float
Ground coverage ratio for calculation backtracking. Defualt [1.0/3.0]
azimuth : float or int
Expand All @@ -1318,7 +1318,9 @@ def getSingleTimestampTrackerAngle(self, metdata, timeindex, gcr=None,
'''

import pvlib


if not metdata:
metdata = self.metdata
solpos = metdata.solpos.iloc[timeindex]
sunzen = float(solpos.apparent_zenith)
sunaz = float(solpos.azimuth) # not substracting the 180
Expand Down

0 comments on commit af3fa09

Please sign in to comment.