Problem
Initial testing of the single-diode model fitting (diode_fit_resistances) in PR #10 showed significant numerical discrepancies:
- Synthetic Data: The optimizer landed exactly on the initial guess (Rs=20, Rsh=1e5), failing to converge to the known ground truth.
- Dark Scan Data: Disagreed with the
derivative_resistances method by 18x to 60x on the same curve.
Investigation Steps
-
Residual Scaling: Re-evaluate the
tanh soft-clipping and f_scale=1e-6 parameters in the least-squares call. They may be flattening the gradient too aggressively for low-signal curves.
-
Signal-to-Noise: Characterize the math against an Illuminated Sweep (Hal-320 solar sim). The current dark-scan testing ($J_{sc} \approx 0.056 , \text{mA/cm}^2$) may simply lack the signal strength required for a 5-parameter fit.
-
Provisional UI Flag: Until validated, the GUI should likely display these values with a "Provisional" or "Beta" label to prevent reliance on unverified data.
Problem
Initial testing of the single-diode model fitting (
diode_fit_resistances) in PR #10 showed significant numerical discrepancies:derivative_resistancesmethod by 18x to 60x on the same curve.Investigation Steps
tanhsoft-clipping andf_scale=1e-6parameters in the least-squares call. They may be flattening the gradient too aggressively for low-signal curves.