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': 'b0f3b1fd-7ef9-4793-8e0f-6cf65c498de4',
'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': 'aa3122ca-4aa0-4402-8665-ee94038cab6d',
'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': '88afbd73-9f80-428c-83c1-014c27bce5d7',
'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': '1d646f68-ef4e-4759-9d21-6bd55ad9f5bb',
'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': 'c8444610-4cdf-4752-8246-087251b350a7',
'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': '57a7558c-75ea-45ee-8299-e8c90f913f10',
'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': 'ea3e2054-c09d-410d-ab4c-52c3bf42a1f1',
'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': 'dcb1ff12-ca6a-4504-bf08-c05355374bbc',
'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': '95b81d1a-e3c1-4e1f-8096-8dffaae38cfe',
'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': '48feb239-afd0-4187-b2d3-e6c57ebe8ae4',
'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': '61e9f8fa-0377-49e2-a9e5-f96ba7f66a6b',
'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': '709e7048-fb38-458b-8da9-324210a16d2f',
'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': 'ac40904e-79e7-4c82-854e-5c280205ce83',
'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': 'a0432fc1-076d-4bf1-abf8-f56f5faf2368',
'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': 'ccd03829-74eb-4b34-a268-9fc959c6226a',
'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': '176b3928-61e5-4b57-8650-353b8fd6bbcf',
'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': 'e415ba98-7015-44fb-bc0d-1f00ad360f0c',
'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': '0cf67953-7e19-496b-b97b-af511a58a565',
'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': 'bac56a72-2504-4a9f-94d8-061efae0a9cc',
'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': '2595dfdd-868b-4a66-aab0-df428439d4ea',
'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': '2fc04b7e-8fbf-4ae5-b0c1-93680f9f730c',
'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': '718e57f1-6180-48e7-9d0e-90a1c7fc5529',
'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': '4e4677e2-3123-407c-ad73-166e80bb80c6',
'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': '7778d42b-c0f5-4bcc-91b2-d1d8992c7437',
'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': '78c7ec80-1710-4067-a80d-f404d5cff285',
'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': 'e566ae43-5fb4-4631-b939-b04429eb8d70',
'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': '5b810fea-6433-4d69-982f-d31e2862aee3',
'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': 'd38cdb02-dea2-4d4b-9b11-660cf203596b',
'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': '7e94449e-9dac-45f1-ae2f-eaaef9502da0',
'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': '6dd7dfc7-e429-48a8-8cbb-c91d0d290424',
'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': 'c314c094-3997-4255-aaaa-60e17dadbdfd',
'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': '20f9aed1-f5ae-412c-90f5-4872f9413f96',
'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': 'a8814b9c-5c8f-4d26-b60f-b717356c132b',
'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': 'bceb04d2-5aed-4513-bdc5-c348e0c78744',
'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': '77ee4876-fa6a-4bdd-9f89-defdf8bfef3c',
'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': '199a8435-1ae5-442e-993a-2e13a1c53522',
'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': '2d61e2bc-d30a-43bc-8b2a-a0a4abc648a2',
'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': 'a2a94397-4640-4da4-91a4-7674df634c94',
'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': '531e1801-0da2-423d-ac26-e7149b0b46e6',
'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': '0a999158-9d25-487c-ba01-51cb3fc5d1c4',
'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': '62c68aed-94a8-4eed-9744-fbdafe4efe62',
'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': 'fbf609a3-78d2-4ab1-bd0f-d9b62840a977',
'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': 'd3cbcf95-6b8b-43c9-ba51-92b28923cf67',
'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': '4386a4a7-4417-474d-9a48-69dcc3594256',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x12',
'y': array([-0.56805755, -0.51478422, -0.44957042, ..., 0.06223042, 0.06284858,
0.06231669], shape=(1396,)),
'yaxis': 'y12'},
{'line': {'color': '#00CC96', 'dash': 'solid'},
'name': 'M41 ',
'type': 'scatter',
'uid': 'd635932b-df77-4582-b6c1-50778956c4f2',
'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': 'd58ca149-ad95-4175-adc6-067bad4c68d6',
'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': '526253b9-1509-491d-a446-eca8cedc3121',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x15',
'y': array([ 0.56824755, 0.51927422, 0.45327042, ..., -0.05975042, -0.06006858,
-0.06043669], shape=(1396,)),
'yaxis': 'y15'},
{'line': {'color': '#19D3F3', 'dash': 'solid'},
'name': 'M44 ',
'type': 'scatter',
'uid': 'b82505aa-5910-4354-ad7a-830af4ce0e00',
'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': '12ad1952-f286-406d-81a3-dbeb5f87d930',
'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': '7f8c0aca-4968-4c8a-a5a7-b50bbc772588',
'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': '63f1f495-b000-4ebe-b5c5-75313975fe60',
'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': '33aa56bc-6eb6-471d-86a2-b814efe17feb',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x2',
'y': array([-0.09081776, -0.09659845, -0.10218436, ..., -0.44726608, -0.44776779,
-0.44826863], shape=(1396,)),
'yaxis': 'y2'},
{'line': {'color': '#00CC96', 'dash': 'solid'},
'name': 'M13 ',
'type': 'scatter',
'uid': '87c3940a-388a-4ac6-8303-33ebd075fae1',
'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': '91e89ffa-005e-48d7-8b5e-d18fd9eae3cc',
'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': '7f6398e3-0e12-46b0-98a1-7a463c3d1f73',
'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': '2656648d-2baf-443b-91c4-702131a0bde1',
'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': '9ea4bf4f-d8fd-4c72-b97d-0bae4995c10c',
'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': '4a020c5b-70a6-4228-b080-c8a279a63720',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x5',
'y': array([-0.09081776, -0.09659845, -0.10218436, ..., -0.44726608, -0.44776779,
-0.44826863], shape=(1396,)),
'yaxis': 'y5'},
{'line': {'color': '#19D3F3', 'dash': 'solid'},
'name': 'M22 ',
'type': 'scatter',
'uid': '570171d5-434b-412c-bfd2-75cd6033f761',
'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': '61562820-bd3e-4fd0-8f30-0439944b2e14',
'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': '747a21f2-69b8-4bfa-97c3-8a87048d63cb',
'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': '054742fe-481e-4443-a62a-1c36757fd6e5',
'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': '0b34726b-9405-4e53-8e0e-62bfccabc430',
'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': 'fae283f6-6b08-4856-b8ac-ecfee624d85a',
'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': '0f4938c4-b2ea-4aaf-b4c5-4df4a8133120',
'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': '85d888cb-ae3d-46ce-b1b0-3c387455a595',
'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': '86b78937-fbaa-4bf9-b88e-e1b3c5d5863d',
'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': 'f260464e-485b-48c4-94a6-fb60d654ef85',
'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': '06052b16-24cf-45c8-95e6-6c32c7e139db',
'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': '122ac6e8-37b9-4ffc-9711-1fb8bc552d54',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x11',
'y': array([0.28633493, 0.28495866, 0.28318747, ..., 0.15873433, 0.1585769 ,
0.15841941], shape=(1396,)),
'yaxis': 'y11'},
{'line': {'color': '#EF553B', 'dash': 'solid'},
'name': 'M34 ',
'type': 'scatter',
'uid': '9f0f912d-2e69-45e3-97f3-20c205cd9d30',
'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': '8403430e-5e1c-45b2-87bf-4a0f1bbf0d8a',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x12',
'y': array([0.95381573, 0.95365995, 0.95360538, ..., 0.88020251, 0.87997578,
0.87974912], shape=(1396,)),
'yaxis': 'y12'},
{'line': {'color': '#00CC96', 'dash': 'solid'},
'name': 'M41 ',
'type': 'scatter',
'uid': '14477f68-821e-4df7-9f70-ee8f98cf7017',
'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': 'fc24b9f2-25f0-4e35-bed8-f3e1a2e90a52',
'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': 'c49eff54-88bd-4957-9f96-b1c416752d8d',
'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': '3892e176-9361-4d86-9555-0129b3d1586c',
'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': '61d84352-9cfc-4cbb-8060-e90d84f0c4f7',
'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': 'a26652be-99b4-4073-82a4-c33e80bf74a8',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x15',
'y': array([-0.95381573, -0.95365995, -0.95360538, ..., -0.88020251, -0.87997578,
-0.87974912], shape=(1396,)),
'yaxis': 'y15'},
{'line': {'color': '#19D3F3', 'dash': 'solid'},
'name': 'M44 ',
'type': 'scatter',
'uid': 'c3dd268d-8a83-4cce-83e7-ba98b6ce7af5',
'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': '12620b6b-6126-4cf2-9ecd-26595ff2bba9',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x16',
'y': array([0.28633493, 0.28495866, 0.28318747, ..., 0.15873433, 0.1585769 ,
0.15841941], 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': 'ae86dd62-7ac6-4cf9-b350-36e8320711f5',
'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': '896219ee-a220-4aaa-a34c-db88e3066c4e',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x2',
'y': array([ 0.00065224, 0.01219155, 0.00420564, ..., -0.00481608, -0.00370779,
-0.00445863], shape=(1396,)),
'yaxis': 'y2'},
{'line': {'color': '#00CC96', 'dash': 'solid'},
'name': 'M13 ',
'type': 'scatter',
'uid': '41958634-5ac6-4b66-aee0-86a50a2b552f',
'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': 'da66f00b-a5c5-4dbf-9d08-b26422e16582',
'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': 'f6fa0eae-7e73-4ad0-9993-9fd0af4f4e47',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x5',
'y': array([ 0.00523224, 0.00094155, 0.00542564, ..., -0.00702608, -0.00650779,
-0.00691863], shape=(1396,)),
'yaxis': 'y5'},
{'line': {'color': '#19D3F3', 'dash': 'solid'},
'name': 'M22 ',
'type': 'scatter',
'uid': '93e008e0-f06a-4c7b-8554-6a42a5596c06',
'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': '39b0571f-633c-447c-8864-5de927d81c0d',
'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': '65015b58-8dd0-4155-8609-85297f430abe',
'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': '081f830f-8c7f-4488-9136-ed397f31c175',
'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': '9f47c2c5-a36f-412e-92c0-81bccbbea59b',
'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': '2c19ccbf-5272-489b-be33-fbcccf37e146',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x11',
'y': array([ 0.01350493, 0.01769866, 0.01038747, ..., -0.00362567, -0.0041331 ,
-0.00413059], shape=(1396,)),
'yaxis': 'y11'},
{'line': {'color': '#EF553B', 'dash': 'solid'},
'name': 'M34 ',
'type': 'scatter',
'uid': '4241dcbf-7165-4a26-994b-3b441a67c6d8',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x12',
'y': array([-0.00173427, -0.01084005, -0.00460462, ..., 0.00308251, 0.00368578,
0.00313912], shape=(1396,)),
'yaxis': 'y12'},
{'line': {'color': '#00CC96', 'dash': 'solid'},
'name': 'M41 ',
'type': 'scatter',
'uid': 'e541e1c2-3ade-4b32-a07f-0291ff4001f9',
'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': '9ec52f6c-a915-473e-99da-144c1b487186',
'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': 'eb0726a2-53d4-4223-b69f-a1a581b9efd9',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x15',
'y': array([ 0.00192427, 0.01533005, 0.00830462, ..., -0.00060251, -0.00090578,
-0.00125912], shape=(1396,)),
'yaxis': 'y15'},
{'line': {'color': '#19D3F3', 'dash': 'solid'},
'name': 'M44 ',
'type': 'scatter',
'uid': '49c4f440-8fa5-4b63-8aa2-5f56df5b1554',
'x': array([210.30366, 210.76102, 211.21834, ..., 818.9224 , 819.33886, 819.75528],
shape=(1396,)),
'xaxis': 'x16',
'y': array([ 0.02812493, 0.04063866, 0.03332747, ..., -0.00869567, 0.0075269 ,
-0.00795059], 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 3.487 seconds)