Note
Go to the end to download the full example code.
Mueller matrix
Exemplary fit of the complete Mueller matrix of 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.
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': '90784be1-469c-479f-8f68-b5a63635a659',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x',
'y': array([1., 1., 1., ..., 1., 1., 1.], shape=(1396,)),
'yaxis': 'y'},
{'line': {'color': '#636EFA', 'dash': 'dash'},
'name': 'M11 theory',
'type': 'scatter',
'uid': 'c7195366-e1ad-4372-9e7b-6c9d07f19615',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x',
'y': array([1., 1., 1., ..., 1., 1., 1.], shape=(1396,)),
'yaxis': 'y'},
{'line': {'color': '#EF553B', 'dash': 'solid'},
'name': 'M12 ',
'type': 'scatter',
'uid': 'f47a1ceb-e290-40fb-8a50-2f5519e3681e',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x2',
'y': array([-0.09147, -0.10879, -0.10639, ..., -0.44245, -0.44406, -0.44381],
shape=(1396,)),
'yaxis': 'y2'},
{'line': {'color': '#EF553B', 'dash': 'dash'},
'name': 'M12 theory',
'type': 'scatter',
'uid': '924b19f1-5357-42d2-916a-75724de869aa',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x2',
'y': array([ 0.48855385, 0.48240998, 0.47406745, ..., -0.27742534, -0.27818747,
-0.27894785], shape=(1396,)),
'yaxis': 'y2'},
{'line': {'color': '#00CC96', 'dash': 'solid'},
'name': 'M13 ',
'type': 'scatter',
'uid': '14c69572-558e-4a67-a81a-d012a1848392',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x3',
'y': array([-0.01241, -0.01151, -0.00694, ..., 0.00887, -0.00646, 0.0117 ],
shape=(1396,)),
'yaxis': 'y3'},
{'line': {'color': '#00CC96', 'dash': 'dash'},
'name': 'M13 theory',
'type': 'scatter',
'uid': '3ff84d0f-3199-4e93-82a8-178b6a8fcc58',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x3',
'y': array([0., 0., 0., ..., 0., 0., 0.], shape=(1396,)),
'yaxis': 'y3'},
{'line': {'color': '#AB63FA', 'dash': 'solid'},
'name': 'M14 ',
'type': 'scatter',
'uid': '7ca34b39-274f-46c2-a344-b1f4ac5f32b1',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x4',
'y': array([-0.00614, -0.00901, -0.00475, ..., 0.00626, -0.0061 , 0.0055 ],
shape=(1396,)),
'yaxis': 'y4'},
{'line': {'color': '#AB63FA', 'dash': 'dash'},
'name': 'M14 theory',
'type': 'scatter',
'uid': '58934213-38cf-45f0-a58d-d5c6754ec26c',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x4',
'y': array([0., 0., 0., ..., 0., 0., 0.], shape=(1396,)),
'yaxis': 'y4'},
{'line': {'color': '#FFA15A', 'dash': 'solid'},
'name': 'M21 ',
'type': 'scatter',
'uid': 'f23fcbb8-3b31-44c4-a805-4719864860b5',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x5',
'y': array([-0.09605, -0.09754, -0.10761, ..., -0.44024, -0.44126, -0.44135],
shape=(1396,)),
'yaxis': 'y5'},
{'line': {'color': '#FFA15A', 'dash': 'dash'},
'name': 'M21 theory',
'type': 'scatter',
'uid': 'd8d2506b-9eb1-422a-9a5a-2038ddf6c260',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x5',
'y': array([ 0.48855385, 0.48240998, 0.47406745, ..., -0.27742534, -0.27818747,
-0.27894785], shape=(1396,)),
'yaxis': 'y5'},
{'line': {'color': '#19D3F3', 'dash': 'solid'},
'name': 'M22 ',
'type': 'scatter',
'uid': '32398167-fefc-4743-9a35-1c3f64a005db',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x6',
'y': array([0.99426, 0.99475, 0.99637, ..., 0.99723, 0.99661, 0.99606],
shape=(1396,)),
'yaxis': 'y6'},
{'line': {'color': '#19D3F3', 'dash': 'dash'},
'name': 'M22 theory',
'type': 'scatter',
'uid': '3740b17b-b49c-478d-ae28-7e7f03c44816',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x6',
'y': array([1., 1., 1., ..., 1., 1., 1.], shape=(1396,)),
'yaxis': 'y6'},
{'line': {'color': '#FF6692', 'dash': 'solid'},
'name': 'M23 ',
'type': 'scatter',
'uid': '696736b0-5fbb-473f-8659-8ccf3a08ae5c',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x7',
'y': array([-0.00364, -0.00427, -0.00207, ..., -0.00457, 0.00234, -0.00653],
shape=(1396,)),
'yaxis': 'y7'},
{'line': {'color': '#FF6692', 'dash': 'dash'},
'name': 'M23 theory',
'type': 'scatter',
'uid': '61445fc1-4302-4c9b-9bb4-4b75a2f91178',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x7',
'y': array([0., 0., 0., ..., 0., 0., 0.], shape=(1396,)),
'yaxis': 'y7'},
{'line': {'color': '#B6E880', 'dash': 'solid'},
'name': 'M24 ',
'type': 'scatter',
'uid': '3972aae5-7230-491c-8fec-fd8fc593af5e',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x8',
'y': array([ 0.01084, -0.00325, 0.01123, ..., -0.00263, 0.00227, -0.00311],
shape=(1396,)),
'yaxis': 'y8'},
{'line': {'color': '#B6E880', 'dash': 'dash'},
'name': 'M24 theory',
'type': 'scatter',
'uid': 'f989fc2b-8d15-48d3-81e0-48153bee89de',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x8',
'y': array([0., 0., 0., ..., 0., 0., 0.], shape=(1396,)),
'yaxis': 'y8'},
{'line': {'color': '#FF97FF', 'dash': 'solid'},
'name': 'M31 ',
'type': 'scatter',
'uid': '5e37386c-e051-47c1-9c93-2c3a0d3b6572',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x9',
'y': array([-0.00278, -0.00634, -0.00219, ..., 0.00055, -0.00105, 0.00037],
shape=(1396,)),
'yaxis': 'y9'},
{'line': {'color': '#FF97FF', 'dash': 'dash'},
'name': 'M31 theory',
'type': 'scatter',
'uid': '6bbc12ac-4160-4f75-858c-9e8cc791281b',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x9',
'y': array([0., 0., 0., ..., 0., 0., 0.], shape=(1396,)),
'yaxis': 'y9'},
{'line': {'color': '#FECB52', 'dash': 'solid'},
'name': 'M32 ',
'type': 'scatter',
'uid': '541668ff-901a-47c3-b586-7b62270a72e9',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x10',
'y': array([-0.00212, -0.00045, 0.0003 , ..., -0.0018 , -0.00042, 0.00037],
shape=(1396,)),
'yaxis': 'y10'},
{'line': {'color': '#FECB52', 'dash': 'dash'},
'name': 'M32 theory',
'type': 'scatter',
'uid': 'c7a696df-baae-44ab-a358-5d3111b483d0',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x10',
'y': array([0., 0., 0., ..., 0., 0., 0.], shape=(1396,)),
'yaxis': 'y10'},
{'line': {'color': '#636EFA', 'dash': 'solid'},
'name': 'M33 ',
'type': 'scatter',
'uid': 'f0bd80ab-b776-4332-9d2a-5103b467bf20',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x11',
'y': array([0.27283, 0.26726, 0.2728 , ..., 0.16236, 0.16271, 0.16255],
shape=(1396,)),
'yaxis': 'y11'},
{'line': {'color': '#636EFA', 'dash': 'dash'},
'name': 'M33 theory',
'type': 'scatter',
'uid': '697ecf66-24c1-4905-be63-7e4f92b4f9b7',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x11',
'y': array([-0.78177026, -0.75168899, -0.71871123, ..., 0.20163327, 0.20156999,
0.20150625], shape=(1396,)),
'yaxis': 'y11'},
{'line': {'color': '#EF553B', 'dash': 'solid'},
'name': 'M34 ',
'type': 'scatter',
'uid': 'f69d33d7-6a7f-47cd-b9c2-0b88fc168e0a',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x12',
'y': array([0.95555, 0.9645 , 0.95821, ..., 0.87712, 0.87629, 0.87661],
shape=(1396,)),
'yaxis': 'y12'},
{'line': {'color': '#EF553B', 'dash': 'dash'},
'name': 'M34 theory',
'type': 'scatter',
'uid': '9732d9f7-cbb4-4a43-9382-646aeb9a99b1',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x12',
'y': array([-0.38749245, -0.44971578, -0.50863958, ..., -0.93935042, -0.93913858,
-0.93892669], shape=(1396,)),
'yaxis': 'y12'},
{'line': {'color': '#00CC96', 'dash': 'solid'},
'name': 'M41 ',
'type': 'scatter',
'uid': '649e6a1c-c4a6-45fa-baf2-2c254e4c2397',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x13',
'y': array([ 0.00986, 0.00917, 0.00712, ..., -0.00585, 0.00882, -0.00692],
shape=(1396,)),
'yaxis': 'y13'},
{'line': {'color': '#00CC96', 'dash': 'dash'},
'name': 'M41 theory',
'type': 'scatter',
'uid': '0a2c8cf7-5717-4c89-ac7e-bfc94342d49f',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x13',
'y': array([0., 0., 0., ..., 0., 0., 0.], shape=(1396,)),
'yaxis': 'y13'},
{'line': {'color': '#AB63FA', 'dash': 'solid'},
'name': 'M42 ',
'type': 'scatter',
'uid': '9a66fe6f-602a-4092-bc75-5d533ee76afb',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x14',
'y': array([ 0.00048, 0.01319, 0.00891, ..., -0.01388, 0.00424, -0.0126 ],
shape=(1396,)),
'yaxis': 'y14'},
{'line': {'color': '#AB63FA', 'dash': 'dash'},
'name': 'M42 theory',
'type': 'scatter',
'uid': '2185983f-65bd-40ca-9c01-56cbf4f80f0c',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x14',
'y': array([0., 0., 0., ..., 0., 0., 0.], shape=(1396,)),
'yaxis': 'y14'},
{'line': {'color': '#FFA15A', 'dash': 'solid'},
'name': 'M43 ',
'type': 'scatter',
'uid': '8255b513-e55e-4c98-acf5-9013d97f3d62',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x15',
'y': array([-0.95574, -0.96899, -0.96191, ..., -0.8796 , -0.87907, -0.87849],
shape=(1396,)),
'yaxis': 'y15'},
{'line': {'color': '#FFA15A', 'dash': 'dash'},
'name': 'M43 theory',
'type': 'scatter',
'uid': 'd87bcded-16f5-45f5-941b-b666a48c16d5',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x15',
'y': array([0.38749245, 0.44971578, 0.50863958, ..., 0.93935042, 0.93913858,
0.93892669], shape=(1396,)),
'yaxis': 'y15'},
{'line': {'color': '#19D3F3', 'dash': 'solid'},
'name': 'M44 ',
'type': 'scatter',
'uid': '898c9001-5ed7-4e6d-9875-0488c64abd37',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x16',
'y': array([0.25821, 0.24432, 0.24986, ..., 0.16743, 0.15105, 0.16637],
shape=(1396,)),
'yaxis': 'y16'},
{'line': {'color': '#19D3F3', 'dash': 'dash'},
'name': 'M44 theory',
'type': 'scatter',
'uid': '64a8e1a1-ff6d-45f5-a1d7-0eca9ec1b9a5',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x16',
'y': array([-0.78177026, -0.75168899, -0.71871123, ..., 0.20163327, 0.20156999,
0.20150625], shape=(1396,)),
'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': 'a32e213d-6901-48fd-934a-87127783b539',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x',
'y': array([0., 0., 0., ..., 0., 0., 0.], shape=(1396,)),
'yaxis': 'y'},
{'line': {'color': '#EF553B', 'dash': 'solid'},
'name': 'M12 ',
'type': 'scatter',
'uid': '8c449760-fe97-4e5c-baee-56968ae68194',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x2',
'y': array([0.58002385, 0.59119998, 0.58045745, ..., 0.16502466, 0.16587253,
0.16486215], shape=(1396,)),
'yaxis': 'y2'},
{'line': {'color': '#00CC96', 'dash': 'solid'},
'name': 'M13 ',
'type': 'scatter',
'uid': 'e0459f12-fd28-4228-8070-483b61aee5b2',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x3',
'y': array([ 0.01241, 0.01151, 0.00694, ..., -0.00887, 0.00646, -0.0117 ],
shape=(1396,)),
'yaxis': 'y3'},
{'line': {'color': '#AB63FA', 'dash': 'solid'},
'name': 'M14 ',
'type': 'scatter',
'uid': '97e12aaf-cf59-41b1-a18d-e06889046ef9',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x4',
'y': array([ 0.00614, 0.00901, 0.00475, ..., -0.00626, 0.0061 , -0.0055 ],
shape=(1396,)),
'yaxis': 'y4'},
{'line': {'color': '#FFA15A', 'dash': 'solid'},
'name': 'M21 ',
'type': 'scatter',
'uid': 'dc23b433-1952-4c13-87f6-d18d28b7d8b5',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x5',
'y': array([0.58460385, 0.57994998, 0.58167745, ..., 0.16281466, 0.16307253,
0.16240215], shape=(1396,)),
'yaxis': 'y5'},
{'line': {'color': '#19D3F3', 'dash': 'solid'},
'name': 'M22 ',
'type': 'scatter',
'uid': '1962e79d-ca20-492f-b569-388886f2b1d9',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x6',
'y': array([0.00574, 0.00525, 0.00363, ..., 0.00277, 0.00339, 0.00394],
shape=(1396,)),
'yaxis': 'y6'},
{'line': {'color': '#FF6692', 'dash': 'solid'},
'name': 'M23 ',
'type': 'scatter',
'uid': '2d6d19e5-6d0c-4742-accf-68c11df56d3f',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x7',
'y': array([ 0.00364, 0.00427, 0.00207, ..., 0.00457, -0.00234, 0.00653],
shape=(1396,)),
'yaxis': 'y7'},
{'line': {'color': '#B6E880', 'dash': 'solid'},
'name': 'M24 ',
'type': 'scatter',
'uid': '23af9941-f2d9-439b-8816-daabca4160a5',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x8',
'y': array([-0.01084, 0.00325, -0.01123, ..., 0.00263, -0.00227, 0.00311],
shape=(1396,)),
'yaxis': 'y8'},
{'line': {'color': '#FF97FF', 'dash': 'solid'},
'name': 'M31 ',
'type': 'scatter',
'uid': 'e39b4c90-ef7e-47c0-8ac8-415c8b71a662',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x9',
'y': array([ 0.00278, 0.00634, 0.00219, ..., -0.00055, 0.00105, -0.00037],
shape=(1396,)),
'yaxis': 'y9'},
{'line': {'color': '#FECB52', 'dash': 'solid'},
'name': 'M32 ',
'type': 'scatter',
'uid': '4927979f-364f-47d6-adad-052ac846575f',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x10',
'y': array([ 0.00212, 0.00045, -0.0003 , ..., 0.0018 , 0.00042, -0.00037],
shape=(1396,)),
'yaxis': 'y10'},
{'line': {'color': '#636EFA', 'dash': 'solid'},
'name': 'M33 ',
'type': 'scatter',
'uid': '8f02387b-7de3-4d76-bd43-4658a0d914ee',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x11',
'y': array([-1.05460026, -1.01894899, -0.99151123, ..., 0.03927327, 0.03885999,
0.03895625], shape=(1396,)),
'yaxis': 'y11'},
{'line': {'color': '#EF553B', 'dash': 'solid'},
'name': 'M34 ',
'type': 'scatter',
'uid': 'c0585100-05c1-4beb-8e73-308ac2fb5f56',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x12',
'y': array([-1.34304245, -1.41421578, -1.46684958, ..., -1.81647042, -1.81542858,
-1.81553669], shape=(1396,)),
'yaxis': 'y12'},
{'line': {'color': '#00CC96', 'dash': 'solid'},
'name': 'M41 ',
'type': 'scatter',
'uid': '4c5b270f-f660-4dec-b431-b2485bee549e',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x13',
'y': array([-0.00986, -0.00917, -0.00712, ..., 0.00585, -0.00882, 0.00692],
shape=(1396,)),
'yaxis': 'y13'},
{'line': {'color': '#AB63FA', 'dash': 'solid'},
'name': 'M42 ',
'type': 'scatter',
'uid': '0c71e8d2-e303-4b91-a14d-e80749a967e2',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x14',
'y': array([-0.00048, -0.01319, -0.00891, ..., 0.01388, -0.00424, 0.0126 ],
shape=(1396,)),
'yaxis': 'y14'},
{'line': {'color': '#FFA15A', 'dash': 'solid'},
'name': 'M43 ',
'type': 'scatter',
'uid': '4d36a4fd-9e91-47e0-96f0-708b5e3d29c0',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x15',
'y': array([1.34323245, 1.41870578, 1.47054958, ..., 1.81895042, 1.81820858,
1.81741669], shape=(1396,)),
'yaxis': 'y15'},
{'line': {'color': '#19D3F3', 'dash': 'solid'},
'name': 'M44 ',
'type': 'scatter',
'uid': 'b052de27-ee97-406f-85f0-9efa22e272c0',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x16',
'y': array([-1.03998026, -0.99600899, -0.96857123, ..., 0.03420327, 0.05051999,
0.03513625], shape=(1396,)),
'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': '704e3c04-b401-483d-a5b2-0da6878c8491',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x',
'y': array([1., 1., 1., ..., 1., 1., 1.], shape=(1396,)),
'yaxis': 'y'},
{'line': {'color': '#636EFA', 'dash': 'dash'},
'name': 'M11 theory',
'type': 'scatter',
'uid': '5b0b60c4-03e3-4d0f-bfaa-8fdadd1da8a6',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x',
'y': array([1., 1., 1., ..., 1., 1., 1.], shape=(1396,)),
'yaxis': 'y'},
{'line': {'color': '#EF553B', 'dash': 'solid'},
'name': 'M12 ',
'type': 'scatter',
'uid': 'b39107e9-ef2b-4f55-83bc-ff8ec69a219e',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x2',
'y': array([-0.09147, -0.10879, -0.10639, ..., -0.44245, -0.44406, -0.44381],
shape=(1396,)),
'yaxis': 'y2'},
{'line': {'color': '#EF553B', 'dash': 'dash'},
'name': 'M12 theory',
'type': 'scatter',
'uid': '5f4c5a22-c530-4bc0-9f8e-c859c5fd6b02',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x2',
'y': array([ 0.32520193, 0.2215645 , 0.18028291, ..., -0.27909354, -0.27826667,
-0.27743397], shape=(1396,)),
'yaxis': 'y2'},
{'line': {'color': '#00CC96', 'dash': 'solid'},
'name': 'M13 ',
'type': 'scatter',
'uid': 'a9e48d0e-0c8f-49fb-a70b-3a60afef657d',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x3',
'y': array([-0.01241, -0.01151, -0.00694, ..., 0.00887, -0.00646, 0.0117 ],
shape=(1396,)),
'yaxis': 'y3'},
{'line': {'color': '#00CC96', 'dash': 'dash'},
'name': 'M13 theory',
'type': 'scatter',
'uid': '77d0bd7a-bbd8-446b-a1ce-786526643bc6',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x3',
'y': array([0., 0., 0., ..., 0., 0., 0.], shape=(1396,)),
'yaxis': 'y3'},
{'line': {'color': '#AB63FA', 'dash': 'solid'},
'name': 'M14 ',
'type': 'scatter',
'uid': '942991da-e524-4544-95e8-cd1e665dd594',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x4',
'y': array([-0.00614, -0.00901, -0.00475, ..., 0.00626, -0.0061 , 0.0055 ],
shape=(1396,)),
'yaxis': 'y4'},
{'line': {'color': '#AB63FA', 'dash': 'dash'},
'name': 'M14 theory',
'type': 'scatter',
'uid': 'ed645a56-0414-4a80-b65d-d77379a7fe5a',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x4',
'y': array([0., 0., 0., ..., 0., 0., 0.], shape=(1396,)),
'yaxis': 'y4'},
{'line': {'color': '#FFA15A', 'dash': 'solid'},
'name': 'M21 ',
'type': 'scatter',
'uid': 'bcb762ce-b279-495c-b971-01514d5b30c4',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x5',
'y': array([-0.09605, -0.09754, -0.10761, ..., -0.44024, -0.44126, -0.44135],
shape=(1396,)),
'yaxis': 'y5'},
{'line': {'color': '#FFA15A', 'dash': 'dash'},
'name': 'M21 theory',
'type': 'scatter',
'uid': 'e8502cb6-f04f-47c4-a4be-05c4107e507f',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x5',
'y': array([ 0.32520193, 0.2215645 , 0.18028291, ..., -0.27909354, -0.27826667,
-0.27743397], shape=(1396,)),
'yaxis': 'y5'},
{'line': {'color': '#19D3F3', 'dash': 'solid'},
'name': 'M22 ',
'type': 'scatter',
'uid': 'b8afbf18-5124-4ea5-8030-d0fd6edc0e84',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x6',
'y': array([0.99426, 0.99475, 0.99637, ..., 0.99723, 0.99661, 0.99606],
shape=(1396,)),
'yaxis': 'y6'},
{'line': {'color': '#19D3F3', 'dash': 'dash'},
'name': 'M22 theory',
'type': 'scatter',
'uid': '6fd48627-5cfe-4581-8ce7-c29b4d2910ad',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x6',
'y': array([1., 1., 1., ..., 1., 1., 1.], shape=(1396,)),
'yaxis': 'y6'},
{'line': {'color': '#FF6692', 'dash': 'solid'},
'name': 'M23 ',
'type': 'scatter',
'uid': '03084866-ddd3-405a-b886-5c90c84dd218',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x7',
'y': array([-0.00364, -0.00427, -0.00207, ..., -0.00457, 0.00234, -0.00653],
shape=(1396,)),
'yaxis': 'y7'},
{'line': {'color': '#FF6692', 'dash': 'dash'},
'name': 'M23 theory',
'type': 'scatter',
'uid': '9ba36af2-230c-4c11-84c2-fdb01f8e4cfd',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x7',
'y': array([0., 0., 0., ..., 0., 0., 0.], shape=(1396,)),
'yaxis': 'y7'},
{'line': {'color': '#B6E880', 'dash': 'solid'},
'name': 'M24 ',
'type': 'scatter',
'uid': '80029cda-d589-4b7a-bf07-6035cf7d75db',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x8',
'y': array([ 0.01084, -0.00325, 0.01123, ..., -0.00263, 0.00227, -0.00311],
shape=(1396,)),
'yaxis': 'y8'},
{'line': {'color': '#B6E880', 'dash': 'dash'},
'name': 'M24 theory',
'type': 'scatter',
'uid': '0cb13e74-023d-41a1-8a07-fa3d6790528d',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x8',
'y': array([0., 0., 0., ..., 0., 0., 0.], shape=(1396,)),
'yaxis': 'y8'},
{'line': {'color': '#FF97FF', 'dash': 'solid'},
'name': 'M31 ',
'type': 'scatter',
'uid': '2a0c1a13-113c-48c1-808a-492d6d1d427c',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x9',
'y': array([-0.00278, -0.00634, -0.00219, ..., 0.00055, -0.00105, 0.00037],
shape=(1396,)),
'yaxis': 'y9'},
{'line': {'color': '#FF97FF', 'dash': 'dash'},
'name': 'M31 theory',
'type': 'scatter',
'uid': '1ae8829d-ae66-48b5-9b59-3b3134f48291',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x9',
'y': array([0., 0., 0., ..., 0., 0., 0.], shape=(1396,)),
'yaxis': 'y9'},
{'line': {'color': '#FECB52', 'dash': 'solid'},
'name': 'M32 ',
'type': 'scatter',
'uid': '1913fec7-b72b-4266-b0a1-5d657d3d82ea',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x10',
'y': array([-0.00212, -0.00045, 0.0003 , ..., -0.0018 , -0.00042, 0.00037],
shape=(1396,)),
'yaxis': 'y10'},
{'line': {'color': '#FECB52', 'dash': 'dash'},
'name': 'M32 theory',
'type': 'scatter',
'uid': '2b24cc5e-80c9-46f4-a2c1-996e24845d47',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x10',
'y': array([0., 0., 0., ..., 0., 0., 0.], shape=(1396,)),
'yaxis': 'y10'},
{'line': {'color': '#636EFA', 'dash': 'solid'},
'name': 'M33 ',
'type': 'scatter',
'uid': 'e5cd2ed8-4e79-4865-856b-d8e9a9a78067',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x11',
'y': array([0.27283, 0.26726, 0.2728 , ..., 0.16236, 0.16271, 0.16255],
shape=(1396,)),
'yaxis': 'y11'},
{'line': {'color': '#636EFA', 'dash': 'dash'},
'name': 'M33 theory',
'type': 'scatter',
'uid': '283b88b0-6a72-4506-97ff-c0a637a2f71a',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x11',
'y': array([-0.83818395, -0.95463751, -0.98240665, ..., 0.35365557, 0.35463045,
0.35560861], shape=(1396,)),
'yaxis': 'y11'},
{'line': {'color': '#EF553B', 'dash': 'solid'},
'name': 'M34 ',
'type': 'scatter',
'uid': 'c485a177-adc1-482e-a4d1-3cd9107fc5f2',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x12',
'y': array([0.95555, 0.9645 , 0.95821, ..., 0.87712, 0.87629, 0.87661],
shape=(1396,)),
'yaxis': 'y12'},
{'line': {'color': '#EF553B', 'dash': 'dash'},
'name': 'M34 theory',
'type': 'scatter',
'uid': '74f8bb7f-2c6b-4cac-817c-2429846502d3',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x12',
'y': array([-0.43782573, -0.19893818, 0.04873646, ..., 0.89276791, 0.89263929,
0.89250933], shape=(1396,)),
'yaxis': 'y12'},
{'line': {'color': '#00CC96', 'dash': 'solid'},
'name': 'M41 ',
'type': 'scatter',
'uid': '5ec5e0f3-6c3d-4dcd-aace-b6650292369c',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x13',
'y': array([ 0.00986, 0.00917, 0.00712, ..., -0.00585, 0.00882, -0.00692],
shape=(1396,)),
'yaxis': 'y13'},
{'line': {'color': '#00CC96', 'dash': 'dash'},
'name': 'M41 theory',
'type': 'scatter',
'uid': 'a306c66a-c6d4-462a-8a89-c4e8ca2ad8bc',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x13',
'y': array([0., 0., 0., ..., 0., 0., 0.], shape=(1396,)),
'yaxis': 'y13'},
{'line': {'color': '#AB63FA', 'dash': 'solid'},
'name': 'M42 ',
'type': 'scatter',
'uid': '32e42bfa-c368-40d4-a860-099d587cb200',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x14',
'y': array([ 0.00048, 0.01319, 0.00891, ..., -0.01388, 0.00424, -0.0126 ],
shape=(1396,)),
'yaxis': 'y14'},
{'line': {'color': '#AB63FA', 'dash': 'dash'},
'name': 'M42 theory',
'type': 'scatter',
'uid': 'd24d25a8-769a-4a5b-a101-56424259c55e',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x14',
'y': array([0., 0., 0., ..., 0., 0., 0.], shape=(1396,)),
'yaxis': 'y14'},
{'line': {'color': '#FFA15A', 'dash': 'solid'},
'name': 'M43 ',
'type': 'scatter',
'uid': '4c55379f-4cac-4500-88e7-91de06d22fbb',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x15',
'y': array([-0.95574, -0.96899, -0.96191, ..., -0.8796 , -0.87907, -0.87849],
shape=(1396,)),
'yaxis': 'y15'},
{'line': {'color': '#FFA15A', 'dash': 'dash'},
'name': 'M43 theory',
'type': 'scatter',
'uid': '618463d4-32c0-49ed-8b76-d7309fa7fd68',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x15',
'y': array([ 0.43782573, 0.19893818, -0.04873646, ..., -0.89276791, -0.89263929,
-0.89250933], shape=(1396,)),
'yaxis': 'y15'},
{'line': {'color': '#19D3F3', 'dash': 'solid'},
'name': 'M44 ',
'type': 'scatter',
'uid': 'c571c71e-1483-41d9-bab6-60087f3f1c3d',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x16',
'y': array([0.25821, 0.24432, 0.24986, ..., 0.16743, 0.15105, 0.16637],
shape=(1396,)),
'yaxis': 'y16'},
{'line': {'color': '#19D3F3', 'dash': 'dash'},
'name': 'M44 theory',
'type': 'scatter',
'uid': '63c9bf0f-a806-4138-8626-9613f8926853',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x16',
'y': array([-0.83818395, -0.95463751, -0.98240665, ..., 0.35365557, 0.35463045,
0.35560861], shape=(1396,)),
'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': '682a8e9c-6637-4bd9-8592-41f840787491',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x',
'y': array([0., 0., 0., ..., 0., 0., 0.], shape=(1396,)),
'yaxis': 'y'},
{'line': {'color': '#EF553B', 'dash': 'solid'},
'name': 'M12 ',
'type': 'scatter',
'uid': 'a9846b61-a7c9-4b4d-a4ac-8b498cd48ff4',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x2',
'y': array([0.41667193, 0.3303545 , 0.28667291, ..., 0.16335646, 0.16579333,
0.16637603], shape=(1396,)),
'yaxis': 'y2'},
{'line': {'color': '#00CC96', 'dash': 'solid'},
'name': 'M13 ',
'type': 'scatter',
'uid': 'a7e2d190-9624-4c81-8bc3-7dc33cca5340',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x3',
'y': array([ 0.01241, 0.01151, 0.00694, ..., -0.00887, 0.00646, -0.0117 ],
shape=(1396,)),
'yaxis': 'y3'},
{'line': {'color': '#AB63FA', 'dash': 'solid'},
'name': 'M14 ',
'type': 'scatter',
'uid': 'f0d6cb13-e4e6-4a2a-be21-e9de316d3aa9',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x4',
'y': array([ 0.00614, 0.00901, 0.00475, ..., -0.00626, 0.0061 , -0.0055 ],
shape=(1396,)),
'yaxis': 'y4'},
{'line': {'color': '#FFA15A', 'dash': 'solid'},
'name': 'M21 ',
'type': 'scatter',
'uid': '653bfefe-d809-4df3-a660-dac432c05987',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x5',
'y': array([0.42125193, 0.3191045 , 0.28789291, ..., 0.16114646, 0.16299333,
0.16391603], shape=(1396,)),
'yaxis': 'y5'},
{'line': {'color': '#19D3F3', 'dash': 'solid'},
'name': 'M22 ',
'type': 'scatter',
'uid': '057dc4ab-c64a-41c1-af3a-3362a666f6a8',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x6',
'y': array([0.00574, 0.00525, 0.00363, ..., 0.00277, 0.00339, 0.00394],
shape=(1396,)),
'yaxis': 'y6'},
{'line': {'color': '#FF6692', 'dash': 'solid'},
'name': 'M23 ',
'type': 'scatter',
'uid': '242686d5-5936-4b13-90f9-949cfd239c53',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x7',
'y': array([ 0.00364, 0.00427, 0.00207, ..., 0.00457, -0.00234, 0.00653],
shape=(1396,)),
'yaxis': 'y7'},
{'line': {'color': '#B6E880', 'dash': 'solid'},
'name': 'M24 ',
'type': 'scatter',
'uid': '4db9a545-bd87-4c3c-a1d2-005a050c2e33',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x8',
'y': array([-0.01084, 0.00325, -0.01123, ..., 0.00263, -0.00227, 0.00311],
shape=(1396,)),
'yaxis': 'y8'},
{'line': {'color': '#FF97FF', 'dash': 'solid'},
'name': 'M31 ',
'type': 'scatter',
'uid': '81a7bcc8-66c0-4f31-9aa1-ce16ab235d6e',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x9',
'y': array([ 0.00278, 0.00634, 0.00219, ..., -0.00055, 0.00105, -0.00037],
shape=(1396,)),
'yaxis': 'y9'},
{'line': {'color': '#FECB52', 'dash': 'solid'},
'name': 'M32 ',
'type': 'scatter',
'uid': '94e3aead-d2e4-4eb0-aaeb-04214d433f5f',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x10',
'y': array([ 0.00212, 0.00045, -0.0003 , ..., 0.0018 , 0.00042, -0.00037],
shape=(1396,)),
'yaxis': 'y10'},
{'line': {'color': '#636EFA', 'dash': 'solid'},
'name': 'M33 ',
'type': 'scatter',
'uid': '131e091c-ea7a-4cc8-809f-84a641b69ba6',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x11',
'y': array([-1.11101395, -1.22189751, -1.25520665, ..., 0.19129557, 0.19192045,
0.19305861], shape=(1396,)),
'yaxis': 'y11'},
{'line': {'color': '#EF553B', 'dash': 'solid'},
'name': 'M34 ',
'type': 'scatter',
'uid': '2ebcbdf5-f8f6-46f6-9a0d-c24fa5a979e5',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x12',
'y': array([-1.39337573, -1.16343818, -0.90947354, ..., 0.01564791, 0.01634929,
0.01589933], shape=(1396,)),
'yaxis': 'y12'},
{'line': {'color': '#00CC96', 'dash': 'solid'},
'name': 'M41 ',
'type': 'scatter',
'uid': '2777d73c-110b-4b80-9439-2976bde653f3',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x13',
'y': array([-0.00986, -0.00917, -0.00712, ..., 0.00585, -0.00882, 0.00692],
shape=(1396,)),
'yaxis': 'y13'},
{'line': {'color': '#AB63FA', 'dash': 'solid'},
'name': 'M42 ',
'type': 'scatter',
'uid': 'cc604f4e-a93c-45d3-aba8-f321e348f33b',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x14',
'y': array([-0.00048, -0.01319, -0.00891, ..., 0.01388, -0.00424, 0.0126 ],
shape=(1396,)),
'yaxis': 'y14'},
{'line': {'color': '#FFA15A', 'dash': 'solid'},
'name': 'M43 ',
'type': 'scatter',
'uid': 'c8a61a8c-3cec-475a-892a-8325b5b33271',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x15',
'y': array([ 1.39356573, 1.16792818, 0.91317354, ..., -0.01316791, -0.01356929,
-0.01401933], shape=(1396,)),
'yaxis': 'y15'},
{'line': {'color': '#19D3F3', 'dash': 'solid'},
'name': 'M44 ',
'type': 'scatter',
'uid': 'c1e9aa12-6fa1-4a98-8e51-d55645047d88',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x16',
'y': array([-1.09639395, -1.19895751, -1.23226665, ..., 0.18622557, 0.20358045,
0.18923861], shape=(1396,)),
'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
References
Here you can find the latest jupyter notebook and data files of this example.
Total running time of the script: (0 minutes 22.085 seconds)