Skip to content

Add gallery example for modeling with interval averages #1152

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 8 commits into from
Apr 21, 2021

Conversation

kandersolar
Copy link
Member

@kandersolar kandersolar commented Jan 29, 2021

  • Closes #xxxx
  • I am familiar with the contributing guidelines
  • Tests added
  • Updates entries to docs/sphinx/source/api.rst for API changes.
  • Adds description and name entries in the appropriate "what's new" file in docs/sphinx/source/whatsnew for all changes. Includes link to the GitHub Issue with :issue:`num` or this Pull Request with :pull:`num`. Includes contributor name and/or GitHub username (link with :ghuser:`user`).
  • New code is fully documented. Includes numpydoc compliant docstrings, examples, and comments where necessary.
  • Pull request is nearly complete and ready for detailed review.
  • Maintainer: Appropriate GitHub Labels and Milestone are assigned to the Pull Request and linked Issue.

Following up on the discussion here: https://groups.google.com/g/pvlib-python/c/b4uMI3v3qOc

As always, editorial improvements are especially welcome!

Built version here: https://pvlib-python--1152.org.readthedocs.build/en/1152/auto_examples/plot_interval_transposition_error.html

@kandersolar kandersolar added this to the 0.9.0 milestone Jan 29, 2021
Copy link
Member

@wholmgren wholmgren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kanderso-nrel, I think this will be really helpful to a lot of users. Some suggestions below but I'm fine with leaving most edits for future work too.

# %%
# The differences shown above are the absolute difference in :math:`W/m^2`.
# In this example, using the timestamps unadjusted creates an error that
# increases with increasing interval length, up to a ~40% :math:`W/m^2` error
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going to comment that this error depends on time of day, but then I reread the code and saw that you're actually calculating the average error during daylight hours. Somehow need to make that more clear.

Could also consider restricting the analysis to a couple of times of day. Or add a plot of error as a function of time of day for different shifts (though this depends on the time of year and location...). Maybe this is getting out of scope, sorry.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a plot along these lines and some other clarifications -- let me know what you think

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@@ -0,0 +1,157 @@
"""
Modeling with interval averages
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

most, but not all, of the other examples are in Title Case. Fine to leave it as is and kick the standards down the road.

@wholmgren wholmgren merged commit 40ba4bd into pvlib:master Apr 21, 2021
@wholmgren
Copy link
Member

thanks @kanderso-nrel and sorry for the delayed merge

@kandersolar kandersolar deleted the halfshift_example branch April 21, 2021 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants