Skip to content

Proposal: split up pvlib/ivtools/sdm.py #2252

@kandersolar

Description

@kandersolar

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:

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 to pvlib.ivtools.sdm?
  • Does this division accommodate future functionality additions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions