Skip to content

Commit

Permalink
Clean up and add Github features (#9)
Browse files Browse the repository at this point in the history
* .gitattributes language override to make sure repo is Python

* Add build status badge to readme file

* Clean up horizon band shading commenting

* Adding documentation in gitattributes
  • Loading branch information
anomam authored Sep 3, 2018
1 parent 928a616 commit e366122
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 22 deletions.
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
pvfactors/_version.py export-subst

# mark iPython notebooks as Python files
*.ipynb linguist-language=Python

# documentation
pvfactors/docs/* linguist-documentation
notebooks/* linguist-documentation
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
pvfactors (open-source fork of vf_model)
========================================

[![CircleCI](https://circleci.com/gh/SunPower/pvfactors.svg?style=svg)](https://circleci.com/gh/SunPower/pvfactors)

pvfactors is a tool designed for PV professionals to calculate the
irradiance incident on surfaces of a photovoltaic array. It relies on the use of
2D geometries and view factors integrated mathematically into a linear system of
Expand Down
25 changes: 3 additions & 22 deletions pvfactors/pvarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,32 +347,13 @@ def update_irradiance_terms_perez(self, solar_zenith, solar_azimuth,
# TODO: poa_horizon should not be negative... but it can be in the Perez
# model from pvlib
poa_horizon = np.abs(poa_horizon)
# FIXME: poa_horizon should be different in front and back: this is
# what the code below was doing
# if self.pvrows[0].facing == 'left':
# self.surface_registry.loc[
# (self.surface_registry.pvrow_index == 0)
# & (self.surface_registry.surface_side == 'front'),
# 'irradiance_term'] += poa_horizon
# self.surface_registry.loc[
# (self.surface_registry.pvrow_index == self.n_pvrows - 1)
# & (self.surface_registry.surface_side == 'back'),
# 'irradiance_term'] += poa_horizon
# elif self.pvrows[0].facing == 'right':
# self.surface_registry.loc[
# (self.surface_registry.pvrow_index == self.n_pvrows - 1)
# & (self.surface_registry.surface_side == 'front'),
# 'irradiance_term'] += poa_horizon
# self.surface_registry.loc[
# (self.surface_registry.pvrow_index == 0)
# & (self.surface_registry.surface_side == 'back'),
# 'irradiance_term'] += poa_horizon

# TODO: test if should have poa_horizon on all pvrows at all times

# Add poa horizon contribution to all pvrow surfaces
self.surface_registry.loc[
(self.surface_registry.line_type == 'pvrow'),
'horizon_term'] += poa_horizon

# Apply horizon band shading for the pvrow back surfaces
self.apply_horizon_band_shading('back')

if aoi_frontsurface <= 90.:
Expand Down

0 comments on commit e366122

Please sign in to comment.