.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/3_Fitting/plot4_legacyFit_Tgas.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note You can download :ref:`below ` the full example code and run it with 🔬 `Radis-Lab `__, .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_3_Fitting_plot4_legacyFit_Tgas.py: .. _example_one_temperature_fit: ================= Legacy #1: Temperature fit of CO2 spectrum ================= Quickly fit an experimental spectrum with a one-temperature model, directly from :py:class:`~radis.lbl.factory.SpectrumFactory`, with :py:meth:`~radis.lbl.factory.SpectrumFactory.fit_legacy` The method requires a fitting model. An example model is provided in :py:mod:`radis.tools.fitting` : :py:func:`~radis.tools.fitting.LTEModel`. Other models can be used; such as in the :ref:`multi-temperature fit example` More advanced tools for interactive fitting of multi-dimensional, multi-slabs spectra can be found in :py:mod:`fitroom`. Finally, the :ref:`GPU-accelerated example` shows how to obtain real-time interactive spectra. .. GENERATED FROM PYTHON SOURCE LINES 23-26 .. code-block:: Python from radis import SpectrumFactory, load_spec .. GENERATED FROM PYTHON SOURCE LINES 27-28 Here we get an experimental spectrum from RADIS test cases. Use your own instead. .. GENERATED FROM PYTHON SOURCE LINES 28-44 .. code-block:: Python from radis.test.utils import getTestFile, setup_test_line_databases setup_test_line_databases() # fit range wlmin = 4167 wlmax = 4180 s_exp = ( load_spec(getTestFile("CO2_measured_spectrum_4-5um.spec")) .crop(wlmin, wlmax, "nm") .normalize() .sort() .offset(-0.2, "nm") ) .. GENERATED FROM PYTHON SOURCE LINES 45-47 Customize the :py:func:`~radis.tools.fitting.LTEModel` for our case: we add a slit (non fittable parameter) and normalize it .. GENERATED FROM PYTHON SOURCE LINES 47-75 .. code-block:: Python from radis.tools.fitting import LTEModel def LTEModel_withslitnorm(factory, fit_parameters, fixed_parameters): s = LTEModel(factory, fit_parameters, fixed_parameters) # we could also have added a fittable parameter, such as an offset, # or made the slit width a fittable parameter. # ... any parameter in model_input will be fitted. s.offset(0, "nm") # or we could have used a fittable parameter below : # s.offset(model_input["offset"], 'nm') # Alternative: with a wavelength offset # WARNING: very sensitive parameter # copy_parameters = fit_parameters.copy() # offset = copy_parameters["offset"] # copy_parameters.pop("offset") # s = LTEModel(factory, copy_parameters, fixed_parameters) # s.offset(offset, 'nm') # Comment: # We could also have made the slit width a fittable parameter. # ... any parameter in model_input will be fitted. # Here we simply employ a fixed slit. s.apply_slit(1.4, "nm") return s.take("radiance").normalize() .. GENERATED FROM PYTHON SOURCE LINES 76-77 using :py:meth:`~radis.lbl.factory.SpectrumFactory.fit_legacy` .. GENERATED FROM PYTHON SOURCE LINES 77-121 .. code-block:: Python import astropy.units as u sf = SpectrumFactory( wlmin * u.nm, wlmax * u.nm, molecule="CO2", wstep=0.001, # cm-1 pressure=1 * 1e-3, # bar cutoff=1e-25, isotope="1,2", path_length=10, # cm-1 mole_fraction=1, truncation=1, # cm-1 verbose=0, ) sf.warnings["MissingSelfBroadeningWarning"] = "ignore" sf.warnings["HighTemperatureWarning"] = "ignore" sf.load_databank( "HITRAN-CO2-TEST" ) # see 'fetch_databank' below for a more general application # sf.fetch_databank("hitemp") #use "hitemp" or another database s_best, best = sf.fit_legacy( s_exp.take("radiance"), model=LTEModel_withslitnorm, fit_parameters={ "Tgas": 1450, # "offset": 0 }, bounds={ "Tgas": [300, 2000], # "offset": [-1, 1], }, plot=True, solver_options={ "maxiter": 15, # 👈 increase to let the fit converge "ftol": 1e-15, # "gtol": 1e-10, # "eps":1e-5 }, verbose=2, ) # plot_diff(s_exp, s_best) # , show_ruler=True) .. rst-class:: sphx-glr-horizontal * .. image-sg:: /auto_examples/3_Fitting/images/sphx_glr_plot4_legacyFit_Tgas_001.png :alt: plot4 legacyFit Tgas :srcset: /auto_examples/3_Fitting/images/sphx_glr_plot4_legacyFit_Tgas_001.png :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/3_Fitting/images/sphx_glr_plot4_legacyFit_Tgas_002.png :alt: plot4 legacyFit Tgas :srcset: /auto_examples/3_Fitting/images/sphx_glr_plot4_legacyFit_Tgas_002.png :class: sphx-glr-multi-img .. rst-class:: sphx-glr-script-out .. code-block:: none /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/db/molparam.py:252: FutureWarning: The 'delim_whitespace' keyword in pd.read_csv is deprecated and will be removed in a future version. Use ``sep='\s+'`` instead /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/api/hitranapi.py:128: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method. The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy. For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object. /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/api/hitranapi.py:128: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method. The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy. For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object. /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/api/hitranapi.py:128: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method. The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy. For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object. /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/api/hitranapi.py:128: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method. The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy. For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object. /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/api/hitranapi.py:128: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method. The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy. For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object. /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/api/hitranapi.py:128: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method. The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy. For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object. /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/api/hitranapi.py:128: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method. The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy. For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object. /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/api/hitranapi.py:128: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method. The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy. For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object. /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/api/hitranapi.py:128: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method. The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy. For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object. /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/api/hitranapi.py:128: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method. The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy. For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object. /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/api/hitranapi.py:128: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method. The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy. For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object. /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/api/tools.py:280: FutureWarning: Downcasting behavior in `replace` is deprecated and will be removed in a future version. To retain the old behavior, explicitly call `result.infer_objects(copy=False)`. To opt-in to the future behavior, set `pd.set_option('future.no_silent_downcasting', True)` /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/log.py:54: UserWarning: Reference databank (2391.79-2399.14cm-1) has 0 lines in range (2391.69-2399.15cm-1) for isotope 2. Change your range or isotope options /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. ------------------------------ TYPICAL FIT CALCULATION TIME: Fit (in progress) profiler : spectrum_calculation 0.026s ████████████████ check_line_databank 0.001s reinitialize 0.002s █ copy_database 0.000s memory_usage_warning 0.002s █ reset_population 0.000s scaled_eq_linestrength 0.002s █ applied_linestrength_cutoff 0.001s calc_lineshift 0.001s calc_hwhm 0.004s ██ generate_wavenumber_arrays 0.000s calc_line_broadening 0.012s ███████ precompute_LDM_lineshapes 0.002s █ LDM_Initialized_vectors 0.000s LDM_closest_matching_line 0.000s LDM_Distribute_lines 0.006s ███ LDM_convolve 0.004s ██ calc_other_spectral_quan 0.002s █ generate_spectrum_obj 0.000s ------------------------------ /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: LinestrengthCutoffWarning: Estimated error after discarding lines is large: 0.07%. Consider reducing cutoff /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. Now starting the fitting process: --------------------------------- /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. Tgas=1150.0, Residual: 0.0105 🏆 /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. Tgas=1170.0, Residual: 0.0098 🏆 /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. Tgas=1150.0, Residual: 0.0105 /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. Tgas=1170.0, Residual: 0.0098 🏆 /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. Tgas=2000.0, Residual: 0.0128 /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. Tgas=1980.0, Residual: 0.0128 /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. Tgas=1396.0, Residual: 0.0034 🏆 /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. Tgas=1416.0, Residual: 0.0031 🏆 /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. Tgas=1396.0, Residual: 0.0034 /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. Tgas=1416.0, Residual: 0.0031 🏆 /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. Tgas=1396.0, Residual: 0.0034 /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. Tgas=1416.0, Residual: 0.0031 🏆 /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. Tgas=1396.0, Residual: 0.0034 /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. Tgas=1416.0, Residual: 0.0031 🏆 /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. Tgas=1396.0, Residual: 0.0034 /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. Tgas=1416.0, Residual: 0.0031 🏆 /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. Tgas=1396.0, Residual: 0.0034 /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. Tgas=1416.0, Residual: 0.0031 🏆 /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. Tgas=1396.0, Residual: 0.0034 /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. Tgas=1416.0, Residual: 0.0031 🏆 /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. Tgas=1396.0, Residual: 0.0034 /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. Tgas=1416.0, Residual: 0.0031 🏆 /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. Tgas=1396.0, Residual: 0.0034 /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. Tgas=1416.0, Residual: 0.0031 🏆 /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. Tgas=1397.0, Residual: 0.0034 /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. Tgas=1417.0, Residual: 0.0030 🏆 /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. Tgas=1402.0, Residual: 0.0033 /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. Tgas=1422.0, Residual: 0.0030 🏆 /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. Tgas=1420.0, Residual: 0.0030 /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. Tgas=1440.0, Residual: 0.0028 🏆 /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. Tgas=1458.0, Residual: 0.0027 🏆 /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. Tgas=1478.0, Residual: 0.0028 /home/docs/checkouts/readthedocs.org/user_builds/radis/checkouts/latest/radis/misc/warning.py:427: PerformanceWarning: 'object' type column found in database, calculations and memory usage would be faster with a numeric type. Possible solution is to not use 'save_memory' and convert the columns to dtype. Init ['Tgas'] = [1150.][''] Final ['Tgas'] = [1458.][''] message: CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL success: True status: 0 fun: 0.0027300270273361805 x: [ 1.458e+03] nit: 4 jac: [ 3.178e-06] nfev: 32 njev: 16 hess_inv: <1x1 LbfgsInvHessProduct with dtype=float64> Best ['Tgas'] = [1457.50267416][''] reached at iteration 32/32 .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 3.338 seconds) .. _sphx_glr_download_auto_examples_3_Fitting_plot4_legacyFit_Tgas.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot4_legacyFit_Tgas.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot4_legacyFit_Tgas.py `