Precise#

precise.py#

Generates precise IV curve data from the parameters of the single diode equation.

usage: precise.py [-h] [--test-set TEST_SET_FILENAME] save_json_path
save_json_path#

Saves the test set JSON at the given path.

-h, --help#

show this help message and exit

--test-set <test_set_filename>#

Test set filename (excluding file extension) to generate curves for. If omitted, all test sets are used.

max_power_pt_finder(il, io, rs, rsh, n, vth, ...)

Calculates power at maximum power point.

golden_search(a, b, func, atol, max_iters)

Finds a local maximizer of a function on an interval \([a, b]\) with at most atol error using golden-section serach.

lambert_i_from_v(v, il, io, rs, rsh, n, vth, ns)

Given a voltage, calculates the associated current using the Lambert W function.

lambert_v_from_i(i, il, io, rs, rsh, n, vth, ns)

Given a current, calculates the associated voltage using the Lambert W function.

diff_lhs_rhs(v, i, il, io, rs, rsh, n, vth, ns)

Calculates the difference between the left hand side and right hand side of the single diode equation.

get_precise_i(il, io, rs, rsh, n, vth, ns, ...)

Calculates precise solutions to the single diode equation for the given parameters, with an error of at most atol.

build_precise_json(case_parameter_sets, vth, ...)

Builds a dict of precise IV curve solutions compliant with the IV Curve JSON schema.