Mueller matrix

Mueller matrix fit to a SiO2 on Si measurement.

import elli
from elli.fitting import ParamsHist, fit_mueller_matrix

Read data

We load the data from an ascii file containing each of the mueller matrix elements. The wavelength range is cut to be in between 210 nm and 820 nm, to stay in the range of the provided literature values for Si. The data is expected to be in a pandas dataframe containing the columns Mxy, where x and y refer to the matrix element inside the mueller matrix. The data is scaled by the M11 element, such that \(M_{11} = 1\) for all wavelengths. To show the structure we print the MM dataframe. If you load your data from another source make sure it adheres to this form.

MM = elli.read_spectraray_mmatrix("Wafer_MM_70.txt").loc[210:820]
print(MM)
            M11      M12      M13      M14  ...      M41      M42      M43      M44
Wavelength                                  ...
210.30366   1.0 -0.09147 -0.01241 -0.00614  ...  0.00986  0.00048 -0.95574  0.25821
210.76102   1.0 -0.10879 -0.01151 -0.00901  ...  0.00917  0.01319 -0.96899  0.24432
211.21834   1.0 -0.10639 -0.00694 -0.00475  ...  0.00712  0.00891 -0.96191  0.24986
211.67561   1.0 -0.11544 -0.02094 -0.00348  ...  0.01877  0.01726 -0.95951  0.25408
212.13284   1.0 -0.12199  0.02182  0.00480  ... -0.01790 -0.01957 -0.95493  0.28308
...         ...      ...      ...      ...  ...      ...      ...      ...      ...
818.08934   1.0 -0.44285 -0.00048 -0.00288  ...  0.00292 -0.00276 -0.87949  0.15713
818.50589   1.0 -0.44301  0.00376  0.00118  ... -0.00159 -0.01090 -0.87876  0.16422
818.92240   1.0 -0.44245  0.00887  0.00626  ... -0.00585 -0.01388 -0.87960  0.16743
819.33886   1.0 -0.44406 -0.00646 -0.00610  ...  0.00882  0.00424 -0.87907  0.15105
819.75528   1.0 -0.44381  0.01170  0.00550  ... -0.00692 -0.01260 -0.87849  0.16637

[1396 rows x 16 columns]

Setting start parameters

Here we set the start parameters for the SiO2 cauchy dispersion and thickness of the layer.

params = ParamsHist()
params.add("SiO2_n0", value=1.452, min=-100, max=100, vary=True)
params.add("SiO2_n1", value=36.0, min=-40000, max=40000, vary=True)
params.add("SiO2_n2", value=0, min=-40000, max=40000, vary=True)
params.add("SiO2_k0", value=0, min=-100, max=100, vary=True)
params.add("SiO2_k1", value=0, min=-40000, max=40000, vary=True)
params.add("SiO2_k2", value=0, min=-40000, max=40000, vary=True)
params.add("SiO2_d", value=120, min=0, max=40000, vary=True)

Load silicon dispersion from the refractiveindexinfo database

You can load any material from the index refractiveindex.info, which is embedded into the software (so you may use it offline, too). Here, we are interested in the literature values for the silicon substrate. First we need to load the database with rii_db = elli.db.RII() and then we can query it with rii_db.get_mat("Si", "Aspnes") to load this entry.

rii_db = elli.db.RII()
Si = rii_db.get_mat("Si", "Aspnes")

Building the model

Here the model is build and the experimental structure is returned. For details on this process please refer to the Basic usage example. When executed in an jupyter notebook this displays an interactive graph with which you can select the start parameters before fitting the data.

@fit_mueller_matrix(MM, params, display_single=False, sharex=True, full_scale=False)
def model(lbda, params):
    SiO2 = elli.Cauchy(
        params["SiO2_n0"],
        params["SiO2_n1"],
        params["SiO2_n2"],
        params["SiO2_k0"],
        params["SiO2_k1"],
        params["SiO2_k2"],
    ).get_mat()

    Layer = [elli.Layer(SiO2, params["SiO2_d"])]

    return elli.Structure(elli.AIR, Layer, Si).evaluate(
        lbda, 70, solver=elli.Solver4x4, propagator=elli.PropagatorExpm()
    )

Plot & Fit the model

Here we plot the model at the initial parameter set vs. the experimental data.

model.plot()
FigureWidget({
    'data': [{'line': {'color': '#636EFA', 'dash': 'solid'},
              'name': 'M11 ',
              'type': 'scatter',
              'uid': 'e2a58956-1d2e-4fd1-8aa8-8c9efbaa304f',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x',
              'y': array([1., 1., 1., ..., 1., 1., 1.]),
              'yaxis': 'y'},
             {'line': {'color': '#636EFA', 'dash': 'dash'},
              'name': 'M11 theory',
              'type': 'scatter',
              'uid': 'a02f015f-1fd2-4c14-9e53-f735a66e02a7',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x',
              'y': array([1., 1., 1., ..., 1., 1., 1.]),
              'yaxis': 'y'},
             {'line': {'color': '#EF553B', 'dash': 'solid'},
              'name': 'M12 ',
              'type': 'scatter',
              'uid': 'bf6e8fb1-1f1c-439c-a614-34df648a169e',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x2',
              'y': array([-0.09147, -0.10879, -0.10639, ..., -0.44245, -0.44406, -0.44381]),
              'yaxis': 'y2'},
             {'line': {'color': '#EF553B', 'dash': 'dash'},
              'name': 'M12 theory',
              'type': 'scatter',
              'uid': '139b0012-7e77-4b09-a3ed-5caf74b07b8c',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x2',
              'y': array([ 0.48866781,  0.48269971,  0.47444741, ..., -0.27734559, -0.27811094,
                          -0.27887466]),
              'yaxis': 'y2'},
             {'line': {'color': '#00CC96', 'dash': 'solid'},
              'name': 'M13 ',
              'type': 'scatter',
              'uid': '0280dea8-1b40-49db-b6bb-75f48faaf9ce',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x3',
              'y': array([-0.01241, -0.01151, -0.00694, ...,  0.00887, -0.00646,  0.0117 ]),
              'yaxis': 'y3'},
             {'line': {'color': '#00CC96', 'dash': 'dash'},
              'name': 'M13 theory',
              'type': 'scatter',
              'uid': 'da464cc1-54b1-4aa5-98b7-8f5f235810e3',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x3',
              'y': array([0., 0., 0., ..., 0., 0., 0.]),
              'yaxis': 'y3'},
             {'line': {'color': '#AB63FA', 'dash': 'solid'},
              'name': 'M14 ',
              'type': 'scatter',
              'uid': '96ced1f0-61a9-4d73-94b8-839b3de2d1d7',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x4',
              'y': array([-0.00614, -0.00901, -0.00475, ...,  0.00626, -0.0061 ,  0.0055 ]),
              'yaxis': 'y4'},
             {'line': {'color': '#AB63FA', 'dash': 'dash'},
              'name': 'M14 theory',
              'type': 'scatter',
              'uid': 'ab2d5c0f-eeeb-46fe-b405-11496a4ed136',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x4',
              'y': array([0., 0., 0., ..., 0., 0., 0.]),
              'yaxis': 'y4'},
             {'line': {'color': '#FFA15A', 'dash': 'solid'},
              'name': 'M21 ',
              'type': 'scatter',
              'uid': '268b85ba-67d8-42d4-ae46-75dde2e751eb',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x5',
              'y': array([-0.09605, -0.09754, -0.10761, ..., -0.44024, -0.44126, -0.44135]),
              'yaxis': 'y5'},
             {'line': {'color': '#FFA15A', 'dash': 'dash'},
              'name': 'M21 theory',
              'type': 'scatter',
              'uid': '8fbb83be-9852-47ab-876a-ccbac2f8eea6',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x5',
              'y': array([ 0.48866781,  0.48269971,  0.47444741, ..., -0.27734559, -0.27811094,
                          -0.27887466]),
              'yaxis': 'y5'},
             {'line': {'color': '#19D3F3', 'dash': 'solid'},
              'name': 'M22 ',
              'type': 'scatter',
              'uid': '78239abb-0296-4c99-be23-da571be2b02b',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x6',
              'y': array([0.99426, 0.99475, 0.99637, ..., 0.99723, 0.99661, 0.99606]),
              'yaxis': 'y6'},
             {'line': {'color': '#19D3F3', 'dash': 'dash'},
              'name': 'M22 theory',
              'type': 'scatter',
              'uid': '4db6bfa4-1e88-46f4-91b5-a0dc89c92f34',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x6',
              'y': array([1., 1., 1., ..., 1., 1., 1.]),
              'yaxis': 'y6'},
             {'line': {'color': '#FF6692', 'dash': 'solid'},
              'name': 'M23 ',
              'type': 'scatter',
              'uid': 'ca24283f-2736-411c-9f54-12790e185a53',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x7',
              'y': array([-0.00364, -0.00427, -0.00207, ..., -0.00457,  0.00234, -0.00653]),
              'yaxis': 'y7'},
             {'line': {'color': '#FF6692', 'dash': 'dash'},
              'name': 'M23 theory',
              'type': 'scatter',
              'uid': '08a904fd-2756-4e1d-8b7e-1a689c07d64f',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x7',
              'y': array([0., 0., 0., ..., 0., 0., 0.]),
              'yaxis': 'y7'},
             {'line': {'color': '#B6E880', 'dash': 'solid'},
              'name': 'M24 ',
              'type': 'scatter',
              'uid': '3e259b1a-724d-488d-a9b5-8298fbbd1020',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x8',
              'y': array([ 0.01084, -0.00325,  0.01123, ..., -0.00263,  0.00227, -0.00311]),
              'yaxis': 'y8'},
             {'line': {'color': '#B6E880', 'dash': 'dash'},
              'name': 'M24 theory',
              'type': 'scatter',
              'uid': 'ee77cce3-c68d-461b-8883-634bc4f118bf',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x8',
              'y': array([0., 0., 0., ..., 0., 0., 0.]),
              'yaxis': 'y8'},
             {'line': {'color': '#FF97FF', 'dash': 'solid'},
              'name': 'M31 ',
              'type': 'scatter',
              'uid': '52f088ed-3bee-495b-b375-9b5b9604e369',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x9',
              'y': array([-0.00278, -0.00634, -0.00219, ...,  0.00055, -0.00105,  0.00037]),
              'yaxis': 'y9'},
             {'line': {'color': '#FF97FF', 'dash': 'dash'},
              'name': 'M31 theory',
              'type': 'scatter',
              'uid': '18d9f477-1832-43d8-8c07-a59658a14921',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x9',
              'y': array([0., 0., 0., ..., 0., 0., 0.]),
              'yaxis': 'y9'},
             {'line': {'color': '#FECB52', 'dash': 'solid'},
              'name': 'M32 ',
              'type': 'scatter',
              'uid': '76a4d123-6eb8-4b8d-98bd-ae0f6e769778',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x10',
              'y': array([-0.00212, -0.00045,  0.0003 , ..., -0.0018 , -0.00042,  0.00037]),
              'yaxis': 'y10'},
             {'line': {'color': '#FECB52', 'dash': 'dash'},
              'name': 'M32 theory',
              'type': 'scatter',
              'uid': 'b69313fe-88fe-478c-a23e-8e75713d62b4',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x10',
              'y': array([0., 0., 0., ..., 0., 0., 0.]),
              'yaxis': 'y10'},
             {'line': {'color': '#636EFA', 'dash': 'solid'},
              'name': 'M33 ',
              'type': 'scatter',
              'uid': '4abb9836-c341-49fc-b66c-50b6f2d524dc',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x11',
              'y': array([0.27283, 0.26726, 0.2728 , ..., 0.16236, 0.16271, 0.16255]),
              'yaxis': 'y11'},
             {'line': {'color': '#636EFA', 'dash': 'dash'},
              'name': 'M33 theory',
              'type': 'scatter',
              'uid': '005eec64-385a-46a8-9a68-e20251099fbc',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x11',
              'y': array([-0.7816551 , -0.7513992 , -0.71835653, ...,  0.20157248,  0.20151163,
                           0.20145043]),
              'yaxis': 'y11'},
             {'line': {'color': '#EF553B', 'dash': 'solid'},
              'name': 'M34 ',
              'type': 'scatter',
              'uid': '4d262f45-0218-4295-a0ea-b9284e740b20',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x12',
              'y': array([0.95555, 0.9645 , 0.95821, ..., 0.87712, 0.87629, 0.87661]),
              'yaxis': 'y12'},
             {'line': {'color': '#EF553B', 'dash': 'dash'},
              'name': 'M34 theory',
              'type': 'scatter',
              'uid': 'e57ef139-e5dc-46cd-8504-f03a77d12a1c',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x12',
              'y': array([0.38758105, 0.44988913, 0.50878635, ..., 0.93938701, 0.93917377,
                          0.93896041]),
              'yaxis': 'y12'},
             {'line': {'color': '#00CC96', 'dash': 'solid'},
              'name': 'M41 ',
              'type': 'scatter',
              'uid': '32ea3729-764f-433a-ada4-ce15cb91271e',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x13',
              'y': array([ 0.00986,  0.00917,  0.00712, ..., -0.00585,  0.00882, -0.00692]),
              'yaxis': 'y13'},
             {'line': {'color': '#00CC96', 'dash': 'dash'},
              'name': 'M41 theory',
              'type': 'scatter',
              'uid': '27bc18d9-60cb-4e6c-abed-1068299e6a6a',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x13',
              'y': array([0., 0., 0., ..., 0., 0., 0.]),
              'yaxis': 'y13'},
             {'line': {'color': '#AB63FA', 'dash': 'solid'},
              'name': 'M42 ',
              'type': 'scatter',
              'uid': 'd98b33b2-09a4-48c9-80ae-6bf1f696cacf',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x14',
              'y': array([ 0.00048,  0.01319,  0.00891, ..., -0.01388,  0.00424, -0.0126 ]),
              'yaxis': 'y14'},
             {'line': {'color': '#AB63FA', 'dash': 'dash'},
              'name': 'M42 theory',
              'type': 'scatter',
              'uid': '496dcd12-3df2-4421-baf6-776ac024ad9a',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x14',
              'y': array([0., 0., 0., ..., 0., 0., 0.]),
              'yaxis': 'y14'},
             {'line': {'color': '#FFA15A', 'dash': 'solid'},
              'name': 'M43 ',
              'type': 'scatter',
              'uid': '64379f06-00fd-4679-878e-eb6e728c23c5',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x15',
              'y': array([-0.95574, -0.96899, -0.96191, ..., -0.8796 , -0.87907, -0.87849]),
              'yaxis': 'y15'},
             {'line': {'color': '#FFA15A', 'dash': 'dash'},
              'name': 'M43 theory',
              'type': 'scatter',
              'uid': '9b6efd24-e6b4-4637-b4bf-f08e10710fe7',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x15',
              'y': array([-0.38758105, -0.44988913, -0.50878635, ..., -0.93938701, -0.93917377,
                          -0.93896041]),
              'yaxis': 'y15'},
             {'line': {'color': '#19D3F3', 'dash': 'solid'},
              'name': 'M44 ',
              'type': 'scatter',
              'uid': 'a1d2514b-3442-47a2-9bf5-b14c9f9ae5de',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x16',
              'y': array([0.25821, 0.24432, 0.24986, ..., 0.16743, 0.15105, 0.16637]),
              'yaxis': 'y16'},
             {'line': {'color': '#19D3F3', 'dash': 'dash'},
              'name': 'M44 theory',
              'type': 'scatter',
              'uid': '2b73fbe2-b47c-46ad-a9ff-844cef247744',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x16',
              'y': array([-0.7816551 , -0.7513992 , -0.71835653, ...,  0.20157248,  0.20151163,
                           0.20145043]),
              'yaxis': 'y16'}],
    'layout': {'template': '...',
               'xaxis': {'anchor': 'y', 'domain': [0.0, 0.2125], 'matches': 'x'},
               'xaxis10': {'anchor': 'y10', 'domain': [0.2625, 0.475], 'matches': 'x'},
               'xaxis11': {'anchor': 'y11', 'domain': [0.525, 0.7375], 'matches': 'x'},
               'xaxis12': {'anchor': 'y12', 'domain': [0.7875, 1.0], 'matches': 'x'},
               'xaxis13': {'anchor': 'y13', 'domain': [0.0, 0.2125], 'matches': 'x'},
               'xaxis14': {'anchor': 'y14', 'domain': [0.2625, 0.475], 'matches': 'x'},
               'xaxis15': {'anchor': 'y15', 'domain': [0.525, 0.7375], 'matches': 'x'},
               'xaxis16': {'anchor': 'y16', 'domain': [0.7875, 1.0], 'matches': 'x'},
               'xaxis2': {'anchor': 'y2', 'domain': [0.2625, 0.475], 'matches': 'x'},
               'xaxis3': {'anchor': 'y3', 'domain': [0.525, 0.7375], 'matches': 'x'},
               'xaxis4': {'anchor': 'y4', 'domain': [0.7875, 1.0], 'matches': 'x'},
               'xaxis5': {'anchor': 'y5', 'domain': [0.0, 0.2125], 'matches': 'x'},
               'xaxis6': {'anchor': 'y6', 'domain': [0.2625, 0.475], 'matches': 'x'},
               'xaxis7': {'anchor': 'y7', 'domain': [0.525, 0.7375], 'matches': 'x'},
               'xaxis8': {'anchor': 'y8', 'domain': [0.7875, 1.0], 'matches': 'x'},
               'xaxis9': {'anchor': 'y9', 'domain': [0.0, 0.2125], 'matches': 'x'},
               'yaxis': {'anchor': 'x', 'domain': [0.80625, 1.0]},
               'yaxis10': {'anchor': 'x10', 'domain': [0.26875, 0.4625]},
               'yaxis11': {'anchor': 'x11', 'domain': [0.26875, 0.4625]},
               'yaxis12': {'anchor': 'x12', 'domain': [0.26875, 0.4625]},
               'yaxis13': {'anchor': 'x13', 'domain': [0.0, 0.19375]},
               'yaxis14': {'anchor': 'x14', 'domain': [0.0, 0.19375]},
               'yaxis15': {'anchor': 'x15', 'domain': [0.0, 0.19375]},
               'yaxis16': {'anchor': 'x16', 'domain': [0.0, 0.19375]},
               'yaxis2': {'anchor': 'x2', 'domain': [0.80625, 1.0]},
               'yaxis3': {'anchor': 'x3', 'domain': [0.80625, 1.0]},
               'yaxis4': {'anchor': 'x4', 'domain': [0.80625, 1.0]},
               'yaxis5': {'anchor': 'x5', 'domain': [0.5375, 0.73125]},
               'yaxis6': {'anchor': 'x6', 'domain': [0.5375, 0.73125]},
               'yaxis7': {'anchor': 'x7', 'domain': [0.5375, 0.73125]},
               'yaxis8': {'anchor': 'x8', 'domain': [0.5375, 0.73125]},
               'yaxis9': {'anchor': 'x9', 'domain': [0.26875, 0.4625]}}
})

We can also plot the residual between measurement and model.

model.plot_residual()
FigureWidget({
    'data': [{'line': {'color': '#636EFA', 'dash': 'solid'},
              'name': 'M11 ',
              'type': 'scatter',
              'uid': '6e08acf1-d060-4051-8491-b09100279538',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x',
              'y': array([0., 0., 0., ..., 0., 0., 0.]),
              'yaxis': 'y'},
             {'line': {'color': '#EF553B', 'dash': 'solid'},
              'name': 'M12 ',
              'type': 'scatter',
              'uid': 'e9996447-9fa6-4049-8501-81d3d1dfe56e',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x2',
              'y': array([0.58013781, 0.59148971, 0.58083741, ..., 0.16510441, 0.16594906,
                          0.16493534]),
              'yaxis': 'y2'},
             {'line': {'color': '#00CC96', 'dash': 'solid'},
              'name': 'M13 ',
              'type': 'scatter',
              'uid': '2ecac31e-71c8-4348-ad83-d3e0e0e9b566',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x3',
              'y': array([ 0.01241,  0.01151,  0.00694, ..., -0.00887,  0.00646, -0.0117 ]),
              'yaxis': 'y3'},
             {'line': {'color': '#AB63FA', 'dash': 'solid'},
              'name': 'M14 ',
              'type': 'scatter',
              'uid': '3fe10171-a9af-48a9-9584-8c773622be83',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x4',
              'y': array([ 0.00614,  0.00901,  0.00475, ..., -0.00626,  0.0061 , -0.0055 ]),
              'yaxis': 'y4'},
             {'line': {'color': '#FFA15A', 'dash': 'solid'},
              'name': 'M21 ',
              'type': 'scatter',
              'uid': '9367bbb2-b944-4ddf-8150-4d28af1e379f',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x5',
              'y': array([0.58471781, 0.58023971, 0.58205741, ..., 0.16289441, 0.16314906,
                          0.16247534]),
              'yaxis': 'y5'},
             {'line': {'color': '#19D3F3', 'dash': 'solid'},
              'name': 'M22 ',
              'type': 'scatter',
              'uid': 'e7fcf072-9707-4be4-bc9c-6f305f06fac8',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x6',
              'y': array([0.00574, 0.00525, 0.00363, ..., 0.00277, 0.00339, 0.00394]),
              'yaxis': 'y6'},
             {'line': {'color': '#FF6692', 'dash': 'solid'},
              'name': 'M23 ',
              'type': 'scatter',
              'uid': '120b0c1d-9734-4d49-9b70-ff8c60b0da75',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x7',
              'y': array([ 0.00364,  0.00427,  0.00207, ...,  0.00457, -0.00234,  0.00653]),
              'yaxis': 'y7'},
             {'line': {'color': '#B6E880', 'dash': 'solid'},
              'name': 'M24 ',
              'type': 'scatter',
              'uid': '5b22ec60-85bd-4ac7-8928-69b110b24e77',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x8',
              'y': array([-0.01084,  0.00325, -0.01123, ...,  0.00263, -0.00227,  0.00311]),
              'yaxis': 'y8'},
             {'line': {'color': '#FF97FF', 'dash': 'solid'},
              'name': 'M31 ',
              'type': 'scatter',
              'uid': '1913a9d9-3ac8-4dfa-8a91-6047fe9968da',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x9',
              'y': array([ 0.00278,  0.00634,  0.00219, ..., -0.00055,  0.00105, -0.00037]),
              'yaxis': 'y9'},
             {'line': {'color': '#FECB52', 'dash': 'solid'},
              'name': 'M32 ',
              'type': 'scatter',
              'uid': 'dbfabf51-a556-4f38-b32a-2fb07dfdefdb',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x10',
              'y': array([ 0.00212,  0.00045, -0.0003 , ...,  0.0018 ,  0.00042, -0.00037]),
              'yaxis': 'y10'},
             {'line': {'color': '#636EFA', 'dash': 'solid'},
              'name': 'M33 ',
              'type': 'scatter',
              'uid': 'b710ca48-4437-424c-8195-3a0d7c67d356',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x11',
              'y': array([-1.0544851 , -1.0186592 , -0.99115653, ...,  0.03921248,  0.03880163,
                           0.03890043]),
              'yaxis': 'y11'},
             {'line': {'color': '#EF553B', 'dash': 'solid'},
              'name': 'M34 ',
              'type': 'scatter',
              'uid': '9a8d321f-a2e1-415b-92f5-2c563cd40440',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x12',
              'y': array([-0.56796895, -0.51461087, -0.44942365, ...,  0.06226701,  0.06288377,
                           0.06235041]),
              'yaxis': 'y12'},
             {'line': {'color': '#00CC96', 'dash': 'solid'},
              'name': 'M41 ',
              'type': 'scatter',
              'uid': 'bc8fed3c-587f-4e50-82e7-ee8e510de9ca',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x13',
              'y': array([-0.00986, -0.00917, -0.00712, ...,  0.00585, -0.00882,  0.00692]),
              'yaxis': 'y13'},
             {'line': {'color': '#AB63FA', 'dash': 'solid'},
              'name': 'M42 ',
              'type': 'scatter',
              'uid': '92d51f60-b225-4b45-b1d8-d73c0f1e8145',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x14',
              'y': array([-0.00048, -0.01319, -0.00891, ...,  0.01388, -0.00424,  0.0126 ]),
              'yaxis': 'y14'},
             {'line': {'color': '#FFA15A', 'dash': 'solid'},
              'name': 'M43 ',
              'type': 'scatter',
              'uid': '1c0c9404-e7fb-4d24-bd23-1013a9d55e45',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x15',
              'y': array([ 0.56815895,  0.51910087,  0.45312365, ..., -0.05978701, -0.06010377,
                          -0.06047041]),
              'yaxis': 'y15'},
             {'line': {'color': '#19D3F3', 'dash': 'solid'},
              'name': 'M44 ',
              'type': 'scatter',
              'uid': '2cd3b8e2-7cdb-4294-96e4-b2f5b20ed51b',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x16',
              'y': array([-1.0398651 , -0.9957192 , -0.96821653, ...,  0.03414248,  0.05046163,
                           0.03508043]),
              'yaxis': 'y16'}],
    'layout': {'template': '...',
               'xaxis': {'anchor': 'y', 'domain': [0.0, 0.2125], 'matches': 'x'},
               'xaxis10': {'anchor': 'y10', 'domain': [0.2625, 0.475], 'matches': 'x'},
               'xaxis11': {'anchor': 'y11', 'domain': [0.525, 0.7375], 'matches': 'x'},
               'xaxis12': {'anchor': 'y12', 'domain': [0.7875, 1.0], 'matches': 'x'},
               'xaxis13': {'anchor': 'y13', 'domain': [0.0, 0.2125], 'matches': 'x'},
               'xaxis14': {'anchor': 'y14', 'domain': [0.2625, 0.475], 'matches': 'x'},
               'xaxis15': {'anchor': 'y15', 'domain': [0.525, 0.7375], 'matches': 'x'},
               'xaxis16': {'anchor': 'y16', 'domain': [0.7875, 1.0], 'matches': 'x'},
               'xaxis2': {'anchor': 'y2', 'domain': [0.2625, 0.475], 'matches': 'x'},
               'xaxis3': {'anchor': 'y3', 'domain': [0.525, 0.7375], 'matches': 'x'},
               'xaxis4': {'anchor': 'y4', 'domain': [0.7875, 1.0], 'matches': 'x'},
               'xaxis5': {'anchor': 'y5', 'domain': [0.0, 0.2125], 'matches': 'x'},
               'xaxis6': {'anchor': 'y6', 'domain': [0.2625, 0.475], 'matches': 'x'},
               'xaxis7': {'anchor': 'y7', 'domain': [0.525, 0.7375], 'matches': 'x'},
               'xaxis8': {'anchor': 'y8', 'domain': [0.7875, 1.0], 'matches': 'x'},
               'xaxis9': {'anchor': 'y9', 'domain': [0.0, 0.2125], 'matches': 'x'},
               'yaxis': {'anchor': 'x', 'domain': [0.80625, 1.0]},
               'yaxis10': {'anchor': 'x10', 'domain': [0.26875, 0.4625]},
               'yaxis11': {'anchor': 'x11', 'domain': [0.26875, 0.4625]},
               'yaxis12': {'anchor': 'x12', 'domain': [0.26875, 0.4625]},
               'yaxis13': {'anchor': 'x13', 'domain': [0.0, 0.19375]},
               'yaxis14': {'anchor': 'x14', 'domain': [0.0, 0.19375]},
               'yaxis15': {'anchor': 'x15', 'domain': [0.0, 0.19375]},
               'yaxis16': {'anchor': 'x16', 'domain': [0.0, 0.19375]},
               'yaxis2': {'anchor': 'x2', 'domain': [0.80625, 1.0]},
               'yaxis3': {'anchor': 'x3', 'domain': [0.80625, 1.0]},
               'yaxis4': {'anchor': 'x4', 'domain': [0.80625, 1.0]},
               'yaxis5': {'anchor': 'x5', 'domain': [0.5375, 0.73125]},
               'yaxis6': {'anchor': 'x6', 'domain': [0.5375, 0.73125]},
               'yaxis7': {'anchor': 'x7', 'domain': [0.5375, 0.73125]},
               'yaxis8': {'anchor': 'x8', 'domain': [0.5375, 0.73125]},
               'yaxis9': {'anchor': 'x9', 'domain': [0.26875, 0.4625]}}
})

Now we execute a fit and plot the model afterwards.

fit_stats = model.fit()
model.plot(full_scale=False)
FigureWidget({
    'data': [{'line': {'color': '#636EFA', 'dash': 'solid'},
              'name': 'M11 ',
              'type': 'scatter',
              'uid': 'b1d3aa3c-091c-49b0-9abd-4255ba731699',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x',
              'y': array([1., 1., 1., ..., 1., 1., 1.]),
              'yaxis': 'y'},
             {'line': {'color': '#636EFA', 'dash': 'dash'},
              'name': 'M11 theory',
              'type': 'scatter',
              'uid': '12d88264-be40-4ea9-aa62-4496e188e533',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x',
              'y': array([1., 1., 1., ..., 1., 1., 1.]),
              'yaxis': 'y'},
             {'line': {'color': '#EF553B', 'dash': 'solid'},
              'name': 'M12 ',
              'type': 'scatter',
              'uid': '8a223493-3ff7-48ec-8cba-c02c16b606b3',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x2',
              'y': array([-0.09147, -0.10879, -0.10639, ..., -0.44245, -0.44406, -0.44381]),
              'yaxis': 'y2'},
             {'line': {'color': '#EF553B', 'dash': 'dash'},
              'name': 'M12 theory',
              'type': 'scatter',
              'uid': '33259694-0c28-44ec-a2fd-fc79c104616f',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x2',
              'y': array([-0.09144455, -0.09725244, -0.10283701, ..., -0.44690831, -0.4474133 ,
                          -0.44791754]),
              'yaxis': 'y2'},
             {'line': {'color': '#00CC96', 'dash': 'solid'},
              'name': 'M13 ',
              'type': 'scatter',
              'uid': 'e5217fad-a9eb-4598-8575-1fc98cfbd887',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x3',
              'y': array([-0.01241, -0.01151, -0.00694, ...,  0.00887, -0.00646,  0.0117 ]),
              'yaxis': 'y3'},
             {'line': {'color': '#00CC96', 'dash': 'dash'},
              'name': 'M13 theory',
              'type': 'scatter',
              'uid': '3ef9bdfc-be14-4191-b62e-f240e5008560',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x3',
              'y': array([0., 0., 0., ..., 0., 0., 0.]),
              'yaxis': 'y3'},
             {'line': {'color': '#AB63FA', 'dash': 'solid'},
              'name': 'M14 ',
              'type': 'scatter',
              'uid': '04a24023-c125-4343-9c73-2a63d06809ee',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x4',
              'y': array([-0.00614, -0.00901, -0.00475, ...,  0.00626, -0.0061 ,  0.0055 ]),
              'yaxis': 'y4'},
             {'line': {'color': '#AB63FA', 'dash': 'dash'},
              'name': 'M14 theory',
              'type': 'scatter',
              'uid': 'd1eb1e31-1333-4895-8c88-add189c192f0',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x4',
              'y': array([0., 0., 0., ..., 0., 0., 0.]),
              'yaxis': 'y4'},
             {'line': {'color': '#FFA15A', 'dash': 'solid'},
              'name': 'M21 ',
              'type': 'scatter',
              'uid': 'b5872123-e841-4d88-874c-d9ec18ee3f8d',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x5',
              'y': array([-0.09605, -0.09754, -0.10761, ..., -0.44024, -0.44126, -0.44135]),
              'yaxis': 'y5'},
             {'line': {'color': '#FFA15A', 'dash': 'dash'},
              'name': 'M21 theory',
              'type': 'scatter',
              'uid': '24c3ddeb-5f65-43af-acc1-3630e1504a27',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x5',
              'y': array([-0.09144455, -0.09725244, -0.10283701, ..., -0.44690831, -0.4474133 ,
                          -0.44791754]),
              'yaxis': 'y5'},
             {'line': {'color': '#19D3F3', 'dash': 'solid'},
              'name': 'M22 ',
              'type': 'scatter',
              'uid': '942d8672-7c16-486e-b2cb-ff3befeafebc',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x6',
              'y': array([0.99426, 0.99475, 0.99637, ..., 0.99723, 0.99661, 0.99606]),
              'yaxis': 'y6'},
             {'line': {'color': '#19D3F3', 'dash': 'dash'},
              'name': 'M22 theory',
              'type': 'scatter',
              'uid': '6480c048-ce5b-440a-af11-76c20e05c245',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x6',
              'y': array([1., 1., 1., ..., 1., 1., 1.]),
              'yaxis': 'y6'},
             {'line': {'color': '#FF6692', 'dash': 'solid'},
              'name': 'M23 ',
              'type': 'scatter',
              'uid': '951b517e-d325-448d-b1ba-a429fb2597e7',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x7',
              'y': array([-0.00364, -0.00427, -0.00207, ..., -0.00457,  0.00234, -0.00653]),
              'yaxis': 'y7'},
             {'line': {'color': '#FF6692', 'dash': 'dash'},
              'name': 'M23 theory',
              'type': 'scatter',
              'uid': 'd087d7e3-b095-4767-8f77-60e207134a56',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x7',
              'y': array([0., 0., 0., ..., 0., 0., 0.]),
              'yaxis': 'y7'},
             {'line': {'color': '#B6E880', 'dash': 'solid'},
              'name': 'M24 ',
              'type': 'scatter',
              'uid': 'a641f9dc-7fa2-4d62-a232-6d1ba1d7ba46',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x8',
              'y': array([ 0.01084, -0.00325,  0.01123, ..., -0.00263,  0.00227, -0.00311]),
              'yaxis': 'y8'},
             {'line': {'color': '#B6E880', 'dash': 'dash'},
              'name': 'M24 theory',
              'type': 'scatter',
              'uid': 'd38a962f-1bc4-4cbb-bde4-066e82f3b9b6',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x8',
              'y': array([0., 0., 0., ..., 0., 0., 0.]),
              'yaxis': 'y8'},
             {'line': {'color': '#FF97FF', 'dash': 'solid'},
              'name': 'M31 ',
              'type': 'scatter',
              'uid': '04cf154a-92c1-42bf-9430-a7c2cb9eb327',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x9',
              'y': array([-0.00278, -0.00634, -0.00219, ...,  0.00055, -0.00105,  0.00037]),
              'yaxis': 'y9'},
             {'line': {'color': '#FF97FF', 'dash': 'dash'},
              'name': 'M31 theory',
              'type': 'scatter',
              'uid': '81bf4823-cbd3-49d2-8650-309dcd45f315',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x9',
              'y': array([0., 0., 0., ..., 0., 0., 0.]),
              'yaxis': 'y9'},
             {'line': {'color': '#FECB52', 'dash': 'solid'},
              'name': 'M32 ',
              'type': 'scatter',
              'uid': '91ec06f2-018a-470e-b8ec-f4be65f302d2',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x10',
              'y': array([-0.00212, -0.00045,  0.0003 , ..., -0.0018 , -0.00042,  0.00037]),
              'yaxis': 'y10'},
             {'line': {'color': '#FECB52', 'dash': 'dash'},
              'name': 'M32 theory',
              'type': 'scatter',
              'uid': '883c6e5c-88a6-4754-9e28-9e04b0e03f8b',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x10',
              'y': array([0., 0., 0., ..., 0., 0., 0.]),
              'yaxis': 'y10'},
             {'line': {'color': '#636EFA', 'dash': 'solid'},
              'name': 'M33 ',
              'type': 'scatter',
              'uid': 'c8c11ab5-9de1-4a61-a4dc-d51a23e88099',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x11',
              'y': array([0.27283, 0.26726, 0.2728 , ..., 0.16236, 0.16271, 0.16255]),
              'yaxis': 'y11'},
             {'line': {'color': '#636EFA', 'dash': 'dash'},
              'name': 'M33 theory',
              'type': 'scatter',
              'uid': '21b8eec7-71ef-45c9-84f7-6e73c33c33a9',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x11',
              'y': array([0.28646091, 0.28504654, 0.28325221, ..., 0.15847734, 0.15832134,
                          0.15816535]),
              'yaxis': 'y11'},
             {'line': {'color': '#EF553B', 'dash': 'solid'},
              'name': 'M34 ',
              'type': 'scatter',
              'uid': 'c1509385-8697-40ca-864c-78748abbe6f5',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x12',
              'y': array([0.95555, 0.9645 , 0.95821, ..., 0.87712, 0.87629, 0.87661]),
              'yaxis': 'y12'},
             {'line': {'color': '#EF553B', 'dash': 'dash'},
              'name': 'M34 theory',
              'type': 'scatter',
              'uid': '9dce0ab5-b8f6-4a3b-90fc-7751607612fe',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x12',
              'y': array([0.95371801, 0.95356721, 0.95351598, ..., 0.88043051, 0.88020208,
                          0.87997364]),
              'yaxis': 'y12'},
             {'line': {'color': '#00CC96', 'dash': 'solid'},
              'name': 'M41 ',
              'type': 'scatter',
              'uid': '63da162d-788b-4efe-92be-1b2f3105fc5a',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x13',
              'y': array([ 0.00986,  0.00917,  0.00712, ..., -0.00585,  0.00882, -0.00692]),
              'yaxis': 'y13'},
             {'line': {'color': '#00CC96', 'dash': 'dash'},
              'name': 'M41 theory',
              'type': 'scatter',
              'uid': 'f01849fd-9035-430e-b281-6e219b095dae',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x13',
              'y': array([0., 0., 0., ..., 0., 0., 0.]),
              'yaxis': 'y13'},
             {'line': {'color': '#AB63FA', 'dash': 'solid'},
              'name': 'M42 ',
              'type': 'scatter',
              'uid': '8a707205-cd22-40c8-a671-611b05e1054a',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x14',
              'y': array([ 0.00048,  0.01319,  0.00891, ..., -0.01388,  0.00424, -0.0126 ]),
              'yaxis': 'y14'},
             {'line': {'color': '#AB63FA', 'dash': 'dash'},
              'name': 'M42 theory',
              'type': 'scatter',
              'uid': '480bf651-014d-4914-9300-a1af5f3c62ba',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x14',
              'y': array([0., 0., 0., ..., 0., 0., 0.]),
              'yaxis': 'y14'},
             {'line': {'color': '#FFA15A', 'dash': 'solid'},
              'name': 'M43 ',
              'type': 'scatter',
              'uid': '522c7e7f-bbd0-4b2d-acea-2c17d490fc2a',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x15',
              'y': array([-0.95574, -0.96899, -0.96191, ..., -0.8796 , -0.87907, -0.87849]),
              'yaxis': 'y15'},
             {'line': {'color': '#FFA15A', 'dash': 'dash'},
              'name': 'M43 theory',
              'type': 'scatter',
              'uid': '2e1a6597-b9ed-402f-9d34-b558e60e29fb',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x15',
              'y': array([-0.95371801, -0.95356721, -0.95351598, ..., -0.88043051, -0.88020208,
                          -0.87997364]),
              'yaxis': 'y15'},
             {'line': {'color': '#19D3F3', 'dash': 'solid'},
              'name': 'M44 ',
              'type': 'scatter',
              'uid': '17f0af3c-a430-412e-a2f5-972a92ce0e48',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x16',
              'y': array([0.25821, 0.24432, 0.24986, ..., 0.16743, 0.15105, 0.16637]),
              'yaxis': 'y16'},
             {'line': {'color': '#19D3F3', 'dash': 'dash'},
              'name': 'M44 theory',
              'type': 'scatter',
              'uid': 'ae0258ee-6bab-4a23-a260-70c179fed699',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x16',
              'y': array([0.28646091, 0.28504654, 0.28325221, ..., 0.15847734, 0.15832134,
                          0.15816535]),
              'yaxis': 'y16'}],
    'layout': {'template': '...',
               'xaxis': {'anchor': 'y', 'domain': [0.0, 0.2125], 'matches': 'x'},
               'xaxis10': {'anchor': 'y10', 'domain': [0.2625, 0.475], 'matches': 'x'},
               'xaxis11': {'anchor': 'y11', 'domain': [0.525, 0.7375], 'matches': 'x'},
               'xaxis12': {'anchor': 'y12', 'domain': [0.7875, 1.0], 'matches': 'x'},
               'xaxis13': {'anchor': 'y13', 'domain': [0.0, 0.2125], 'matches': 'x'},
               'xaxis14': {'anchor': 'y14', 'domain': [0.2625, 0.475], 'matches': 'x'},
               'xaxis15': {'anchor': 'y15', 'domain': [0.525, 0.7375], 'matches': 'x'},
               'xaxis16': {'anchor': 'y16', 'domain': [0.7875, 1.0], 'matches': 'x'},
               'xaxis2': {'anchor': 'y2', 'domain': [0.2625, 0.475], 'matches': 'x'},
               'xaxis3': {'anchor': 'y3', 'domain': [0.525, 0.7375], 'matches': 'x'},
               'xaxis4': {'anchor': 'y4', 'domain': [0.7875, 1.0], 'matches': 'x'},
               'xaxis5': {'anchor': 'y5', 'domain': [0.0, 0.2125], 'matches': 'x'},
               'xaxis6': {'anchor': 'y6', 'domain': [0.2625, 0.475], 'matches': 'x'},
               'xaxis7': {'anchor': 'y7', 'domain': [0.525, 0.7375], 'matches': 'x'},
               'xaxis8': {'anchor': 'y8', 'domain': [0.7875, 1.0], 'matches': 'x'},
               'xaxis9': {'anchor': 'y9', 'domain': [0.0, 0.2125], 'matches': 'x'},
               'yaxis': {'anchor': 'x', 'domain': [0.80625, 1.0]},
               'yaxis10': {'anchor': 'x10', 'domain': [0.26875, 0.4625]},
               'yaxis11': {'anchor': 'x11', 'domain': [0.26875, 0.4625]},
               'yaxis12': {'anchor': 'x12', 'domain': [0.26875, 0.4625]},
               'yaxis13': {'anchor': 'x13', 'domain': [0.0, 0.19375]},
               'yaxis14': {'anchor': 'x14', 'domain': [0.0, 0.19375]},
               'yaxis15': {'anchor': 'x15', 'domain': [0.0, 0.19375]},
               'yaxis16': {'anchor': 'x16', 'domain': [0.0, 0.19375]},
               'yaxis2': {'anchor': 'x2', 'domain': [0.80625, 1.0]},
               'yaxis3': {'anchor': 'x3', 'domain': [0.80625, 1.0]},
               'yaxis4': {'anchor': 'x4', 'domain': [0.80625, 1.0]},
               'yaxis5': {'anchor': 'x5', 'domain': [0.5375, 0.73125]},
               'yaxis6': {'anchor': 'x6', 'domain': [0.5375, 0.73125]},
               'yaxis7': {'anchor': 'x7', 'domain': [0.5375, 0.73125]},
               'yaxis8': {'anchor': 'x8', 'domain': [0.5375, 0.73125]},
               'yaxis9': {'anchor': 'x9', 'domain': [0.26875, 0.4625]}}
})

For comparison we plot the residual again to have a figure of merit for the fit quality

model.plot_residual()
FigureWidget({
    'data': [{'line': {'color': '#636EFA', 'dash': 'solid'},
              'name': 'M11 ',
              'type': 'scatter',
              'uid': 'd9e48061-f29f-4339-8d10-a7607d803bf7',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x',
              'y': array([0., 0., 0., ..., 0., 0., 0.]),
              'yaxis': 'y'},
             {'line': {'color': '#EF553B', 'dash': 'solid'},
              'name': 'M12 ',
              'type': 'scatter',
              'uid': 'abc12d64-6410-4121-96ea-09792f6037ba',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x2',
              'y': array([ 2.54507471e-05,  1.15375565e-02,  3.55298734e-03, ..., -4.45831472e-03,
                          -3.35329858e-03, -4.10753562e-03]),
              'yaxis': 'y2'},
             {'line': {'color': '#00CC96', 'dash': 'solid'},
              'name': 'M13 ',
              'type': 'scatter',
              'uid': '712be236-e409-4ba3-a221-128e6350f002',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x3',
              'y': array([ 0.01241,  0.01151,  0.00694, ..., -0.00887,  0.00646, -0.0117 ]),
              'yaxis': 'y3'},
             {'line': {'color': '#AB63FA', 'dash': 'solid'},
              'name': 'M14 ',
              'type': 'scatter',
              'uid': 'a7085773-65db-4cec-98f9-130b4ba0e770',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x4',
              'y': array([ 0.00614,  0.00901,  0.00475, ..., -0.00626,  0.0061 , -0.0055 ]),
              'yaxis': 'y4'},
             {'line': {'color': '#FFA15A', 'dash': 'solid'},
              'name': 'M21 ',
              'type': 'scatter',
              'uid': '772ea154-a8f4-484d-b3e1-5f364bd69529',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x5',
              'y': array([ 0.00460545,  0.00028756,  0.00477299, ..., -0.00666831, -0.0061533 ,
                          -0.00656754]),
              'yaxis': 'y5'},
             {'line': {'color': '#19D3F3', 'dash': 'solid'},
              'name': 'M22 ',
              'type': 'scatter',
              'uid': 'd0b21c96-7397-49ef-a604-75b3cfc49e38',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x6',
              'y': array([0.00574, 0.00525, 0.00363, ..., 0.00277, 0.00339, 0.00394]),
              'yaxis': 'y6'},
             {'line': {'color': '#FF6692', 'dash': 'solid'},
              'name': 'M23 ',
              'type': 'scatter',
              'uid': 'e48f01cc-d3fd-4bb3-9c97-a2bc09e9d0a4',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x7',
              'y': array([ 0.00364,  0.00427,  0.00207, ...,  0.00457, -0.00234,  0.00653]),
              'yaxis': 'y7'},
             {'line': {'color': '#B6E880', 'dash': 'solid'},
              'name': 'M24 ',
              'type': 'scatter',
              'uid': '7f164351-c13a-4cfa-b258-39f869c2276b',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x8',
              'y': array([-0.01084,  0.00325, -0.01123, ...,  0.00263, -0.00227,  0.00311]),
              'yaxis': 'y8'},
             {'line': {'color': '#FF97FF', 'dash': 'solid'},
              'name': 'M31 ',
              'type': 'scatter',
              'uid': 'd791c451-72bd-4493-9071-75e2ed752006',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x9',
              'y': array([ 0.00278,  0.00634,  0.00219, ..., -0.00055,  0.00105, -0.00037]),
              'yaxis': 'y9'},
             {'line': {'color': '#FECB52', 'dash': 'solid'},
              'name': 'M32 ',
              'type': 'scatter',
              'uid': 'c8980e34-ea0b-4513-9bfd-34c450ad9af3',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x10',
              'y': array([ 0.00212,  0.00045, -0.0003 , ...,  0.0018 ,  0.00042, -0.00037]),
              'yaxis': 'y10'},
             {'line': {'color': '#636EFA', 'dash': 'solid'},
              'name': 'M33 ',
              'type': 'scatter',
              'uid': '25c2859e-a074-4723-b172-2380c25b1985',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x11',
              'y': array([ 0.01363091,  0.01778654,  0.01045221, ..., -0.00388266, -0.00438866,
                          -0.00438465]),
              'yaxis': 'y11'},
             {'line': {'color': '#EF553B', 'dash': 'solid'},
              'name': 'M34 ',
              'type': 'scatter',
              'uid': '9c5e40f4-3698-486b-8c92-7d0d06d0a1dc',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x12',
              'y': array([-0.00183199, -0.01093279, -0.00469402, ...,  0.00331051,  0.00391208,
                           0.00336364]),
              'yaxis': 'y12'},
             {'line': {'color': '#00CC96', 'dash': 'solid'},
              'name': 'M41 ',
              'type': 'scatter',
              'uid': 'a53de58b-4c41-4de3-b7c8-8fbe7da1d84b',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x13',
              'y': array([-0.00986, -0.00917, -0.00712, ...,  0.00585, -0.00882,  0.00692]),
              'yaxis': 'y13'},
             {'line': {'color': '#AB63FA', 'dash': 'solid'},
              'name': 'M42 ',
              'type': 'scatter',
              'uid': 'e8ede20a-25cb-498a-a60c-d722b678d61c',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x14',
              'y': array([-0.00048, -0.01319, -0.00891, ...,  0.01388, -0.00424,  0.0126 ]),
              'yaxis': 'y14'},
             {'line': {'color': '#FFA15A', 'dash': 'solid'},
              'name': 'M43 ',
              'type': 'scatter',
              'uid': 'cb3dee5a-ba1a-4ed5-b5a2-f0f05635eb67',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x15',
              'y': array([ 0.00202199,  0.01542279,  0.00839402, ..., -0.00083051, -0.00113208,
                          -0.00148364]),
              'yaxis': 'y15'},
             {'line': {'color': '#19D3F3', 'dash': 'solid'},
              'name': 'M44 ',
              'type': 'scatter',
              'uid': '11201869-7c56-44e4-8479-ef866e619bfc',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x16',
              'y': array([ 0.02825091,  0.04072654,  0.03339221, ..., -0.00895266,  0.00727134,
                          -0.00820465]),
              'yaxis': 'y16'}],
    'layout': {'template': '...',
               'xaxis': {'anchor': 'y', 'domain': [0.0, 0.2125], 'matches': 'x'},
               'xaxis10': {'anchor': 'y10', 'domain': [0.2625, 0.475], 'matches': 'x'},
               'xaxis11': {'anchor': 'y11', 'domain': [0.525, 0.7375], 'matches': 'x'},
               'xaxis12': {'anchor': 'y12', 'domain': [0.7875, 1.0], 'matches': 'x'},
               'xaxis13': {'anchor': 'y13', 'domain': [0.0, 0.2125], 'matches': 'x'},
               'xaxis14': {'anchor': 'y14', 'domain': [0.2625, 0.475], 'matches': 'x'},
               'xaxis15': {'anchor': 'y15', 'domain': [0.525, 0.7375], 'matches': 'x'},
               'xaxis16': {'anchor': 'y16', 'domain': [0.7875, 1.0], 'matches': 'x'},
               'xaxis2': {'anchor': 'y2', 'domain': [0.2625, 0.475], 'matches': 'x'},
               'xaxis3': {'anchor': 'y3', 'domain': [0.525, 0.7375], 'matches': 'x'},
               'xaxis4': {'anchor': 'y4', 'domain': [0.7875, 1.0], 'matches': 'x'},
               'xaxis5': {'anchor': 'y5', 'domain': [0.0, 0.2125], 'matches': 'x'},
               'xaxis6': {'anchor': 'y6', 'domain': [0.2625, 0.475], 'matches': 'x'},
               'xaxis7': {'anchor': 'y7', 'domain': [0.525, 0.7375], 'matches': 'x'},
               'xaxis8': {'anchor': 'y8', 'domain': [0.7875, 1.0], 'matches': 'x'},
               'xaxis9': {'anchor': 'y9', 'domain': [0.0, 0.2125], 'matches': 'x'},
               'yaxis': {'anchor': 'x', 'domain': [0.80625, 1.0]},
               'yaxis10': {'anchor': 'x10', 'domain': [0.26875, 0.4625]},
               'yaxis11': {'anchor': 'x11', 'domain': [0.26875, 0.4625]},
               'yaxis12': {'anchor': 'x12', 'domain': [0.26875, 0.4625]},
               'yaxis13': {'anchor': 'x13', 'domain': [0.0, 0.19375]},
               'yaxis14': {'anchor': 'x14', 'domain': [0.0, 0.19375]},
               'yaxis15': {'anchor': 'x15', 'domain': [0.0, 0.19375]},
               'yaxis16': {'anchor': 'x16', 'domain': [0.0, 0.19375]},
               'yaxis2': {'anchor': 'x2', 'domain': [0.80625, 1.0]},
               'yaxis3': {'anchor': 'x3', 'domain': [0.80625, 1.0]},
               'yaxis4': {'anchor': 'x4', 'domain': [0.80625, 1.0]},
               'yaxis5': {'anchor': 'x5', 'domain': [0.5375, 0.73125]},
               'yaxis6': {'anchor': 'x6', 'domain': [0.5375, 0.73125]},
               'yaxis7': {'anchor': 'x7', 'domain': [0.5375, 0.73125]},
               'yaxis8': {'anchor': 'x8', 'domain': [0.5375, 0.73125]},
               'yaxis9': {'anchor': 'x9', 'domain': [0.26875, 0.4625]}}
})

We may also print the fit statistics.

fit_stats

Fit Statistics

fitting methodleastsq
# function evals74
# data points22336
# variables7
chi-square 3.00229805
reduced chi-square 1.3446e-04
Akaike info crit.-199101.992
Bayesian info crit.-199045.894

Variables

name value standard error relative error initial value min max vary
SiO2_n0 1.45244420 5.6882e-04 (0.04%) 1.452 -100.000000 100.000000 True
SiO2_n1 30.6589697 0.54829112 (1.79%) 36.0 -40000.0000 40000.0000 True
SiO2_n2 3.38854508 0.25240360 (7.45%) 0 -40000.0000 40000.0000 True
SiO2_k0 0.00424557 5.7377e-04 (13.51%) 0 -100.000000 100.000000 True
SiO2_k1 -7.47298912 0.91252059 (12.21%) 0 -40000.0000 40000.0000 True
SiO2_k2 3.36208167 0.36154577 (10.75%) 0 -40000.0000 40000.0000 True
SiO2_d 103.609305 0.08909475 (0.09%) 120 0.00000000 40000.0000 True

Correlations (unreported correlations are < 0.100)

SiO2_k1SiO2_k2-0.9754
SiO2_k0SiO2_k1-0.9636
SiO2_n1SiO2_n2-0.9512
SiO2_k0SiO2_d+0.9499
SiO2_n0SiO2_d-0.9490
SiO2_n0SiO2_k0-0.9015
SiO2_k0SiO2_k2+0.8901
SiO2_k1SiO2_d-0.8445
SiO2_n0SiO2_k1+0.8015
SiO2_k2SiO2_d+0.7327
SiO2_n0SiO2_k2-0.6954
SiO2_n1SiO2_d-0.4536
SiO2_n1SiO2_k0-0.4309
SiO2_n1SiO2_k1+0.3831
SiO2_n1SiO2_k2-0.3324
SiO2_n2SiO2_d+0.2233
SiO2_n2SiO2_k0+0.2121
SiO2_n2SiO2_k1-0.1885
SiO2_n2SiO2_k2+0.1636
SiO2_n0SiO2_n1+0.1597


References

Here you can find the latest jupyter notebook and data files of this example.

Total running time of the script: ( 0 minutes 13.550 seconds)