-
Notifications
You must be signed in to change notification settings - Fork 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
Proposal: split up pvlib/ivtools/sdm.py
#2252
Comments
I love that idea.
|
Imagining myself as a user, it seems more natural to first look for a function that fit a specific model (e.g. CEC) and then filter by the kind of data available (IEC61853 or datasheet), which suggests |
I was imagining that the user experience would not change; all functions would still be accessed and documented via |
After more thought, I am warming to the idea of organizing by model. I will open a PR for consideration. |
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 inpvlib.spectrum
(#2125).Current and future functionality spans:
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
andfit_desoto_sandia
together, which is nice because they share a lot of code.Questions:
calcparams_XX
functions be moved topvlib.ivtools.sdm
?The text was updated successfully, but these errors were encountered: