Skip to content

PVSPEC model coefficients for First Solar modules use wrong keys #2398

Open
@sophie-pelland

Description

Describe the bug
The function pvlib.spectrum.mismatch.spectral_factor_pvspec has a dictionary of coefficients. These have incorrect keys for the two types of First Solar modules. module types for these are 'fs4-1' and 'fs4-2', but the coefficients have keys 'fs-2' and 'fs-4', which should be 'fs4-2' and 'fs4-1', respectively.

To Reproduce
Steps to reproduce the behavior:

  1. Try running:
    test=pvlib.spectrum.mismatch.spectral_factor_pvspec(airmass_absolute = 1.5, clearsky_index = 1, module_type='fs4-1')
    or
    test=pvlib.spectrum.mismatch.spectral_factor_pvspec(airmass_absolute = 1.5, clearsky_index = 1, module_type='fs4-2')

In both cases you should get an error. For example:
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\spelland.venv\spectral_env\Lib\site-packages\pvlib\spectrum\mismatch.py", line 585, in spectral_factor_pvspec
coefficients = _coefficients[module_type.lower()]
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'fs4-1'

  1. If you run with one of the other module types, there should be no error. e.g: test_that_works =pvlib.spectrum.mismatch.spectral_factor_pvspec(airmass_absolute = 1.5, clearsky_index = 1, module_type='monosi')

Activity

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

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions