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': 'd47c0e5d-84e2-4869-bb2c-9fe837689be2',
              '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': '50742c36-8916-4b8a-a584-484fe9b32dd8',
              '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': 'aacd1b18-f291-4549-a6e0-0c545d208e7c',
              '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': '781d5ced-bead-43d2-973e-5364a6b510a4',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x2',
              'y': array([ 0.48855385,  0.48240998,  0.47406745, ..., -0.27742534, -0.27818747,
                          -0.27894785]),
              'yaxis': 'y2'},
             {'line': {'color': '#00CC96', 'dash': 'solid'},
              'name': 'M13 ',
              'type': 'scatter',
              'uid': '970c533f-aeb0-4c55-a1cb-b80c1f5685fb',
              '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': '412bf81a-346e-421f-b9c8-d2215aed8c3d',
              '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': '474be16f-aebb-4a6e-b3fd-baed7787e874',
              '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': 'b6c9ada2-201a-4cbc-ada5-8947775a70f2',
              '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': '3a2667a1-0057-4135-8265-182fe87b7068',
              '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': '4472fc8c-8f1f-4b7b-98e6-17747c63c345',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x5',
              'y': array([ 0.48855385,  0.48240998,  0.47406745, ..., -0.27742534, -0.27818747,
                          -0.27894785]),
              'yaxis': 'y5'},
             {'line': {'color': '#19D3F3', 'dash': 'solid'},
              'name': 'M22 ',
              'type': 'scatter',
              'uid': '1dcfd9dd-3eb9-474d-b112-21a976d4c4d1',
              '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': '094d98e9-26f2-4f13-a182-da9641dcd816',
              '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': '943551b0-59f0-4a66-861a-6a813cb4279f',
              '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': '90ce87c7-21a9-49f0-a80c-3574c99c2389',
              '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': '0a0da01a-f99f-45c1-b81e-039fa59806eb',
              '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': '11d9207e-b5f6-400c-8006-66529b0ffca8',
              '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': '453808a2-1b38-4b94-bf16-12207d05ffe1',
              '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': '59d417a8-d9c0-4644-8a96-5520c5b75cbc',
              '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': '454e3db9-64f9-4e38-949b-bf95d82a69bb',
              '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': '87d9114c-17cd-4555-9aac-c0a01b39cef7',
              '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': 'ecde444c-7bad-413b-9b8e-de2c53da1944',
              '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': 'c59fabd1-62f2-490d-a823-dc550358d4b2',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x11',
              'y': array([-0.78177026, -0.75168899, -0.71871123, ...,  0.20163327,  0.20156999,
                           0.20150625]),
              'yaxis': 'y11'},
             {'line': {'color': '#EF553B', 'dash': 'solid'},
              'name': 'M34 ',
              'type': 'scatter',
              'uid': '14788bca-1bd4-446d-9567-a25207328f25',
              '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': 'af924a2e-2623-4c92-b3f0-86e600faa106',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x12',
              'y': array([0.38749245, 0.44971578, 0.50863958, ..., 0.93935042, 0.93913858,
                          0.93892669]),
              'yaxis': 'y12'},
             {'line': {'color': '#00CC96', 'dash': 'solid'},
              'name': 'M41 ',
              'type': 'scatter',
              'uid': 'eb61bb51-9581-40ed-8c45-67d4a3478285',
              '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': '72dca610-9feb-4a40-a8c3-e6d1eb4b0c2a',
              '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': '8776027e-dd8f-4cc2-97c0-21094c4686a5',
              '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': 'f8769e88-57e0-4505-87da-1479fef9c2d6',
              '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': 'fca9c7a4-1786-4714-a50f-a8fbb3f6d0b8',
              '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': '67e27af6-0b94-45ef-b716-96f850ca3cd5',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x15',
              'y': array([-0.38749245, -0.44971578, -0.50863958, ..., -0.93935042, -0.93913858,
                          -0.93892669]),
              'yaxis': 'y15'},
             {'line': {'color': '#19D3F3', 'dash': 'solid'},
              'name': 'M44 ',
              'type': 'scatter',
              'uid': '39658fae-1306-4d6d-b9b8-7fa111b80a07',
              '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': '6d00bd00-27d5-4845-8e53-0bcd86adb40f',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x16',
              'y': array([-0.78177026, -0.75168899, -0.71871123, ...,  0.20163327,  0.20156999,
                           0.20150625]),
              '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': '090cb66a-ff9d-44d9-92e5-18f5973050c4',
              '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': 'e4918f54-7e90-48e7-b9c5-df7e3a1752f9',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x2',
              'y': array([0.58002385, 0.59119998, 0.58045745, ..., 0.16502466, 0.16587253,
                          0.16486215]),
              'yaxis': 'y2'},
             {'line': {'color': '#00CC96', 'dash': 'solid'},
              'name': 'M13 ',
              'type': 'scatter',
              'uid': '689386d7-33c7-4103-9a98-61d3ce5ae1b4',
              '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': '45266951-6281-4bff-a498-01a144426fd9',
              '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': 'af78a04b-5b00-48f1-9ea7-a1d44caed635',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x5',
              'y': array([0.58460385, 0.57994998, 0.58167745, ..., 0.16281466, 0.16307253,
                          0.16240215]),
              'yaxis': 'y5'},
             {'line': {'color': '#19D3F3', 'dash': 'solid'},
              'name': 'M22 ',
              'type': 'scatter',
              'uid': 'cd53f2db-6d0c-4105-b536-22e4af802cfa',
              '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': '70f44f15-0fa7-4c9e-866e-8741b37c8f27',
              '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': '43fd6aac-b2f9-4135-8649-00e95c9064bb',
              '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': '5fffd6b7-ad3f-403b-9503-613a5ffb4174',
              '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': 'ac17691a-691e-449a-a08b-8b7d7c46dfc2',
              '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': '05229299-2075-4040-a701-e6fa6f285b74',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x11',
              'y': array([-1.05460026, -1.01894899, -0.99151123, ...,  0.03927327,  0.03885999,
                           0.03895625]),
              'yaxis': 'y11'},
             {'line': {'color': '#EF553B', 'dash': 'solid'},
              'name': 'M34 ',
              'type': 'scatter',
              'uid': 'd089370f-8fce-411f-bbab-20764e9bc73d',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x12',
              'y': array([-0.56805755, -0.51478422, -0.44957042, ...,  0.06223042,  0.06284858,
                           0.06231669]),
              'yaxis': 'y12'},
             {'line': {'color': '#00CC96', 'dash': 'solid'},
              'name': 'M41 ',
              'type': 'scatter',
              'uid': '1609e9ef-a8fa-4cb6-98ec-672733a471b9',
              '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': '5407d945-8db7-4b7f-9cbc-db819f949b63',
              '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': 'e24d9b87-6827-4d05-8e5f-9a8e4d132606',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x15',
              'y': array([ 0.56824755,  0.51927422,  0.45327042, ..., -0.05975042, -0.06006858,
                          -0.06043669]),
              'yaxis': 'y15'},
             {'line': {'color': '#19D3F3', 'dash': 'solid'},
              'name': 'M44 ',
              'type': 'scatter',
              'uid': 'e0ad7c59-af7e-42fa-8f31-a713494e5459',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x16',
              'y': array([-1.03998026, -0.99600899, -0.96857123, ...,  0.03420327,  0.05051999,
                           0.03513625]),
              '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': 'e0469c59-33c6-4ca6-8141-55101b1d3e25',
              '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': 'fe0423b9-af84-4933-877f-40eb8e2893df',
              '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': '2c9693be-c7a3-4921-aa62-7194af613c7b',
              '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': '7fe3838d-a0c9-4373-b497-418b5fb0ecd9',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x2',
              'y': array([-0.09081776, -0.09659845, -0.10218436, ..., -0.44726608, -0.44776779,
                          -0.44826863]),
              'yaxis': 'y2'},
             {'line': {'color': '#00CC96', 'dash': 'solid'},
              'name': 'M13 ',
              'type': 'scatter',
              'uid': '3a235c63-37d0-42dc-86c0-a538107a48cb',
              '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': 'c6225481-2446-46f6-94e2-2dcb3401b4a3',
              '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': '7bbe10c3-2d44-4a3f-a0d7-ff4f84193c54',
              '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': '2c828d49-60dc-43bf-bad4-6a8665a19c5a',
              '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': '8c1e3365-3674-4099-89f5-871b13b3d48e',
              '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': '91d8dc4e-418c-46d6-98e1-6375d81868b6',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x5',
              'y': array([-0.09081776, -0.09659845, -0.10218436, ..., -0.44726608, -0.44776779,
                          -0.44826863]),
              'yaxis': 'y5'},
             {'line': {'color': '#19D3F3', 'dash': 'solid'},
              'name': 'M22 ',
              'type': 'scatter',
              'uid': '18dadd40-40fb-4160-8591-1c523226583a',
              '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': '2882408c-a752-4e9a-af7d-bd3c51b82898',
              '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': '01d5f28f-bdd7-4ec9-a49b-1abffb92aad7',
              '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': '5ae6d370-5df0-4400-bdc1-ecbd98ac31b9',
              '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': 'e06bfb87-6bbc-4f89-83ea-2a6fb27ab142',
              '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': '0b92ca83-9764-4eb4-8bbf-66ff2a1e853e',
              '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': 'a1f8a5ac-258e-4124-bff3-a3d58451f3bd',
              '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': '2a686aab-2485-4ac5-a3c7-b93d9f6345d4',
              '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': '46c8b2ac-9bf2-4448-be33-183071d87464',
              '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': '099e893d-13cf-4647-8d55-2d2dc60b5d1f',
              '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': 'f622bfbd-6252-4edb-8d32-fd4d6d9757fe',
              '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': '5e647dc7-a7ba-4ac9-9ae5-a5781d01ebfd',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x11',
              'y': array([0.28633493, 0.28495866, 0.28318747, ..., 0.15873433, 0.1585769 ,
                          0.15841941]),
              'yaxis': 'y11'},
             {'line': {'color': '#EF553B', 'dash': 'solid'},
              'name': 'M34 ',
              'type': 'scatter',
              'uid': '36eea1fd-860b-45a9-91e9-a99e94a39bc2',
              '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': '0cc260e1-90ab-4f21-b3da-65179a4268df',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x12',
              'y': array([0.95381573, 0.95365995, 0.95360538, ..., 0.88020251, 0.87997578,
                          0.87974912]),
              'yaxis': 'y12'},
             {'line': {'color': '#00CC96', 'dash': 'solid'},
              'name': 'M41 ',
              'type': 'scatter',
              'uid': 'ada11795-1083-4312-b95d-0bd72986473f',
              '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': 'a1c460ee-db34-4eb6-8986-cbaf736edce1',
              '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': 'd79924e3-be01-4bd9-85f1-7bca711d0cf4',
              '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': '71a5283b-b598-40d7-a358-5f49be1562e5',
              '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': '3c0976ea-c644-4d66-a1fe-f9f2f7828639',
              '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': '9334a4a8-1bb7-4f14-9927-dfff9879e8dc',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x15',
              'y': array([-0.95381573, -0.95365995, -0.95360538, ..., -0.88020251, -0.87997578,
                          -0.87974912]),
              'yaxis': 'y15'},
             {'line': {'color': '#19D3F3', 'dash': 'solid'},
              'name': 'M44 ',
              'type': 'scatter',
              'uid': '4bc72ecb-5243-4392-ad88-f2b0be5f6252',
              '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': '09e3c786-4b7d-4e36-adf3-2a87ff964701',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x16',
              'y': array([0.28633493, 0.28495866, 0.28318747, ..., 0.15873433, 0.1585769 ,
                          0.15841941]),
              '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': 'ce089e68-1426-4753-9389-433ba47ae31c',
              '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': 'e5793042-20c8-44d4-ab85-2c0bdccd3e0f',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x2',
              'y': array([ 0.00065224,  0.01219155,  0.00420564, ..., -0.00481608, -0.00370779,
                          -0.00445863]),
              'yaxis': 'y2'},
             {'line': {'color': '#00CC96', 'dash': 'solid'},
              'name': 'M13 ',
              'type': 'scatter',
              'uid': '03a6ce23-aaa9-47d1-93eb-c2d68c91c287',
              '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': '0f4b5c7d-2061-4442-acf9-fac2484225ec',
              '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': 'a6eef3bc-8ebf-4f06-a5a3-fa7a88564f22',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x5',
              'y': array([ 0.00523224,  0.00094155,  0.00542564, ..., -0.00702608, -0.00650779,
                          -0.00691863]),
              'yaxis': 'y5'},
             {'line': {'color': '#19D3F3', 'dash': 'solid'},
              'name': 'M22 ',
              'type': 'scatter',
              'uid': '94491c26-9d8f-476b-82f1-ebf98be36a56',
              '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': '96ec90d5-2354-44ea-ac17-92d2764ff5b4',
              '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': 'ef537ecc-f16d-4bf9-8bc0-d0a1eb0a251d',
              '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': 'c8a2f702-f0e0-47e9-8687-303e9efb6fc0',
              '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': 'c8bc09ea-ccee-448a-8b90-6428c49436b3',
              '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': 'b02f555a-3d0c-492f-bdac-f246e0d2fe8a',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x11',
              'y': array([ 0.01350493,  0.01769866,  0.01038747, ..., -0.00362567, -0.0041331 ,
                          -0.00413059]),
              'yaxis': 'y11'},
             {'line': {'color': '#EF553B', 'dash': 'solid'},
              'name': 'M34 ',
              'type': 'scatter',
              'uid': 'a4deec58-1f85-4ea6-929c-c2cc47359e94',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x12',
              'y': array([-0.00173427, -0.01084005, -0.00460462, ...,  0.00308251,  0.00368578,
                           0.00313912]),
              'yaxis': 'y12'},
             {'line': {'color': '#00CC96', 'dash': 'solid'},
              'name': 'M41 ',
              'type': 'scatter',
              'uid': '62b19596-6fff-4787-bccd-8dba772586ab',
              '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': '4a978f18-5cf2-41ac-a7e6-fd1e35bba488',
              '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': '67f3504a-6332-4589-af46-c9549c82d39c',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x15',
              'y': array([ 0.00192427,  0.01533005,  0.00830462, ..., -0.00060251, -0.00090578,
                          -0.00125912]),
              'yaxis': 'y15'},
             {'line': {'color': '#19D3F3', 'dash': 'solid'},
              'name': 'M44 ',
              'type': 'scatter',
              'uid': '8cd4ee89-b49b-4fe0-bf9f-f7e1294f53c7',
              'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528]),
              'xaxis': 'x16',
              'y': array([ 0.02812493,  0.04063866,  0.03332747, ..., -0.00869567,  0.0075269 ,
                          -0.00795059]),
              '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 2.99332582
reduced chi-square 1.3406e-04
Akaike info crit.-199168.842
Bayesian info crit.-199112.744

Variables

name value standard error relative error initial value min max vary
SiO2_n0 1.45182886 5.6718e-04 (0.04%) 1.452 -100.000000 100.000000 True
SiO2_n1 29.9761798 0.54615239 (1.82%) 36.0 -40000.0000 40000.0000 True
SiO2_n2 3.65209263 0.25167507 (6.89%) 0 -40000.0000 40000.0000 True
SiO2_k0 0.00516714 5.7022e-04 (11.04%) 0 -100.000000 100.000000 True
SiO2_k1 -8.71330218 0.90760704 (10.42%) 0 -40000.0000 40000.0000 True
SiO2_k2 3.73975821 0.35994109 (9.62%) 0 -40000.0000 40000.0000 True
SiO2_d 103.730183 0.08896409 (0.09%) 120 0.00000000 40000.0000 True

Correlations (unreported correlations are < 0.100)

SiO2_k1SiO2_k2-0.9753
SiO2_k0SiO2_k1-0.9634
SiO2_n1SiO2_n2-0.9513
SiO2_k0SiO2_d+0.9496
SiO2_n0SiO2_d-0.9490
SiO2_n0SiO2_k0-0.9011
SiO2_k0SiO2_k2+0.8896
SiO2_k1SiO2_d-0.8436
SiO2_n0SiO2_k1+0.8005
SiO2_k2SiO2_d+0.7314
SiO2_n0SiO2_k2-0.6941
SiO2_n1SiO2_d-0.4512
SiO2_n1SiO2_k0-0.4284
SiO2_n1SiO2_k1+0.3806
SiO2_n1SiO2_k2-0.3300
SiO2_n2SiO2_d+0.2208
SiO2_n2SiO2_k0+0.2097
SiO2_n2SiO2_k1-0.1862
SiO2_n2SiO2_k2+0.1615
SiO2_n0SiO2_n1+0.1569


References

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

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