8000 Remove deprecated `pvsystem.sapm_spectral_loss` by RDaxini · Pull Request #2244 · pvlib/pvlib-python · GitHub
[go: up one dir, main page]

Skip to content

Remove deprecated pvsystem.sapm_spectral_loss #2244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 14, 2025
1 change: 0 additions & 1 deletion docs/sphinx/source/reference/pv_modeling/system_models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Sandia array performance model (SAPM)
pvsystem.sapm
pvsystem.sapm_effective_irradiance
pvsystem.sapm_spectral_loss
spectrum.spectral_factor_sapm
inverter.sandia
temperature.sapm_cell

Expand Down
2 changes: 1 addition & 1 deletion docs/sphinx/source/whatsnew/v0.10.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Deprecations
* Functions for calculating spectral modifiers have been moved to :py:mod:`pvlib.spectrum`:
:py:func:`!pvlib.atmosphere.first_solar_spectral_correction` is deprecated and
replaced by :py:func:`~pvlib 10000 .spectrum.spectral_factor_firstsolar`, and
:py:func:`pvlib.pvsystem.sapm_spectral_loss` is deprecated and replaced by
:py:func:`!pvlib.pvsystem.sapm_spectral_loss` is deprecated and replaced by
:py:func:`~pvlib.spectrum.spectral_factor_sapm`. (:pull:`1628`)
* Removed the ``get_ecmwf_macc`` and ``read_ecmwf_macc`` iotools functions as the
MACC dataset has been `removed by ECMWF <https://confluence.ecmwf.int/display/DAC/Decommissioning+of+ECMWF+Public+Datasets+Service>`_
Expand Down
2 changes: 2 additions & 0 deletions docs/sphinx/source/whatsnew/v0.11.3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Breaking Changes
* Users must now provide ModelChain.spectral_model, or the 'no_loss' spectral
model is assumed. pvlib.modelchain.ModelChain no longer attempts to infer
the spectral model from PVSystem attributes. (:issue:`2017`, :pull:`2253`)
* Remove deprecated :py:func:`!pvlib.pvsystem.sapm_spectral_loss`.
(:issue:`2243`, :pull:`2244`)
* :py:func:`~pvlib.iotools.read_tmy3` now defaults to ``map_variables=True``.
Additionally, the deprecated ``recolumn`` parameter is now removed. (:issue:`2324`, :pull:`2408`)
* Remove :py:func:`!pvlib.atmosphere.first_solar_spectral_correction`, deprecated in v0.10.0.
Expand Down
2 changes: 1 addition & 1 deletion docs/sphinx/source/whatsnew/v0.6.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Enhancements
* Use HRRR modeled surface temperature values instead of inferring from
isobaric values and modeled wind speed instead of inferring from gust.
(:issue:`604`)
* Change :py:func:`pvlib.pvsystem.sapm_spectral_loss` to avoid numpy warning.
* Change :py:func:`!pvlib.pvsystem.sapm_spectral_loss` to avoid numpy warning.
* Add warning message when :py:func:`pvlib.spa` is reloaded. (:issue:`401`)
* Add option for :py:func:`pvlib.irradiance.disc` to use relative airmass
by supplying `pressure=None`. (:issue:`449`)
Expand Down
6 changes: 0 additions & 6 deletions pvlib/pvsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -2314,12 +2314,6 @@ def sapm(effective_irradiance, temp_cell, module):
return out


sapm_spectral_loss = deprecated(
since='0.10.0',
alternative='pvlib.spectrum.spectral_factor_sapm'
)(spectrum.spectral_factor_sapm)


def sapm_effective_irradiance(poa_direct, poa_diffuse, airmass_absolute, aoi,
module):
r"""
Expand Down
6 changes: 0 additions & 6 deletions tests/test_pvsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,12 +234,6 @@ def test_PVSystem_multi_array_sapm(sapm_module_params):
system.sapm(500, temp_cell)


def test_sapm_spectral_loss_deprecated(sapm_module_params):
with pytest.warns(pvlibDeprecationWarning,
match='Use pvlib.spectrum.spectral_factor_sapm'):
pvsystem.sapm_spectral_loss(1, sapm_module_params)


def test_PVSystem_sapm_spectral_loss(sapm_module_params, mocker):
mocker.spy(spectrum, 'spectral_factor_sapm')
system = pvsystem.PVSystem(module_parameters=sapm_module_params)
Expand Down
0