Skip to content

Fix cell type inference for First Solar thin-film modules (CdTe, not CIGS) - #2932

Closed
DresdenGman wants to merge 1 commit into
pvlib:mainfrom
DresdenGman:fix-1984-first-solar-cdte
Closed

DresdenGman wants to merge 1 commit into
pvlib:mainfrom
DresdenGman:fix-1984-first-solar-cdte

Conversation

@DresdenGman

@DresdenGman DresdenGman commented Nov 3, 2026 •

Copy link
Copy Markdown
  • Closes First Solar CEC modules are inferred to be CIGS instead of CdTe #1984
  • 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:1984 or this Pull Request with `:pull:`num. Includes contributor name and/or GitHub username (link with :ghuser:DresdenGman).
  • 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.

Fixes #1984.

Array._infer_cell_type maps Technology "Thin Film" to cigs, but First Solar's thin-film modules are CdTe. Of the 120 First Solar entries in the bundled CEC table, 70 are thin-film modules currently inferred as cigs, which also selects the wrong spectral correction parameters downstream.

The change: when the technology is "Thin Film" and the module name identifies the manufacturer as First Solar — a prefix match on the normalized name, checked on both Array.module and the module_parameters Series name, since the CEC table has no manufacturer field — the inferred type is cdte. A sweep over the bundled tables confirms the scope: exactly those 70 of 21,535 CEC modules change, none of the 523 Sandia modules change, and First Solar's TetraSun crystalline-silicon modules (Technology "Mono-c-Si") are unaffected.

Tests: parametrized cases for both name channels, negative cases for look-alike names, and an integration test using the bundled CEC entry from the issue. tests/test_pvsystem.py: 330 passed. tests/test_modelchain.py: 160 passed.

The CEC database lists First Solar modules as "Thin Film", which
Array._infer_cell_type maps to CIGS, so ModelChains using the
First Solar spectral correction model pick the wrong parameter set
for them.  Infer "Thin Film" modules as CdTe when the module name
identifies them as First Solar modules.

First Solar's crystalline silicon (TetraSun) modules are unaffected:
their "Mono-c-Si" technology still maps to monosi.
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Hey @DresdenGman! 🎉

Thanks for opening your first pull request! We appreciate your
contribution. Please ensure you have reviewed and understood the
contributing guidelines.

If AI is used for any portion of this PR, you must vet the content
for technical accuracy.

Finally, be sure the PR description includes the PR
checklist,
and complete the items you are able to.

@cwhanse

cwhanse commented Nov 3, 2026

Copy link
Copy Markdown
Member

This is the wrong path to fix the issue. pvlib has no control over the CEC module data file, so we should not rely on "First Solar" appearing in any field.

Thanks for the attempt. I'm closing this PR, discussion of the way forward should be in the Issue.

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.

First Solar CEC modules are inferred to be CIGS instead of CdTe

2 participants