We will create a new graph to plot all the results corresponding tot he calibration procedure. We start by creating a new line series corresponding to the results of the initial model set up.
Code Block |
---|
language | py |
---|
title | Create line series for initial results |
---|
|
lineFirstResults = CreateLineSeries(timeSeriesToCompare[1])
lineFirstResults.Title = "Initial model"
lineFirstResults.ShowInLegend = True
lineFirstResults.PointerVisible = False
lineFirstResults.Color = Color.LightGreen
series = [lineFirstResults] |
Next, we will add an additional line series for each of the combinations of the calibration parameters. All these curves will be in principle drawn with the same color since the goodness of the fit will be calculated quantitatively later on, and not qualitatively, based on this chart. This common color will be however different from the one previously used for the initial model set up. Remember that the first time series kept in timeSeriesToCompare (corresponding to index 0) is the one holding the measured data. And the second time series (index 1) corresponds to the initial model set up. The simulations corresponding to the calibration start at the third element (index 2) of timeSeriesToCompare.
Code Block |
---|
language | py |
---|
title | Add line series for all calibration cases |
---|
|
for timeseries in timeSeriesToCompare[2:]:
lineResults = CreateLineSeries(timeseries)
lineResults.ShowInLegend = False
lineResults.Color = Color.Orange
lineResults.PointerVisible = False
series.append(lineResults)
lineResults.ShowInLegend = True
lineResults.Title = "Calibration results" |
The last two lines in the code above add the very last calibration series to the legend of the chart, underv a generic name "Calibration results". The reason that this is done outside the loop is to avoid one entry in the legend for each calibration simulation.