-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Milestone
Description
The type and shape of output from calcparams and singlediode functions have some oddities that make the output somewhat annoying and may pose a risk of code breaking if pandas/numpy broadcasting and/or typecasting change.
Observations:
- When
pvsystem.calcparams_functions have float inputs, some of the outputs are arrays. - When
pvsystem.calcparams_functions have Series input, not all output are Series, and some of the output Series inherits a name from the input Series. - When
pvsystem.singlediodehas length 1 irradiance and temperature, andivcurve_pnts=Nis specified, the returned arrays are shape (1, N), and so must be transposed to plot the I-V curve. - When
ivcurve_pnts=None(default)pvsystem.singlediodereturns a DataFrame. Whenivcurve_pntsis specified,pvsystem.singlediodereturns an OrderedDict. - When multiple IV curves are to be calculated with IV curve points, the IV curves are row-by-row, so must be transposed to be plotted.
To Reproduce
gist here
Expected behavior
- calcparams functions return floats when all inputs are floats
- when Series are returned, don't inherit name from input (e.g. 'temp_cell' for the saturation current)
- IV curve points should be transposed for convenient plotting
- Consider always returning a DataFrame from singlediode.
Versions:
pvlib.__version__: 0.9.4pandas.__version__: 1.2.4
Metadata
Metadata
Assignees
Labels
No labels