Skip to content

Add a public constants module and include scipy as base requirement for pvlib #483

Closed
@markcampanelli

Description

@markcampanelli

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 make scipy an import requirement for the "base" installation of pvlib. (This would also remove a lot of the test decorations and import checks around scipy, and scipy.special.lambertw is already needed for pvsystem.v_from_i and pvsystem.i_from_v.) Simple tests should be written to catch and audit when constants have changed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions