Skip to content

Commit de8f2b0

Browse files
cwhansewholmgren
authored andcommitted
Create iam.py, consistent naming for IAM functions (#783)
* move iam functions to iam.py * move function tests to test_iam.py * adjust PVSystem methods, add deprecation for functions and PVSystem methods * adjust PVSystem tests, test for function deprecation * move sapm aoi function, adjust ModelChain methods * remove _ typo * lint fixes * move fixture to correct place * move sapm_module_params fixture to conftest.py * fix cut/paste errors * add missing keys to fixture, add missing text to pvsystem.sapm docstring * fix and update pvsystem.sapm tests * remove DataFrame test for sapm, lint fixes * implement PVSystem.get_iam, add deprecation test for pvsystem.sapm_aoi_loss * lint * test fixes, add Material to sapm_module_params fixture * test fixes * add martin_ruiz to modelchain * finish adding martin_ruiz to modelchain * add test for ModelChain.infer_aoi_model, improve coverage * repair delete mistake * test for invalid aoi model parameters in ModelChain * update api, whatsnew * test fix * fixture for aoi_model tests * bad indent * docstring and lint * lint * module docstring, changes to tests * test fixes * another test fix * improve coverage * fix exception test * fix the fix
1 parent f75a3a4 commit de8f2b0

File tree

9 files changed

+860
-656
lines changed

9 files changed

+860
-656
lines changed

docs/sphinx/source/api.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -211,15 +211,17 @@ wrap the functions listed below. See its documentation for details.
211211
pvsystem.PVSystem
212212
pvsystem.LocalizedPVSystem
213213

214-
AOI modifiers
215-
-------------
214+
Incident angle modifiers
215+
------------------------
216216

217217
.. autosummary::
218218
:toctree: generated/
219219

220-
pvsystem.physicaliam
221-
pvsystem.ashraeiam
222-
pvsystem.sapm_aoi_loss
220+
iam.physical
221+
iam.ashrae
222+
iam.martin_ruiz
223+
iam.sapm
224+
iam.interp
223225

224226
PV temperature models
225227
---------------------

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

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,20 @@ API Changes
6969
- `modelchain.basic_chain` has a new required argument
7070
`temperature_model_parameters`.
7171

72+
* Changes related to IAM (AOI loss) functions (:issue:`680`):
73+
* Changes to functions
74+
- Moved functions from `pvsystem.py` to `iam.py`. `pvsystem` IAM
75+
functions are deprecated and will be removed in v0.8.
76+
- Functions are renamed to a consistent pattern:
77+
- `pvsystem.physicaliam` is `iam.physical`
78+
- `pvsystem.ashraeiam` is `iam.ashrae`
79+
- `pvsystem.sapm_aoi_loss` is `iam.sapm`
80+
- Created dict `iam.IAM_MODEL_PARAMS` to aid in identifying IAM models
81+
* Changes to `PVSystem` class
82+
- IAM models are provided by `PVSystem.get_iam` with kwarg `iam_model`.
83+
- Methods `PVSystem.ashraeiam`, `PVSystem.physicaliam` and
84+
`PVSystem.sapm_aoi_loss` are deprecated and will be removed in v0.8.
85+
7286
* Calling :py:func:`pvlib.pvsystem.retrieve_sam` with no parameters will raise
7387
an exception instead of displaying a dialog.
7488
* The `times` keyword argument has been deprecated in the
@@ -83,8 +97,9 @@ API Changes
8397

8498
Enhancements
8599
~~~~~~~~~~~~
86-
* Created two new incidence angle modifier functions: :py:func:`pvlib.pvsystem.iam_martin_ruiz`
87-
and :py:func:`pvlib.pvsystem.iam_interp`. (:issue:`751`)
100+
* Created two new incidence angle modifier (IAM) functions:
101+
:py:func:`pvlib.iam.martin_ruiz` and :py:func:`pvlib.iam.interp`. (:issue:`751`)
102+
* Add the `martin_ruiz` IAM function as an option for `ModelChain.aoi_model`.
88103
* Updated the file for module parameters for the CEC model, from the SAM file
89104
dated 2017-6-5 to the SAM file dated 2019-03-05. (:issue:`761`)
90105
* Updated the file for inverter parameters for the CEC model, from the SAM file
@@ -96,6 +111,7 @@ Enhancements
96111
the single diode equation to an IV curve.
97112
* Add :py:func:`~pvlib.ivtools.fit_sdm_cec_sam`, a wrapper for the CEC single
98113
diode model fitting function '6parsolve' from NREL's System Advisor Model.
114+
* Add `timeout` to :py:func:`pvlib.iotools.get_psm3`.
99115

100116
Bug fixes
101117
~~~~~~~~~
@@ -113,6 +129,8 @@ Testing
113129
in NSRDB (:issue:`733`)
114130
* Added tests for methods in bifacial.py.
115131
* Added tests for changes to cell temperature models.
132+
* Added tests for changes to IAM models.
133+
* Added test for `ModelChain.infer_aoi_model`.
116134

117135
Documentation
118136
~~~~~~~~~~~~~
@@ -133,11 +151,6 @@ Removal of prior version deprecations
133151
* Removed `ModelChain.prepare_inputs` clearsky assumption when no irradiance
134152
data was provided.
135153

136-
Enhancements
137-
~~~~~~~~~~~~
138-
* Add `timeout` to :py:func:`pvlib.iotools.get_psm3`.
139-
140-
141154
Contributors
142155
~~~~~~~~~~~~
143156
* Mark Campanellli (:ghuser:`markcampanelli`)

0 commit comments

Comments
 (0)