Skip to content

Commit ae7de97

Browse files
authored
[MAINT]: Remove deprecated pvlib.atmosphere.first_solar_spectral_correction (#2131)
* Remove `pvlib.atmosphere.first_solar_spectral_correction` * Remove unneeded imports * re-do deletion * remove links to reference * Update v0.11.3.rst
1 parent 40a213b commit ae7de97

File tree

6 files changed

+4
-20
lines changed

6 files changed

+4
-20
lines changed

docs/sphinx/source/reference/airmass_atmospheric.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ Airmass and atmospheric models
1414
atmosphere.tdew_from_rh
1515
atmosphere.rh_from_tdew
1616
atmosphere.gueymard94_pw
17-
atmosphere.first_solar_spectral_correction
1817
atmosphere.bird_hulstrom80_aod_bb
1918
atmosphere.kasten96_lt
2019
atmosphere.angstrom_aod_at_lambda

docs/sphinx/source/whatsnew/v0.10.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Deprecations
5353
deprecated. Use :py:func:`pvlib.pvsystem.v_from_i` and
5454
:py:func:`pvlib.pvsystem.i_from_v` instead. (:issue:`1626`, :pull:`1743`)
5555
* Functions for calculating spectral modifiers have been moved to :py:mod:`pvlib.spectrum`:
56-
:py:func:`pvlib.atmosphere.first_solar_spectral_correction` is deprecated and
56+
:py:func:`!pvlib.atmosphere.first_solar_spectral_correction` is deprecated and
5757
replaced by :py:func:`~pvlib.spectrum.spectral_factor_firstsolar`, and
5858
:py:func:`pvlib.pvsystem.sapm_spectral_loss` is deprecated and replaced by
5959
:py:func:`~pvlib.spectrum.spectral_factor_sapm`. (:pull:`1628`)

docs/sphinx/source/whatsnew/v0.11.3.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Breaking Changes
1212
* Users must now provide ModelChain.spectral_model, or the 'no_loss' spectral
1313
model is assumed. pvlib.modelchain.ModelChain no longer attempts to infer
1414
the spectral model from PVSystem attributes. (:issue:`2017`, :pull:`2253`)
15+
* Remove :py:func:`!pvlib.atmosphere.first_solar_spectral_correction`, deprecated in v0.10.0.
16+
Use :py:func:`~pvlib.spectrum.spectral_factor_firstsolar` instead. (:issue:`2130`, :pull:`2131`)
1517

1618
Bug fixes
1719
~~~~~~~~~

docs/sphinx/source/whatsnew/v0.7.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ API Changes with Deprecations
104104
* Changes related to spectral modifier (:issue:`782`):
105105
* Changes to functions
106106
- Added the argument `pw_min` and `pw_max`, default values 0.1 and 8 resp.,
107-
to `atmosphere.first_solar_spectral_correction`. This function now returns NaN
107+
to :py:func:`!pvlib.atmosphere.first_solar_spectral_correction`. This function now returns NaN
108108
if pw value higher than `pw_max`.
109109
* The `times` keyword argument has been deprecated in the
110110
:py:meth:`pvlib.modelchain.ModelChain.run_model`,

pvlib/atmosphere.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66

77
import numpy as np
88
import pandas as pd
9-
import pvlib
10-
11-
from pvlib._deprecation import deprecated
129

1310
APPARENT_ZENITH_MODELS = ('simple', 'kasten1966', 'kastenyoung1989',
1411
'gueymard1993', 'pickering2002')
@@ -416,12 +413,6 @@ def tdew_from_rh(temp_air, relative_humidity, coeff=(6.112, 17.62, 243.12)):
416413
return dewpoint
417414

418415

419-
first_solar_spectral_correction = deprecated(
420-
since='0.10.0',
421-
alternative='pvlib.spectrum.spectral_factor_firstsolar'
422-
)(pvlib.spectrum.spectral_factor_firstsolar)
423-
424-
425416
def bird_hulstrom80_aod_bb(aod380, aod500):
426417
"""
427418
Approximate broadband aerosol optical depth.

tests/test_atmosphere.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99

1010
from pvlib import atmosphere
1111

12-
from pvlib._deprecation import pvlibDeprecationWarning
13-
1412

1513
def test_pres2alt():
1614
out = atmosphere.pres2alt(np.array([10000, 90000, 101325]))
@@ -235,12 +233,6 @@ def test_tdew_from_rh():
235233
assert np.isclose(dewpoint_float, dewpoint.iloc[0])
236234

237235

238-
def test_first_solar_spectral_correction_deprecated():
239-
with pytest.warns(pvlibDeprecationWarning,
240-
match='Use pvlib.spectrum.spectral_factor_firstsolar'):
241-
atmosphere.first_solar_spectral_correction(1, 1, 'cdte')
242-
243-
244236
def test_kasten96_lt():
245237
"""Test Linke turbidity factor calculated from AOD, Pwat and AM"""
246238
amp = np.array([1, 3, 5])

0 commit comments

Comments
 (0)