ivcurves.plots.scoring_visualization#
- ivcurves.plots.scoring_visualization(test_set_filename, case_parameter_set_idx, iv_known, iv_fitted, vth, num_pts, atol, pts=None, plot_lines=True)#
Plots the fitted curve (green) and the known curve (cyan) to visualize how compare_curves scores the fitted parameter sets.
- Parameters:
test_set_filename (str) – The name of the test set CSV and JSON file. The filename must exclude its file extension.
case_parameter_set_idx (int) – The index of the case parameter set loaded from a CSV file named
test_set_filename
.iv_known (list) –
A list of parameters representing a given IV curve. Should be passed in the order [il, io, rs, rsh, n, ns].
- ilnumeric
Light-generated current \(I_L\) (photocurrent) [A]
- ionumeric
Diode saturation \(I_0\) current under desired IV curve conditions. [A]
- rsnumeric
Series resistance \(R_s\) under desired IV curve conditions. [ohm]
- rshnumeric
Shunt resistance \(R_{sh}\) under desired IV curve conditions. [ohm]
- nnumeric
Diode ideality factor \(n\)
- nsnumeric
Number of cells in series \(N_s\)
iv_fitted (list) –
A list of parameters representing a given IV curve. Should be passed in the order [il, io, rs, rsh, n, ns].
- ilnumeric
Light-generated current \(I_L\) (photocurrent) [A]
- ionumeric
Diode saturation \(I_0\) current under desired IV curve conditions. [A]
- rsnumeric
Series resistance \(R_s\) under desired IV curve conditions. [ohm]
- rshnumeric
Shunt resistance \(R_{sh}\) under desired IV curve conditions. [ohm]
- nnumeric
Diode ideality factor \(n\)
- nsnumeric
Number of cells in series \(N_s\)
vth (numeric) – Thermal voltage of the cell \(V_{th}\) [V] The thermal voltage of the cell (in volts) may be calculated as \(k_B T_c / q\), where \(k_B\) is Boltzmann’s constant (J/K), \(T_c\) is the temperature of the p-n junction in Kelvin, and \(q\) is the charge of an electron (coulombs).
- num_ptsint
Number of points to use when plotting curves.
- atolfloat
The error of each of the solution pairs found is at most
atol
. (Seeivcurves.precise.get_precise_i()
.) Each solution pair is a point on the curve.- ptslist, default []
A list of points on the fitted curve that will be plotted, along with their associated points on the known curve.
- plot_linesbool, default True
If true, the lines connecting the points on the fitted curve and the associated points on the known curve will be plotted.