Skip to content

possible typo in modelchain.ModelChain input naming #2748

Open

Description

@ramaroesilva

Describe the bug
Was discussing modelchain.ModelChain with @cbcrespo and noticed that in the documentation of modelchain.ModelChain the input for defining the IAM model is named aoi_model. Find below the description:

aoi_model (str, or function, optional) – If not specified, the model will be inferred from the parameters that are common to all of system.arrays[i].module_parameters. Valid strings are ‘physical’, ‘ashrae’, ‘sapm’, ‘martin_ruiz’, ‘interp’ and ‘no_loss’. The ModelChain instance will be passed as the first argument to a user-defined function.

Expected behavior
Is this naming intended or should it be iam_model?

Activity

  1. kandersolar commented on May 5, 2026

    @kandersolar
    Member

    I doubt it's a typo (i.e. an accident), but it has irked me for years that it is not called iam_model. aoi_model goes all the way back to #194.

    Renaming would take some work, since presumably we would want to rename ModelChain.physical_aoi_loss and friends too. If we go that way, a deprecation period would be needed.

  2. cwhanse commented on May 5, 2026

    @cwhanse
    Member

    There was a time when both terms were heard, AOI and IAM model. I stopped paying attention so maybe one has emerged as consensus.

    I'm not opposed to renaming if it improves consistency.

  3. ramaroesilva commented on May 6, 2026

    @ramaroesilva
    ContributorAuthor

    @kandersolar, maybe this could fit within the GSoC activity to be developed by @cbcrespo (mentored by me and @AdamRJensen), which will demand some work in the modelchain workflow and is described in #2750. Would likely just have to manage the topics in a way that this deprecation period wouldn't stall the rest of the work

    @cwhanse now that you mention this, I remember that before using pvlib I wouldn't go for IAM (not sure what was my alternative). I've clearly been evangelized :-)

  4. echedey-ls commented on May 6, 2026

    @echedey-ls
    Member

    I agree, two terms for the same thing is a little confusing especially for newbies.
    @ramaroesilva , here is a PR I've opened that touches function and attributes renaming. It's kind of noisy but you can get an idea on how a deprecation is implemented in such cases.
    https://github.com/pvlib/pvlib-python/pull/2543/changes

  5. Mohamedhassan268 commented on Aug 8, 2026

    @Mohamedhassan268

    Hi all, I'd like to pick this up, but wanted to check first: is the aoi_model to iam_model rename (along with the related physical_aoi_loss-style attributes) being handled as part of the GSoC ModelChain IAM work in #2750? Or is it still open for someone else to take on in the meantime?

  6. kandersolar commented on Aug 10, 2026

    @kandersolar
    Member

    @Mohamedhassan268 unfortunately we do not have reviewer capacity to review PRs from contributors without relevant solar background. Thanks for your interest but please do not open a PR.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions