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': '08c26d0e-5c26-4fb7-8561-ca92f03c30d3',
              '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': '760c708d-3a41-43c0-b25e-ffe5a22f6949',
              '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': '5cc1e8c7-cda8-4eb2-bf19-6b54011dec40',
              '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': '63be2a6c-e5c9-4a5e-a9a5-55d93c4a7d82',
              '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': '64aabbd6-3402-45fe-80fd-a181b72e2638',
              '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': 'e81601b1-8b3a-4f4c-8403-2a8e5119fccf',
              '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': '8ca101e3-4bcb-4166-9728-0decccdc9e56',
              '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': 'e53c483e-dcef-41b9-9273-05bd2f3d30e3',
              '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': 'ff27232f-efd7-461c-987e-602ad8bf43aa',
              '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': '7b4a0541-33c1-446e-9a71-9515d87d973c',
              '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': '0db0c66f-cffb-4b03-bd91-90ac27c16a5b',
              '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': '109889b3-c9f4-4094-b2f0-d38f168f6c12',
              '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': '1574074b-2e69-4a05-a88d-2e9f395c4fb0',
              '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': '15a596ae-2f87-4ba5-98b9-3420d3bb8d0a',
              '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': '59d7e61f-1f4f-4b2f-ae53-e33de223c94a',
              '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': '0a9123a8-5d56-44ba-836a-1adeecbe2ab2',
              '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': '09843164-039c-466b-8279-9ab6972e1e34',
              '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': 'e9faa3b5-48dd-4c11-a978-b6f3b791224f',
              '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': '6f53a6ef-0d0e-4334-97d9-c974521cb2fb',
              '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': '8f5c9d33-9f5a-4e6c-9dd5-71430c8283e8',
              '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': '64a14804-b5a4-4f59-a293-8e8f5ab73c44',
              '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': '4f30d052-01ac-4a93-93bf-ec38ccd2e801',
              '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': '6aef04eb-8ec6-4660-b0c7-792e982d4c4b',
              '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': '1e98a295-4734-45e9-b15d-994b7d6b2f60',
              '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': 'd0df2033-2346-4585-b80e-5a30acfbc083',
              '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': '799d615e-f4fd-42a1-8619-2829af54ebff',
              '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': 'b649f057-980a-4a54-bea5-29e3f022cb30',
              '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': 'bf0e412b-9a25-42b1-937d-8fe7f117fff5',
              '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': '305f27f2-d908-4164-b66d-041c72d90845',
              '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': 'c9a37ec8-8ea3-46cf-92bd-5a98eb5ad6f3',
              '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': '0d39475b-ff8c-476c-b9aa-5ce9296b7e4d',
              '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': '11f9c5eb-f423-48da-aceb-6678502721b0',
              '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': '49d8d267-f2ee-45ab-8995-9f01b1de90c7',
              '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': '745b785f-4db7-46c4-b388-3fa9eefe51b1',
              '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': 'd1870160-b737-464e-ba27-e0a62a530745',
              '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': '8d2e2c7c-7fe7-4eaa-b027-accebafb03d2',
              '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': '4e74a73b-2f63-48c9-a53f-667d61e8d669',
              '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': '9482fd3c-5c98-4119-9728-7595dff06cc4',
              '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': 'e8f1c015-8e1c-49ac-9553-b1f52851296c',
              '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': '76454acd-e60e-4ce1-901b-beac503e5c61',
              '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': 'd7064afb-31db-49a7-ad9d-fc70fd7983dc',
              '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': '94bb1666-f82f-4dad-b8b3-9bf97de0592c',
              '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': 'ad891658-27fc-48d4-be8d-57c5090c559a',
              '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': '287f7d07-a23b-47d6-b090-568609add008',
              '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': '8da208c3-5c7a-4f5e-b40e-d2246659943a',
              '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': '3f82382c-a6b2-430a-8629-af380a9e324d',
              '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': 'bcc538f5-8633-4833-af1c-0c324bd30fac',
              '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': '4e0a773a-0b3a-4cf5-8f8c-e3ed3cf67654',
              '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': '86c24e34-1288-4986-acf4-350e52a2f90b',
              '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': '0075c5ca-64dc-4138-8a55-3eff404e4526',
              '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': '5bd432be-1f2c-4ee6-9f17-1d297f3097ec',
              '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': 'a6e1d03b-9ada-4d71-a8ee-9d472199f03b',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x2',
              'y': array([-0.09143062, -0.09723199, -0.10281071, ..., -0.44686441, -0.44736939,
                          -0.44787363]),
              'yaxis': 'y2'},
             {'line': {'color': '#00CC96', 'dash': 'solid'},
              'name': 'M13 ',
              'type': 'scatter',
              'uid': 'ed20ffa5-21ab-4ea5-9658-1c035c7b0389',
              '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': '69a3b80d-0546-4911-bf6e-9c50790b478e',
              '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': '18c02b77-fbb4-4972-8356-5dbfb6d38ac1',
              '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': 'fdfb0581-5b17-4afe-a542-00af2ae6a69e',
              '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': 'c8a5a425-62cd-4f38-89a8-12c6668c5117',
              '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': '66820b2b-d81e-427f-ace5-5f2c362f521e',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x5',
              'y': array([-0.09143062, -0.09723199, -0.10281071, ..., -0.44686441, -0.44736939,
                          -0.44787363]),
              'yaxis': 'y5'},
             {'line': {'color': '#19D3F3', 'dash': 'solid'},
              'name': 'M22 ',
              'type': 'scatter',
              'uid': 'f4c43ecf-63ea-41b4-a373-aaf6cfa7d446',
              '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': '7c76b8c1-4b84-427c-ad41-0df4b5b6fa73',
              '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': '9638fb1d-04e5-4f65-a82e-946bdcc17cbc',
              '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': '00e1de3e-f399-47be-9859-e8b60d8fe4b5',
              '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': '7db4ef1f-d8b4-453b-8d62-35661853215c',
              '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': 'ba815f6c-f4ae-43d8-b011-0c0647cf4ddd',
              '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': 'db750cc7-3c02-40bd-95a8-4a4200ef0d44',
              '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': '3403fff7-40cb-44c9-bf20-87e5e27d5c1f',
              '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': '96baa310-51eb-4883-bc7e-dd7ae1400c2b',
              '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': '9a00e4e1-25cd-4365-8ad4-9f97a05b86a8',
              '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': 'f85d7e5b-f9e4-4943-b89b-cc4233ba4568',
              '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': '88e5be64-8b3c-474e-8048-7bf721a53eb8',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x11',
              'y': array([0.28643693, 0.28502665, 0.28323603, ..., 0.15847452, 0.15831842,
                          0.15816233]),
              'yaxis': 'y11'},
             {'line': {'color': '#EF553B', 'dash': 'solid'},
              'name': 'M34 ',
              'type': 'scatter',
              'uid': '3e56dcea-6ac4-4017-91a2-35b9c107e622',
              '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': '859067f8-e91b-40e0-94de-6678f4e8cb28',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x12',
              'y': array([0.95372655, 0.95357524, 0.95352363, ..., 0.88045331, 0.88022492,
                          0.87999653]),
              'yaxis': 'y12'},
             {'line': {'color': '#00CC96', 'dash': 'solid'},
              'name': 'M41 ',
              'type': 'scatter',
              'uid': 'ca5a2bd8-195f-4c03-ad8d-57d87058d3c3',
              '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': '68144e7c-f893-40b8-9bf9-c102d0c1e043',
              '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': '5513689c-e8c6-45b6-80f5-0f3884aae4fa',
              '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': 'f51f99b9-6235-477b-8880-4a7c65264a07',
              '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': 'fdf37839-873f-41ac-9492-cad2ba6ca3c3',
              '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': '88c691e2-cf3a-4cd2-88f5-94f36650fa11',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x15',
              'y': array([-0.95372655, -0.95357524, -0.95352363, ..., -0.88045331, -0.88022492,
                          -0.87999653]),
              'yaxis': 'y15'},
             {'line': {'color': '#19D3F3', 'dash': 'solid'},
              'name': 'M44 ',
              'type': 'scatter',
              'uid': '9dbf173c-f203-43bb-95c4-11c826265049',
              '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': '8891cece-71cd-4063-8112-79e6557552af',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x16',
              'y': array([0.28643693, 0.28502665, 0.28323603, ..., 0.15847452, 0.15831842,
                          0.15816233]),
              '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': '1600dd70-6d1a-463c-863c-b14bf48e4bb6',
              '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': '8c27797a-32d8-40ff-9175-12bd8b5b747f',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x2',
              'y': array([ 3.93845198e-05,  1.15580079e-02,  3.57928542e-03, ..., -4.41440898e-03,
                          -3.30939187e-03, -4.06362815e-03]),
              'yaxis': 'y2'},
             {'line': {'color': '#00CC96', 'dash': 'solid'},
              'name': 'M13 ',
              'type': 'scatter',
              'uid': '4afc0cd8-b895-4640-98b6-a0ff1abdac45',
              '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': '4ea3182a-6a97-404d-9a83-607bb041637b',
              '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': '70d040ae-6e35-4f87-af2b-74339123098a',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x5',
              'y': array([ 0.00461938,  0.00030801,  0.00479929, ..., -0.00662441, -0.00610939,
                          -0.00652363]),
              'yaxis': 'y5'},
             {'line': {'color': '#19D3F3', 'dash': 'solid'},
              'name': 'M22 ',
              'type': 'scatter',
              'uid': 'fe4d110c-4198-4f0b-96d2-ad8630dd2916',
              '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': 'aa3f824d-75a0-47a1-8d2b-e100bf08da89',
              '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': '6ecc29e9-bdb0-4bb8-9de3-007aca8839b5',
              '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': 'f02da872-5699-4251-952e-01a8a61f2a6a',
              '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': 'fbc8bafc-daab-4dfa-82a1-cbc37a1c2ce5',
              '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': '822ab816-f35c-48a5-a591-507abb420459',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x11',
              'y': array([ 0.01360693,  0.01776665,  0.01043603, ..., -0.00388548, -0.00439158,
                          -0.00438767]),
              'yaxis': 'y11'},
             {'line': {'color': '#EF553B', 'dash': 'solid'},
              'name': 'M34 ',
              'type': 'scatter',
              'uid': '3759d138-7616-46f9-8ba4-5bcd771ed1e9',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x12',
              'y': array([-0.00182345, -0.01092476, -0.00468637, ...,  0.00333331,  0.00393492,
                           0.00338653]),
              'yaxis': 'y12'},
             {'line': {'color': '#00CC96', 'dash': 'solid'},
              'name': 'M41 ',
              'type': 'scatter',
              'uid': 'd9635f5d-9f65-4ae6-bb30-aff34e63cbf7',
              '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': '2207d210-c32d-4ebe-8313-fb3105e64f13',
              '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': '9caf0b26-4392-42d6-9ddb-d7a9b1bed86c',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x15',
              'y': array([ 0.00201345,  0.01541476,  0.00838637, ..., -0.00085331, -0.00115492,
                          -0.00150653]),
              'yaxis': 'y15'},
             {'line': {'color': '#19D3F3', 'dash': 'solid'},
              'name': 'M44 ',
              'type': 'scatter',
              'uid': '8228fe41-696d-4581-a317-03fea5384677',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x16',
              'y': array([ 0.02822693,  0.04070665,  0.03337603, ..., -0.00895548,  0.00726842,
                          -0.00820767]),
              '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 evals107
# data points22336
# variables7
chi-square 3.00228376
reduced chi-square 1.3446e-04
Akaike info crit.-199102.098
Bayesian info crit.-199046.000

Variables

name value standard error relative error initial value min max vary
SiO2_n0 1.45262556 5.7237e-04 (0.04%) 1.452 -100.000000 100.000000 True
SiO2_n1 30.7469740 0.55002475 (1.79%) 36.0 -40000.0000 40000.0000 True
SiO2_n2 3.36773489 0.25275129 (7.51%) 0 -40000.0000 40000.0000 True
SiO2_k0 0.00406055 5.7759e-04 (14.22%) 0 -100.000000 100.000000 True
SiO2_k1 -7.21119208 0.91714583 (12.72%) 0 -40000.0000 40000.0000 True
SiO2_k2 3.27216589 0.36280127 (11.09%) 0 -40000.0000 40000.0000 True
SiO2_d 103.579135 0.08974627 (0.09%) 120 0.00000000 40000.0000 True

Correlations (unreported correlations are < 0.100)

SiO2_k1SiO2_k2-0.9754
SiO2_k0SiO2_k1-0.9639
SiO2_n1SiO2_n2-0.9509
SiO2_k0SiO2_d0.9506
SiO2_n0SiO2_d-0.9496
SiO2_n0SiO2_k0-0.9027
SiO2_k0SiO2_k20.8906
SiO2_k1SiO2_d-0.8461
SiO2_n0SiO2_k10.8035
SiO2_k2SiO2_d0.7347
SiO2_n0SiO2_k2-0.6977
SiO2_n1SiO2_d-0.4583
SiO2_n1SiO2_k0-0.4357
SiO2_n1SiO2_k10.3878
SiO2_n1SiO2_k2-0.3367
SiO2_n2SiO2_d0.2268
SiO2_n2SiO2_k00.2156
SiO2_n2SiO2_k1-0.1919
SiO2_n2SiO2_k20.1667
SiO2_n0SiO2_n10.1667


References

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

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