.. 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 ============== Exemplary fit of the complete Mueller matrix of 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': '644ed670-4c8c-43c2-b2a5-a501015654f4', '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': '2243d4dc-4705-4d18-aa89-e1f04e7a7d7d', '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': '0f745bf0-a1fd-4cd1-be83-4190ed1e1abc', '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': '58e9ac1b-26a1-4630-a059-567af16b315e', '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': 'd04ad804-7894-4026-90b7-9b2f55459fb6', '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': 'c23154d1-05b4-4310-9ded-9acf63b09364', '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': '554e8fab-37b9-4872-9bed-ac5aa02572e9', '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': '09f91e70-879b-4358-8244-b97f05f7572f', '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': '62a1179d-147f-4cc8-890c-091808d24d06', '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': 'e786d9e5-06c0-48a5-90a3-fa87eddcf6cd', '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': '01ed7e97-8ada-4e89-8565-3422f82a9636', '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': 'ba6b0737-b38e-48f8-9049-ace9a2799fab', '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': '44da94cb-b638-4f8a-8b7e-26cf41d66ada', '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': 'dabbe45f-300c-4e86-a70f-51a282ca2f8d', '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': 'cc46df31-8a94-472f-a318-da7889871b55', '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': '24be9419-7b44-40d1-81f0-fb38846bd915', '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': '3e62da3d-c445-4396-bc0b-527c6bb58abc', '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': '97110c12-8718-4ffc-8b39-2a3ae8db864d', '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': 'b3307db9-6556-4541-815a-922969b0464a', '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': '3eed210e-96b1-48c6-93d0-a2d1e516999f', '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': '29d3bd75-4fa6-4660-8dae-83f5781f5487', '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': '1f8c33fb-d183-4920-97aa-a2252295d0e3', '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': '2a20f1fd-4667-4973-bc1d-b1be57a967d4', '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': '23644f80-0592-4cee-9147-f6904775b5aa', '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': 'c1c32fd5-9ce3-4e9d-9bad-679047e3da78', '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': '510b3cf2-9f24-4413-9fd7-7306ce8d62a1', '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': 'b9fc6ad6-75f9-4e3b-8fe2-294932968a14', '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': '022d1757-c2bc-478e-9098-3ece2910e067', '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': '8b2bf1e8-e50c-4019-9d80-57692aa6e0ed', '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': 'c77fc9b2-3e23-4f01-bd5f-e4267a583c03', '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': 'c0a08d64-bc2d-453a-be24-c37197da9ed5', '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': 'a41f2100-c5bd-4432-b264-070d349e042d', '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': 'fd12ff6e-f163-4555-9522-27bd647147bf', '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': 'd8c84f28-6d72-4913-bbe4-c82adba993d4', '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': 'a48fec2b-8868-4f2a-9386-2ccad42da49d', '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': '512e7c36-3560-450a-997a-d465f804a94e', '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': '5bf1f2c5-5b29-476e-acf9-916dc8b6ef95', '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': 'a98ea0d3-325a-4958-83b6-63699c97755c', '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': 'e67c9a89-806d-4d73-ac91-3111827b4b57', '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': 'e8c36b08-2182-4878-b5e2-7763b7a1adbc', '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': 'b4eaed53-2b95-48e0-80ec-95e92fa1bb5e', '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': 'fbea932f-8b59-4379-b91e-a47f9299acc5', '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': '5da9136c-6cfa-4fc0-a539-46be3d59df51', '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': 'e089d08e-4916-4785-b6cf-8c6dc8574bec', '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': 'de4d7396-0465-47b6-bbd3-a62e787eb5fc', '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': '11277148-8cde-4a60-a0ea-75ab4bea8161', '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': 'ffdb9513-e4d6-4056-b248-ea23dfb4acdc', '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': '8b26dbd8-0b0d-4396-a67f-1a5e3fb4f152', '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': 'd110c035-580b-45c8-80d0-65c8ff98a314', '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': '75b834bb-c2e5-4698-b38d-0de65112f9c0', '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': '27d0524e-dd4f-4d30-a03b-c288953232a7', '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': '4c38be69-022a-4d4d-a2eb-b03ed841c39c', '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': '6b59262c-eed6-4ee5-b132-1ab2af18d746', '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': 'd4bfe222-1307-4493-81c8-6e3c40d3173a', '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': '46f3ad53-a566-47fb-a081-144349b9237e', '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': 'afa5357c-4e8e-4067-90a0-c29ab2ac6d5c', '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': '10af9f18-d09c-4823-95a8-42eb92d3e508', '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': '6ed2ba64-8ae5-4070-af7a-7d2dffd4771e', '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': '41a398cd-92c7-4e29-aedb-8d2132e318d5', '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': 'f781e4c7-6d0d-47d2-a10a-c639a29617a1', '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': 'f3879508-c1f6-4dd7-85ad-4871988a2a83', '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': '2986ddac-58e6-43fb-8e30-f51de48d86c1', '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': 'b2786919-c897-4030-b7db-e9b89c87b91d', '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': '035b7244-bdd1-4cf0-8b82-190dff9cae08', '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': 'ec71a36a-3253-4857-b86b-e77a93a1fbab', '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': '0539583f-de9d-48a7-98a7-e948756f2ab1', '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': '42ae6633-4f6c-4fb5-8c5d-cc9f7dda24a2', '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': '43f72158-f4be-4271-b00a-48283f0d46c0', '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': '1e0f3b54-35f0-4f41-ac19-93c4a64ec481', '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': 'b85af292-1d89-4b7e-ac3b-f7b27f6c8830', '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': '0219b83c-047b-4428-b244-822caa196b23', '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': '73bf6797-7710-48e9-b686-b4421d062932', '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': 'acadfcc0-4fa0-4cab-a1d5-8c0f4a5b1bba', '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': 'e3e93357-a358-4943-8353-b3bf78bc773c', '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': '64e5f808-af38-42fc-9baf-86bc66ad1b77', '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': '7739a6c1-b356-47bb-a4ed-f562ea47ae63', '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': '2bb29c39-523e-43f9-bfa3-14e0982393c8', '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': '13e47436-9400-444b-a5f3-1b654a9e0996', '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': '78485006-b438-48e6-9c35-bbf5bf62b734', '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': 'bb9b8927-dff9-422e-939a-6caf41318af8', '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': 'c6d8a182-3600-4855-bf19-c3d4dccaf380', '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': '8a1e8f48-2d01-41c1-a49f-8709f68059fb', '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': 'dfe57b5d-8d37-438b-99b1-806894e527c4', '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': 'b106ae68-4f9a-4cfc-8dc3-257bdd905ec7', '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': '692f3b54-6765-4f29-97e4-ade23046c3a1', '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': '3f7cfc7f-b612-480c-9c86-aaefb631bddf', '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': 'a6fce54a-f887-4707-a563-87ae844bb053', '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': 'b3c9856b-6b51-429e-bccd-93de84c8b228', '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': '6d4bda14-2395-46f5-a637-d806b3f6d8bd', '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': '85e13efb-9a62-42b7-9c07-ec42e20b02d5', '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': 'f82af53b-9e1e-4be1-9428-0932acafa191', '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': 'a85031dd-acc7-4298-b943-379a8ca794a2', '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': '5104e1e2-a3a3-41f1-9177-62f20cb272ea', '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': '54b423e9-6008-4a01-a836-645c8e7d3497', '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': 'd9d24c94-4760-4f71-8d3c-95d8c61919fc', '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': '7d89e8d4-4ffb-4ec0-96a3-19b729cb7bfa', '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.197 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 `