You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suggest the following steps to expose the first_solar_spectral_correction function to ModelChain:
Add a PVSystem.first_solar_spectral_correction(pw, airmass_absolute) method that wraps the atmosphere.first_solar_spectral_correction(pw, airmass_absolute, module_type=None, coefficients=None) function. This is straightforward except for deciding how to handle the keyword arguments. The Sandia module database has a Material key and the CEC database has a Technology key. These keys could be mapped to the allowed module_type arguments. I'm not sure what to do about the coefficients option. Perhaps direct users to put their custom coefficients in module_parameters['fs_spectral_coefficients']?
Implement the stub ModelChain.first_solar_spectral_loss method. Maybe something like:
I'm guessing that most users don't have PW in their weather dataframes, so this line is going to be a frequent source of errors. We might consider adding a try/except KeyError with a more helpful error message.
Improve ModelChain.infer_spectral_model. This probably amounts to setting mc._spectral_model = mc.first_solar_spectral_loss if a CEC module or a module_parameters['fs_spectral_coefficients'] key is detected on the PVSystem object.
Optional. Add a dewpoint temperature to precipitable water conversion to the ModelChain.prepare_inputs method.
Add tests.
Update documentation.
It's unfortunate that sapm_spectral_loss and first_solar_spectral_correction live in different modules. Fixing that could be step 0, or we could leave it alone.
I'm in no rush to implement this, but I'd help anyone with a pull request.
Uh oh!
There was an error while loading. Please reload this page.
I suggest the following steps to expose the
first_solar_spectral_correction
function toModelChain
:Add a
PVSystem.first_solar_spectral_correction(pw, airmass_absolute)
method that wraps theatmosphere.first_solar_spectral_correction(pw, airmass_absolute, module_type=None, coefficients=None)
function. This is straightforward except for deciding how to handle the keyword arguments. The Sandia module database has aMaterial
key and the CEC database has aTechnology
key. These keys could be mapped to the allowedmodule_type
arguments. I'm not sure what to do about thecoefficients
option. Perhaps direct users to put their custom coefficients inmodule_parameters['fs_spectral_coefficients']
?Implement the stub
ModelChain.first_solar_spectral_loss
method. Maybe something like:I'm guessing that most users don't have PW in their weather dataframes, so this line is going to be a frequent source of errors. We might consider adding a
try/except KeyError
with a more helpful error message.Improve
ModelChain.infer_spectral_model
. This probably amounts to settingmc._spectral_model = mc.first_solar_spectral_loss
if a CEC module or amodule_parameters['fs_spectral_coefficients']
key is detected on thePVSystem
object.Optional. Add a dewpoint temperature to precipitable water conversion to the
ModelChain.prepare_inputs
method.Add tests.
Update documentation.
It's unfortunate that
sapm_spectral_loss
andfirst_solar_spectral_correction
live in different modules. Fixing that could be step 0, or we could leave it alone.I'm in no rush to implement this, but I'd help anyone with a pull request.
see also #358
The text was updated successfully, but these errors were encountered: