The best fit will be considered to be that one that gives the smallest deviation from the measured data. A loop over the previously created variable variable listCalibration will will provide this information. Previously, the variables indicating the different properties around the best fit will be initialized to values that will certainly will be overwritten.
Code Block | ||||
---|---|---|---|---|
| ||||
indexBestFit = -1 bcBestFit = 1e100 roughnessBestFit = 1e100 devBestFit = 1e100 for i in range(1,len(timeSeriesToCompare)-1): # case 0 is data so don't use it. case = listCalibration[i-1] if case[2] < devBestFit: indexBestFit = i bcBestFit = case[0] roughnessBestFit = case[1] devBestFit = case[2] |