Open
Description
pvlib/ivtools/sdm.py is currently rather lengthy at ~1350 lines of code. Near-term additions (#2212 and #2185) will bring it to ~2000. I suggest we split up sdm.py
into submodules, similar to what was recently done in pvlib.spectrum
(#2125).
Current and future functionality spans:
- estimating parameter values for various SDMs using various data sources
- converting parameter values from one SDM to another (WIP: Convert between CEC and PVsyst single diode models #2212)
- calculating derived values (PVsyst temp coeff)
- calculating SDE parameters (if we move the
calcparams_XX
functions here)
How should it be split up? As a starting point, one idea is to organize the parameter fitting functions according to the data source:
sdm/_fit_datasheet.py
:fit_cec_sam
,fit_desoto
sdm/_fit_ivcurves.py
:fit_pvsyst_sandia
,fit_desoto_sandia
sdm/_fit_iec61853
: Add method to fit PVsyst SDM to IEC 61853 data #2185sdm/_convert.py
: WIP: Convert between CEC and PVsyst single diode models #2212sdm/_misc.py
:pvsyst_temperature_coeff
This division has the advantage of keeping fit_pvsyst_sandia
and fit_desoto_sandia
together, which is nice because they share a lot of code.
Questions:
- Should the
calcparams_XX
functions be moved topvlib.ivtools.sdm
? - Does this division accommodate future functionality additions?
Metadata
Metadata
Assignees
Labels
No labels
Activity