diff --git a/docs/sphinx/source/reference/airmass_atmospheric.rst b/docs/sphinx/source/reference/airmass_atmospheric.rst index 2ece5cd5fb..be3f47b65d 100644 --- a/docs/sphinx/source/reference/airmass_atmospheric.rst +++ b/docs/sphinx/source/reference/airmass_atmospheric.rst @@ -14,7 +14,6 @@ Airmass and atmospheric models atmosphere.tdew_from_rh atmosphere.rh_from_tdew atmosphere.gueymard94_pw - atmosphere.first_solar_spectral_correction atmosphere.bird_hulstrom80_aod_bb atmosphere.kasten96_lt atmosphere.angstrom_aod_at_lambda diff --git a/docs/sphinx/source/whatsnew/v0.10.0.rst b/docs/sphinx/source/whatsnew/v0.10.0.rst index 7f86137407..7599eb0915 100644 --- a/docs/sphinx/source/whatsnew/v0.10.0.rst +++ b/docs/sphinx/source/whatsnew/v0.10.0.rst @@ -53,7 +53,7 @@ Deprecations deprecated. Use :py:func:`pvlib.pvsystem.v_from_i` and :py:func:`pvlib.pvsystem.i_from_v` instead. (:issue:`1626`, :pull:`1743`) * Functions for calculating spectral modifiers have been moved to :py:mod:`pvlib.spectrum`: - :py:func:`pvlib.atmosphere.first_solar_spectral_correction` is deprecated and + :py:func:`!pvlib.atmosphere.first_solar_spectral_correction` is deprecated and replaced by :py:func:`~pvlib.spectrum.spectral_factor_firstsolar`, and :py:func:`pvlib.pvsystem.sapm_spectral_loss` is deprecated and replaced by :py:func:`~pvlib.spectrum.spectral_factor_sapm`. (:pull:`1628`) diff --git a/docs/sphinx/source/whatsnew/v0.11.3.rst b/docs/sphinx/source/whatsnew/v0.11.3.rst index 62c7c29c57..d1fbf7f308 100644 --- a/docs/sphinx/source/whatsnew/v0.11.3.rst +++ b/docs/sphinx/source/whatsnew/v0.11.3.rst @@ -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 :py:func:`!pvlib.atmosphere.first_solar_spectral_correction`, deprecated in v0.10.0. + Use :py:func:`~pvlib.spectrum.spectral_factor_firstsolar` instead. (:issue:`2130`, :pull:`2131`) Bug fixes ~~~~~~~~~ diff --git a/docs/sphinx/source/whatsnew/v0.7.0.rst b/docs/sphinx/source/whatsnew/v0.7.0.rst index 751b00f180..011852e513 100644 --- a/docs/sphinx/source/whatsnew/v0.7.0.rst +++ b/docs/sphinx/source/whatsnew/v0.7.0.rst @@ -104,7 +104,7 @@ API Changes with Deprecations * Changes related to spectral modifier (:issue:`782`): * Changes to functions - Added the argument `pw_min` and `pw_max`, default values 0.1 and 8 resp., - to `atmosphere.first_solar_spectral_correction`. This function now returns NaN + to :py:func:`!pvlib.atmosphere.first_solar_spectral_correction`. This function now returns NaN if pw value higher than `pw_max`. * The `times` keyword argument has been deprecated in the :py:meth:`pvlib.modelchain.ModelChain.run_model`, diff --git a/pvlib/atmosphere.py b/pvlib/atmosphere.py index 4603fb7e11..8150abe405 100644 --- a/pvlib/atmosphere.py +++ b/pvlib/atmosphere.py @@ -6,9 +6,6 @@ import numpy as np import pandas as pd -import pvlib - -from pvlib._deprecation import deprecated APPARENT_ZENITH_MODELS = ('simple', 'kasten1966', 'kastenyoung1989', 'gueymard1993', 'pickering2002') @@ -416,12 +413,6 @@ def tdew_from_rh(temp_air, relative_humidity, coeff=(6.112, 17.62, 243.12)): return dewpoint -first_solar_spectral_correction = deprecated( - since='0.10.0', - alternative='pvlib.spectrum.spectral_factor_firstsolar' -)(pvlib.spectrum.spectral_factor_firstsolar) - - def bird_hulstrom80_aod_bb(aod380, aod500): """ Approximate broadband aerosol optical depth. diff --git a/tests/test_atmosphere.py b/tests/test_atmosphere.py index 2f0b5cadc2..7c3f56051c 100644 --- a/tests/test_atmosphere.py +++ b/tests/test_atmosphere.py @@ -9,8 +9,6 @@ from pvlib import atmosphere -from pvlib._deprecation import pvlibDeprecationWarning - def test_pres2alt(): out = atmosphere.pres2alt(np.array([10000, 90000, 101325])) @@ -235,12 +233,6 @@ def test_tdew_from_rh(): assert np.isclose(dewpoint_float, dewpoint.iloc[0]) -def test_first_solar_spectral_correction_deprecated(): - with pytest.warns(pvlibDeprecationWarning, - match='Use pvlib.spectrum.spectral_factor_firstsolar'): - atmosphere.first_solar_spectral_correction(1, 1, 'cdte') - - def test_kasten96_lt(): """Test Linke turbidity factor calculated from AOD, Pwat and AM""" amp = np.array([1, 3, 5])