pvlib.solarposition.spa_python has unused and undocumented **kwargs
See original GitHub issuepvlib.solarposition.spa_python
has **kwargs
in the signature, but it doesn’t mention it in the docstring, and it doesn’t do anything with it in the function body.
This is bad because it silently ignores misspelled optional parameters, for example: pvlib.solarposition.spa_python(times, 40, -80, atlitude=100)
.
We could just deprecate and remove **kwargs
like #1053:
Or we could keep **kwargs
and pass them through to spa.solar_position()
, thereby exposing the sst
and esd
parameters. Though if we want to expose those, I’d prefer just exposing them directly instead of hiding them in **kwargs
.
This could be a good “easy first issue” once we decide what the fix should be.
Issue Analytics
- State:
- Created a year ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
pvlib.solarposition.spa_python
Calculate the solar position using a python implementation of the NREL SPA algorithm described in [1]. If numba is installed, the functions can...
Read more >pvlib.location — pvlib python 0.9.3 documentation
Location objects have two timezone attributes: * ``tz`` is a IANA timezone ... 12 kwargs passed to :py:func:`pvlib.solarposition.get_solarposition` Returns ...
Read more >pvlib.solarposition.get_solarposition
A convenience wrapper for the solar position calculators. ... If None, computed from pressure. Assumed to be 0 m if pressure is also...
Read more >Location. get_solarposition - pvlib python - Read the Docs
Uses the solarposition.get_solarposition() function to calculate the solar zenith, azimuth, etc. at this location. Parameters:.
Read more >Location. get_solarposition - pvlib python - Read the Docs
solarposition.get_solarposition() function to calculate the solar zenith, azimuth, etc. at this location. Parameters. times (pandas.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’d support removing without deprecation. Only impact on users will be to reveal bugs in their code.
I agree, no reason that any solar position function needs turbidity. What do you think about handling the
**kwargs
inpvlib.solarposition.get_solarposition
instead of in theLocation
methods?