qpv-research-group / solcore5

A multi-scale, python-based library for the modelling of solar cells and semiconductor materials
https://www.solcore.solar/
Other
133 stars 77 forks source link

Refactor IV PDD code #240

Closed dalonsoa closed 1 year ago

dalonsoa commented 1 year ago

The iv_pdd function was a long and rather messy one. This PR breaks it down into smaller chunks that are easy to test and to understand, as well as adding thorough docstrings explaining what the function does.

This should be reviewed and merger after #239 , so only the actual modifications done appear in the diff.

codecov[bot] commented 1 year ago

Codecov Report

Merging #240 (0615110) into develop (de18f91) will increase coverage by 1.21%. The diff coverage is 91.30%.

@@             Coverage Diff             @@
##           develop     #240      +/-   ##
===========================================
+ Coverage    46.07%   47.28%   +1.21%     
===========================================
  Files           85       85              
  Lines         9133     9320     +187     
===========================================
+ Hits          4208     4407     +199     
+ Misses        4925     4913      -12     
Impacted Files Coverage Δ
solcore/solar_cell_solver.py 69.51% <25.00%> (-1.30%) :arrow_down:
...poisson_drift_diffusion/DriftDiffusionUtilities.py 91.59% <100.00%> (+5.42%) :arrow_up:
solcore/registries.py 97.14% <100.00%> (-2.86%) :arrow_down:
solcore/absorption_calculator/tmm_core_vec.py 100.00% <0.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more