Skip to content

Add support for diffuse IAM in the Array and PVSystem classes - #2845

Open
cbcrespo wants to merge 34 commits into
pvlib:mainfrom
cbcrespo:array-iam
Open

Add support for diffuse IAM in the Array and PVSystem classes#2845
cbcrespo wants to merge 34 commits into
pvlib:mainfrom
cbcrespo:array-iam

Conversation

@cbcrespo

@cbcrespo cbcrespo commented Aug 14, 2026

Copy link
Copy Markdown
Contributor
  • Closes Support diffuse component-specific IAM in Array.get_iam() #2812
  • I am familiar with the contributing guidelines
  • I attest that all AI-generated material has been vetted for accuracy and is in compliance with the pvlib license
  • Tests added
  • Updates entries in docs/sphinx/source/reference 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 (including remote-data) and Milestone are assigned to the Pull Request and linked Issue.

This PR adds support for diffuse component-specific IAM in the Array and PVSystem classes, laying the groundwork for its later inclusion in the ModelChain class.

@adi-IL adi-IL left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Signature mismatch between PVSystem.get_iam_diffuse and Array.get_iam_diffuse:

PVSystem.get_iam_diffuse accepts **kwargs and forwards them to each array:

return tuple(array.get_iam_diffuse(tilt, iam_model=iam_model,
                                   marion_model=marion_model, **kwargs)
             for array, tilt in zip(self.arrays, surface_tilt))

However, Array.get_iam_diffuse does not accept **kwargs:

def get_iam_diffuse(self, surface_tilt, iam_model='marion_diffuse',
                    marion_model=None):

Passing any optional keyword arguments to PVSystem.get_iam_diffuse raises TypeError: Array.get_iam_diffuse() got an unexpected keyword argument. Array.get_iam_diffuse should accept **kwargs and forward them to the underlying IAM model function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support diffuse component-specific IAM in Array.get_iam()

3 participants