You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
first_solar_spectral_correction deprecation points to a non-existent alternative #1810
This line points calls to pvlib.atmosphere.first_solar_spectral_correction to pvlib.spectrum.spectral_factor_firstsolar which doesn't exist. The deprecation should point to pvlib.spectrum.mismatch.spectral_factor_firstsolar
Activity
ai-naymul commentedon Jul 19, 2023
Hey I would like to work on this issue, may I?
cwhanse commentedon Jul 19, 2023
@ai-naymul yes, please!
kandersolar commentedon Jul 19, 2023
It's true that
spectral_factor_firstsolarlives inpvlib/spectrum/mismatch.py, but the spectrum__init__.pyfile imports it into thepvlib.spectrumnamespace: https://github.com/pvlib/pvlib-python/blob/main/pvlib/spectrum/__init__.py#L7So the function is indeed accessible with
pvlib.spectrum.spectral_factor_firstsolar:This is also the name that is used in the docs: https://pvlib-python.readthedocs.io/en/stable/reference/generated/pvlib.spectrum.spectral_factor_firstsolar.html
So I think it makes sense to leave the deprecation message as-is.
cwhanse commentedon Jul 19, 2023
OK, my mistake. I don't quite grok how that import works and couldn't find the function when I was looking for it.