Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Adds ability for soiling.Hsu to accept arbitrary time intervals (other than 1 hour) #980

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

Merged
merged 30 commits into from
Aug 28, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
c8c3758
bug fixes to hsu soiling function. Addresses (#970)
jsstein May 20, 2020
3a77400
Made changes to the soiling tests Addresses (#970)
jsstein Jun 9, 2020
bff444f
update what's new documentation
jsstein Jun 9, 2020
f412ddb
Fixed stickler-ci issues in test_soiling.py
jsstein Jun 11, 2020
db6bb16
Fixed errant character in test
jsstein Jun 11, 2020
13bf88f
allowed function to accept aribtrary time intervals
jsstein Jun 12, 2020
820b87c
updated v0.8.0.rst file
jsstein Jun 12, 2020
ffb3c35
Add variable time interval functionality and testing to soiling.hsu()…
jsstein Jun 17, 2020
5e5e360
fixed typo in test_soiling.py
jsstein Jun 17, 2020
bc73f51
fixed stickler-ci errors
jsstein Jun 17, 2020
617e445
fixed more formatting errors
jsstein Jun 17, 2020
875f298
more stickler-ci issues fixed
jsstein Jun 17, 2020
971cdcd
fixed formatting issues
jsstein Jun 18, 2020
254bffa
fixed more stickler-ci issues
jsstein Jun 18, 2020
5f83509
formatting issues
jsstein Jun 18, 2020
d25d6b2
formatting issues
jsstein Jun 18, 2020
551ab85
formatting...
jsstein Jun 18, 2020
400a992
formatting.....
jsstein Jun 18, 2020
f888276
changed variable time interval calculation in hsu model and test
jsstein Jun 19, 2020
0662215
formatting changes
jsstein Jun 19, 2020
6cd354e
formatting
jsstein Jun 19, 2020
9122281
formatting
jsstein Jun 19, 2020
b864eb9
formatting
jsstein Jun 19, 2020
020b7d2
whatsnew PR links
kandersolar Aug 27, 2020
a8aed01
remove needs_pandas_22 from test_soiling
kandersolar Aug 27, 2020
6445227
Merge remote-tracking branch 'upstream/master' into pr/980
kandersolar Aug 27, 2020
6cce797
move time interval note from bug fixes to enhancements
kandersolar Aug 27, 2020
89b0452
stickler
kandersolar Aug 27, 2020
fb3f71e
review improvements
kandersolar Aug 27, 2020
f1da82f
Merge remote-tracking branch 'upstream/master' into pr/980
kandersolar Aug 27, 2020
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
Prev Previous commit
Next Next commit
changed variable time interval calculation in hsu model and test
  • Loading branch information
jsstein committed Jun 19, 2020
commit f88827611bc13183d25775fe271bb2c88baa1789
8 changes: 4 additions & 4 deletions 8 pvlib/soiling.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ def hsu(rainfall, cleaning_threshold, tilt, pm2_5, pm10,
cleaning_times = accum_rain.index[accum_rain >= cleaning_threshold]

# determine the time intervals in seconds (dt_sec)
dt = rainfall.index.values # datetimes in nanoseconds
dt2 = np.roll(dt.copy(), 1) # shift array values by one place
dt = rainfall.index
dt2 = np.roll(dt.copy(),1)
# subtract shifted values from original and convert to seconds
dt3 = np.delete((dt-dt2)/1e9, 0)
dt3 = np.delete((dt-dt2),0).total_seconds()
# append last value to end so same number of elements in the array
dt_sec = np.append(dt3, dt3[-1]).astype('float64')
dt_sec = np.append(dt3[0], dt3).astype('float64')

horiz_mass_rate = (
pm2_5 * depo_veloc['2_5'] + np.maximum(pm10 - pm2_5, 0.)
Expand Down
8 changes: 4 additions & 4 deletions 8 pvlib/tests/test_soiling.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ def expected_output_3():
dt_new = dt + pd.to_timedelta(timedelta, 'm')
expected_output_3 = pd.Series(
data=[0.96576705, 0.9387675, 0.91437615, 0.89186852, 1.,
1., 0.95185738, 0.9387675, 1., 1.,
1., 1., 0.96576705, 0.92630786, 0.90291005,
0.88122293, 0.86104089, 1., 1., 1.,
0.96576705, 0.9387675, 0.91437615, 0.89186852],
1., 0.98093819, 0.9387675, 1., 1.,
1., 1., 0.96576705, 0.9387675 , 0.90291005,
0.88122293, 0.86104089, 1., 1., 1.,
0.96576705, 0.9387675, 0.91437615, 0.89186852],
index=dt_new)
return expected_output_3

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.