-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Adapts irradiance.isotropic to return_components framework. #2527
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
Open
ramaroesilva
wants to merge
6
commits into
pvlib:main
Choose a base branch
from
ramaroesilva:dhi-transp-comps
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+38
−7
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
07ae57e
Adapts irradiance.isotropic to return_components framework.
ramaroesilva a2916b3
Implements new strategy for output formatting.
ramaroesilva c633188
Adjusts flake8 formatting.
ramaroesilva 796ef8b
Minor change in docstring.
ramaroesilva b4f779a
Cleans dict create + forces output as dataframe.
ramaroesilva 6350b3c
Updates commits, further restructures isotropic.
ramaroesilva File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to return both
poa_sky_diffuseanddiffuse_components, ifreturn_componetsis True.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me. This "one or the other" is what is implemented in
perezat the moment.For clarity, do you mean returning two dictionaries, which makes the number of outputs depend on
return_components, or having still one dictionary buth with an additionalsky_diffusekey?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking a tuple with two dicts, when
return_componentsis True.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cwhanse I just noticed that in my latest commit I included in the
diffuse_componentsdict thesky_diffuseas one of the keys. Would this - having a single-dict with components and their sum - make sense?If instead we have two dictionaries as originally proposed, the one having the
sky_diffusewill have a single key... How would we call the variable and the key without being repetitive?total_diffuse["sky"]?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies, I misspoke. Return a tuple
(sky_diffuse, components)wheresky_diffuseis the currentnumeric(Series, array, float) andcomponentsis a dict.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Edited: returning a tuple requires the user to change from
to
I was (wrongly) thinking that only the first element of the tuple would be assigned to
sky_diffuse. Not thinking clearly.So now I'm not so sure that returning a tuple is a good idea. Still, it seems better than requiring the user to change to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for clarifying and thinking things through.
Going back to the start:
I just remembered that in my latest commit the
sky_diffuseis included withindiffuse_components, following the workflow used inperezandhaydavies. So what we are discussing here is in fact if we should change the current modus operandi of transposition models withreturn_components.While what you propose is v0.13.1-friendly for the models not yet returning
return_components, it would break previous code for those that already do. Having this said, I would suggest moving this specific topic to a separate issue and raise some discussion aiming for v0.14.What do you think? If agreed, can you can raise a new issue like @kandersolar did in #2529?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the irradiance component sets I looked at include both components and sums of components. I think the cleanest way would be (would have been) to include only the lowest level and leave the summation up to the user.