-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add a public constants module and include scipy as base requirement for pvlib #483
Comments
Thanks for making this issue @thunderfish24 We can make a more informed decision if we have a list of constants that we use in pvlib (or are likely to use in the future) and a list of the functions that require scipy. What is the point of a I am not inclined to keep track of constants values in scipy. I think that is the user's job when deciding what version of scipy to install. Can anyone comment on easy of scipy installations on Windows and microcomputers in 2018? |
Wheels are available for Windows at the CheeseShop. I haven't installed them so perhaps I shouldn't comment. I hesitate to ask on the SciPy Dev mail list. But my guess is that most pvlib users are probably using Anaconda, and there's always Christoph Gohlke. |
Thanks @mikofski. I see the wheels are only ~30 MB, which is not so bad (and comparable to pvlib itself), so probably ok for microcomputers. My biggest concern is making sure that a new user that knows some kind of integrated scientific programming environment (matlab, mathematica, igor, idl, etc) but little python and command line can install pvlib with as little trouble as possible. What is the minimum version of scipy that we would require? This may also require bumping the minimum numpy and pandas versions. Bumping numpy to 1.10 would allow us to remove another test decorator. Which brings me to thinking about the python versions we test against (and thus semi-officially support), but that's probably best left for another issue. |
Here's the list of pvlib functions and what they use from scipy:
Here are the constants:
I'm guessing I'm missing something. Let me know and I'll add it to these lists so that they're all in one place. |
Keep in mind, the units on the Boltzmann constant are different : |
@wholmgren We might also consider these "default" values related to bandgaps: |
|
@mikofski i think you meant 1035. Yes, let's push discussion of a pvlib constants module to another release. |
Agree, CONSTANTS for v0.9 |
pvlib should have a public constants python module so that all the different models share the same constants and so that users can see what constants pvlib is using and match them if/when needed.
For example, the data values in a gold dataset for the single-diode model depend on the choice of constants, see this PR. Note that
scipy.constants
contains many useful physical constants traceable to CODATA, as well as temperature conversion functions and the like.We also have to make sure we distinguish between the same constant with different units, or agree to use only one version of each constant throughout the codebase.
I think we should wrap the
scipy.constants
and makescipy
an import requirement for the "base" installation of pvlib. (This would also remove a lot of the test decorations and import checks aroundscipy
, andscipy.special.lambertw
is already needed forpvsystem.v_from_i
andpvsystem.i_from_v
.) Simple tests should be written to catch and audit when constants have changed.The text was updated successfully, but these errors were encountered: