.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/plot_SiO2_Si_MM.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_plot_SiO2_Si_MM.py: Mueller matrix ============== Mueller matrix fit to a SiO2 on Si measurement. .. GENERATED FROM PYTHON SOURCE LINES 9-14 .. code-block:: Python import elli from elli.fitting import ParamsHist, fit_mueller_matrix .. GENERATED FROM PYTHON SOURCE LINES 16-27 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 :math:`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. .. GENERATED FROM PYTHON SOURCE LINES 27-30 .. code-block:: Python MM = elli.read_spectraray_mmatrix("Wafer_MM_70.txt").loc[210:820] print(MM) .. rst-class:: sphx-glr-script-out .. code-block:: none 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] .. GENERATED FROM PYTHON SOURCE LINES 31-35 Setting start parameters ------------------------ Here we set the start parameters for the SiO2 cauchy dispersion and thickness of the layer. .. GENERATED FROM PYTHON SOURCE LINES 35-44 .. code-block:: Python 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) .. GENERATED FROM PYTHON SOURCE LINES 45-55 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 `__. .. GENERATED FROM PYTHON SOURCE LINES 55-59 .. code-block:: Python rii_db = elli.db.RII() Si = rii_db.get_mat("Si", "Aspnes") .. GENERATED FROM PYTHON SOURCE LINES 60-66 Building the model ------------------ Here the model is build and the experimental structure is returned. For details on this process please refer to the :ref:`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. .. GENERATED FROM PYTHON SOURCE LINES 66-84 .. code-block:: Python @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() ) .. GENERATED FROM PYTHON SOURCE LINES 85-88 Plot & Fit the model -------------------- Here we plot the model at the initial parameter set vs. the experimental data. .. GENERATED FROM PYTHON SOURCE LINES 88-90 .. code-block:: Python model.plot() .. rst-class:: sphx-glr-script-out .. code-block:: none FigureWidget({ 'data': [{'line': {'color': '#636EFA', 'dash': 'solid'}, 'name': 'M11 ', 'type': 'scatter', 'uid': 'a2ea3f8f-e4e9-43f3-adec-1faac81088b9', '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': 'a517ca1b-940d-4c67-92eb-61ef72810026', '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': '85dcf243-ef6f-4bb9-a8c9-8e02e9e09943', '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': '57fdf7c5-5b13-4e72-a670-27aae02b6ba8', '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': '206b83bd-1c9f-4eda-8d42-4ec10b9d5fdf', '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': 'd3c6c608-e608-4c2b-81ee-fc99b825cd29', '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': 'bdaf5e67-02c7-4635-96af-820b9f5ede3b', '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': 'fc3d0c94-5eb2-4e34-a50e-4a74fba27813', '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': '791f4c9f-1b7c-476b-9b81-e1247dbc9b53', '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': '2e379389-ca77-4140-88de-bbf464e529db', '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': '92f16b26-1eb5-4655-a735-935333b80816', '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': 'e580f382-a007-462b-9db5-6d6ec8e08d75', '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': 'd201b4d0-2897-4ef6-b85f-70566d9a711a', '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': '01b37544-01cd-404d-a864-5de5fb6b83bb', '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': 'c4bd35da-b26f-4097-8089-c50cba98e4db', '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': 'be22644e-dc8c-4b49-8d40-505f3e969eb4', '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': '0f8a5602-fc9d-4fcc-8944-6663617c20c6', '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': '5ae7dc31-481e-4c22-af5c-144c9c621d4a', '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': '1a9a7e11-19d7-4b21-9381-a788d2c586cd', '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': '14f7b564-29ea-43b8-a5f5-a5de2b68fedd', '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': 'fdbb64a5-73f4-467b-9115-3dc79038da25', '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': 'f7297ad3-819a-439b-a404-7524655b801b', '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': '5903a9a1-c58f-4453-a1ec-15cfe3bafa95', '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': '3307acc2-27ee-4576-8328-b9105c058570', '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': 'baa3a5ff-1458-40d4-b662-e71c1c93d561', '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': '5eae3b3f-8a36-43f6-93f2-1768c4d5b202', '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': '6a51034c-97b6-4c9f-8399-d7da4656b2f6', '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': '96f84651-6383-4ffe-b740-2dec9edba781', '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': '4a0f2f3f-af2f-4c96-a957-aaad50fe8120', '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': '3efc377f-6d47-402b-8af0-c2e426a05b9f', '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': '4503f13e-31ac-48f9-b831-86fd7e0dcfb3', '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': '91c24949-ad58-470f-9e44-c4d59460fab3', '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]}} }) .. GENERATED FROM PYTHON SOURCE LINES 91-92 We can also plot the residual between measurement and model. .. GENERATED FROM PYTHON SOURCE LINES 92-94 .. code-block:: Python model.plot_residual() .. rst-class:: sphx-glr-script-out .. code-block:: none FigureWidget({ 'data': [{'line': {'color': '#636EFA', 'dash': 'solid'}, 'name': 'M11 ', 'type': 'scatter', 'uid': '49000e84-9830-4a61-8cc6-cb575783a559', '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': 'df2b0e7e-3c1f-412e-ace2-ffa94362796f', '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': '37b9496b-ebad-4af0-9877-c96f0fa823fd', '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': '91e90817-b9e6-4b41-8bf1-503e6153f671', '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': '73cdffa5-81a0-4ba3-94ac-5ee94b65c3df', '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': '0c48cded-e4b7-490f-bd2e-c4bbc0646a74', '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': '8c276a37-71b9-4370-a43d-0d66c32686d9', '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': 'c02df8a9-5ff5-427f-b8a6-864058ae7c84', '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': 'ecb7c917-61bf-4e82-849c-b76d53f313d6', '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': '38ac9c3f-2407-411f-b19f-7421e1edbcf2', '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': 'ed626623-9ac6-4855-af9d-53771ef4dc5d', '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': '3407e147-2196-40d9-95a9-46a34f42044b', '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': '3b3b8215-bcfd-4f4f-a06a-8655b954a5dd', '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': '83662e6e-d31b-47f2-9432-d2ee4ecc117d', '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': '7b808650-a6e2-44cd-9cbb-fd567784b10f', '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': '21808dba-acd2-4e27-88d7-9457a5db3378', '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]}} }) .. GENERATED FROM PYTHON SOURCE LINES 95-96 Now we execute a fit and plot the model afterwards. .. GENERATED FROM PYTHON SOURCE LINES 96-99 .. code-block:: Python fit_stats = model.fit() model.plot(full_scale=False) .. rst-class:: sphx-glr-script-out .. code-block:: none FigureWidget({ 'data': [{'line': {'color': '#636EFA', 'dash': 'solid'}, 'name': 'M11 ', 'type': 'scatter', 'uid': '9dbc1e2d-e1f0-4bc4-b19a-15e050044ad7', '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': '1bfba230-0237-4a89-99dd-72b7a0be86b8', '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': '2416b346-8c07-42d1-ada2-03041d0f41ab', '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': 'b8c6e8c8-4a8f-46fc-9cc2-1ad5e1f87c8f', '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': '5ed29f69-415a-48bd-86d1-f90767c083b9', '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': '095a5ee7-6c91-4821-8de3-a6813115cd86', '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': '882baff2-8c7f-4f3f-aa90-432f3117464e', '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': '745cf7f9-2fa2-45d2-9d5f-4447686e574c', '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': 'b76ad3b6-2beb-4304-ac41-2de7220f7c7a', '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': '18de2611-8411-4671-9d78-6a81771d5ed5', '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': '94667b3b-8471-4046-861b-afd07f79ca8a', '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': 'fbeda7b0-8a6e-4e75-a7ae-94422a718657', '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': '7ffe6005-9315-4c5f-9236-711f35a51ec0', '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': 'e4d859c2-941a-49d0-8fab-f223b66bd4ce', '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': '3c18142a-ff0b-4715-b9a7-ac700250b839', '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': '03e96bd7-0ff7-4bb3-a097-5d7f28411e43', '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': '026928d5-5479-4e86-a0c7-46b7dc2c2f1b', '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': '78474229-98a7-474c-9717-990a8cadb3c5', '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': '91f80e3e-b1ee-4d67-a93b-025a51d183f2', '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': '8fc920f8-e64a-44dc-9680-f6bc6e491b60', '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': '02d2624a-6c0e-4c1e-b13b-e678708b79ef', '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': 'd85ebd30-8a1d-49a3-a53d-22d0bd076a9c', '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': '935d5389-a0bc-49e0-bc1a-7c9f85b4a9f3', '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': '00ced755-db05-4062-9f0d-487ff1568567', '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': 'cf37e873-bf77-4743-9206-b6653d8df5d6', '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': '7cbcb6a3-3ae4-4b7e-ac93-16c441fb8d86', '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': '9e435d74-84f1-4fd7-b748-0fb58b4cf4a8', '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': '3853d6c3-2a95-47fe-9563-2a4f714c3e1d', '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': '58bdc12e-69b3-454b-a840-7942883ca44b', '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': '7aed0045-60cc-4f85-a21a-5ae738d3a44a', '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': '1bc2b722-d545-4c0d-a647-224834eeba13', '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': 'd9c094c5-b131-4a87-91c3-2cdcae224423', '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]}} }) .. GENERATED FROM PYTHON SOURCE LINES 100-102 For comparison we plot the residual again to have a figure of merit for the fit quality .. GENERATED FROM PYTHON SOURCE LINES 102-104 .. code-block:: Python model.plot_residual() .. rst-class:: sphx-glr-script-out .. code-block:: none FigureWidget({ 'data': [{'line': {'color': '#636EFA', 'dash': 'solid'}, 'name': 'M11 ', 'type': 'scatter', 'uid': 'ca02c8b4-7f17-47c3-bc2e-d0547ca452cd', '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': 'c841dba4-a674-46c0-8c0c-ba1254ff8b79', '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': '2598a9aa-387c-4c13-9a92-55236e4e0f8d', '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': '6806e129-6b31-4bfb-9abd-d517a1e86c70', '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': '63bee11d-18fd-426b-abb7-c04c10b6c24f', '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': '6a8db08a-4a07-43af-a1a9-8fc99b442903', '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': '8d86fc5e-943e-48f3-b953-f1ea2b45220b', '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': '77763047-fe06-4f83-af9d-1c63edfd1c45', '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': '058ffef5-25b4-45d3-a4be-3d97e85e532d', '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': '8c34ec89-0167-48fb-82e9-b049975d8106', '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': '7849e795-ebbe-46b1-8dab-503b761e65e4', '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': '09a0bceb-9d36-4070-ba3c-de0ee973fa00', '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': '65982493-fdab-42cd-a92e-3a6bbfb84937', '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': '1f5a7119-8023-4728-b109-f8e187e0c880', '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': 'e9ca332c-232d-4531-8c35-eb74a9c4f32f', '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': 'c5227813-f3aa-4d24-b9f6-6f721d13ab7b', '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]}} }) .. GENERATED FROM PYTHON SOURCE LINES 105-106 We may also print the fit statistics. .. GENERATED FROM PYTHON SOURCE LINES 106-108 .. code-block:: Python fit_stats .. raw:: html

Fit Result



.. GENERATED FROM PYTHON SOURCE LINES 109-113 References ---------- `Here `_ you can find the latest jupyter notebook and data files of this example. .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 2.250 seconds) .. _sphx_glr_download_auto_examples_plot_SiO2_Si_MM.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_SiO2_Si_MM.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_SiO2_Si_MM.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_SiO2_Si_MM.zip `