-
Notifications
You must be signed in to change notification settings - Fork 1.1k
spectral_factor_firstsolar
: rename pw
to precipitable_water
#1768
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
Changes from 2 commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -239,8 +239,9 @@ def integrate(e): | |
return smm | ||
|
||
|
||
def spectral_factor_firstsolar(pw, airmass_absolute, module_type=None, | ||
coefficients=None, min_pw=0.1, max_pw=8): | ||
def spectral_factor_firstsolar(precipitable_water, airmass_absolute, | ||
module_type=None, coefficients=None, | ||
min_pw=0.1, max_pw=8): | ||
r""" | ||
Spectral mismatch modifier based on precipitable water and absolute | ||
(pressure-adjusted) airmass. | ||
|
@@ -277,21 +278,13 @@ def spectral_factor_firstsolar(pw, airmass_absolute, module_type=None, | |
|
||
Parameters | ||
---------- | ||
pw : array-like | ||
precipitable_water : numeric | ||
atmospheric precipitable water. [cm] | ||
|
||
airmass_absolute : array-like | ||
airmass_absolute : numeric | ||
absolute (pressure-adjusted) airmass. [unitless] | ||
|
||
min_pw : float, default 0.1 | ||
minimum atmospheric precipitable water. Any pw value lower than min_pw | ||
is set to min_pw to avoid model divergence. [cm] | ||
|
||
max_pw : float, default 8 | ||
maximum atmospheric precipitable water. Any pw value higher than max_pw | ||
is set to NaN to avoid model divergence. [cm] | ||
|
||
module_type : None or string, default None | ||
module_type : str, optional | ||
a string specifying a cell type. Values of 'cdte', 'monosi', 'xsi', | ||
'multisi', and 'polysi' (can be lower or upper case). If provided, | ||
module_type selects default coefficients for the following modules: | ||
|
@@ -307,7 +300,7 @@ def spectral_factor_firstsolar(pw, airmass_absolute, module_type=None, | |
Manufacturer 2 Model C from [3]_. The spectral response (SR) of CIGS | ||
and a-Si modules used to derive coefficients can be found in [4]_ | ||
|
||
coefficients : None or array-like, default None | ||
coefficients : array-like, optional | ||
Allows for entry of user-defined spectral correction | ||
coefficients. Coefficients must be of length 6. Derivation of | ||
coefficients requires use of SMARTS and PV module quantum | ||
|
@@ -317,6 +310,14 @@ def spectral_factor_firstsolar(pw, airmass_absolute, module_type=None, | |
modules with very similar quantum efficiency should be similar, | ||
in most cases limiting the need for module specific coefficients. | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When did we start leaving spaces between parameter descriptions? 😯 |
||
min_pw : float, default 0.1 | ||
minimum atmospheric precipitable water. Any pw value lower than min_pw | ||
is set to min_pw to avoid model divergence. [cm] | ||
|
||
max_pw : float, default 8 | ||
maximum atmospheric precipitable water. Any pw value higher than max_pw | ||
is set to NaN to avoid model divergence. [cm] | ||
|
||
Returns | ||
------- | ||
modifier: array-like | ||
AdamRJensen marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
@@ -347,7 +348,7 @@ def spectral_factor_firstsolar(pw, airmass_absolute, module_type=None, | |
# *** Pw *** | ||
# Replace Pw Values below 0.1 cm with 0.1 cm to prevent model from | ||
# diverging" | ||
pw = np.atleast_1d(pw) | ||
pw = np.atleast_1d(precipitable_water) | ||
pw = pw.astype('float64') | ||
if np.min(pw) < min_pw: | ||
pw = np.maximum(pw, min_pw) | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.