Skip to content

#142 __repr__ for tracking classes #175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pvlib/pvsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def __init__(self,

# needed for tying together Location and PVSystem in LocalizedPVSystem
super(PVSystem, self).__init__(**kwargs)

def get_aoi(self, solar_zenith, solar_azimuth):
"""Get the angle of incidence on the system.

Expand Down Expand Up @@ -400,7 +400,7 @@ def __init__(self, pvsystem=None, location=None, **kwargs):

# get and combine attributes from the pvsystem and/or location
# with the rest of the kwargs

if pvsystem is not None:
pv_dict = pvsystem.__dict__
else:
Expand Down
13 changes: 12 additions & 1 deletion pvlib/tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ def __init__(self, axis_tilt=0, axis_azimuth=0,
self.gcr = gcr

super(SingleAxisTracker, self).__init__(**kwargs)

def __repr__(self):
return ('SingleAxisTracker with max_angle: ' +
str(self.max_angle) )


def singleaxis(self, apparent_zenith, apparent_azimuth):
Expand Down Expand Up @@ -142,7 +146,9 @@ def __init__(self, pvsystem=None, location=None, **kwargs):

# get and combine attributes from the pvsystem and/or location
# with the rest of the kwargs


self.location = location

if pvsystem is not None:
pv_dict = pvsystem.__dict__
else:
Expand All @@ -158,6 +164,11 @@ def __init__(self, pvsystem=None, location=None, **kwargs):
list(kwargs.items()))

super(LocalizedSingleAxisTracker, self).__init__(**new_kwargs)

def __repr__(self):
return ('Localized' +
super(LocalizedSingleAxisTracker, self).__repr__()
+ ' at Location: ' + str(self.location))


def singleaxis(apparent_zenith, apparent_azimuth,
Expand Down