Compare Curves#

compare_curves.py#

Measure the distance between fitted and known parameter sets.

usage: compare_curves.py [-h] [--test-sets TEST_SETS]
                         [--csv-output-path CSV_OUTPUT_PATH]
                         directory
directory#

Directory containing fitted parameter CSV files.

-h, --help#

show this help message and exit

--test-sets <test_sets>#

Comma-separated list of test sets to score.

--csv-output-path <csv_output_path>#

Directory where to write output CSV files.

_find_x_intersection(interval, func, point, atol)

Finds x-coordinate of the intersection between the known IV curve and the line segment from the origin to the given point.

_find_distance(x, y, xp, yp)

Calculates the distance between two points \((x, y)\) and \((x_p, y_p)\) using a scaled Euclidean distance.

score_curve(known_curve_params, ...)

Calculates the total score for a given fitted curve.

score_parameters(known_curve_params, ...)

Calculate score as a sum of absolute relative difference in each parameter

calc_precise_curve(curve_parameters, vth, ...)

Gets precise voltage and current pairs for the given curve.

_get_test_sets_to_score([tests, directory])

Returns a list of valid test set names (excluding file extensions).

write_test_set_score_per_curve_csvs(scores, ...)

Writes a CSV file containing a score for each test case in every test set.

write_overall_scores_csv(scores, csv_output_path)

Writes a CSV file containing overall scores for each test set.