:py:mod:`pytmosph3r.plot.comparison` ==================================== .. py:module:: pytmosph3r.plot.comparison Module Contents --------------- .. py:class:: Comparison(models=None, title=None, suffix=None, cmap='Paired', out_folder='.', interactive=None) Bases: :py:obj:`pytmosph3r.plot.modelplot.Plot` Compare (and plot) multiple models. Select models to compare with :attr:`models`. .. py:property:: wns .. py:property:: wls Returns the wavelength array for the bin centers (in micron) .. py:method:: transmittance_map(ids=None, *args, **kwargs) Same parameters as :func:`.plot.Plot.transmittance_map`. :param ids: List of ids (`label` parameter) of models to plot. For example ['1D', '2D', '3D'] if you created :code:`Plot(model, label='1D')`, etc. :type ids: list, optional .. py:method:: plot_spectra(mode=None, title='Spectra', ids=None, ax=None, figsize=(4, 4), legend=True, ref=0, savename=None, func='plot_spectrum', *args, **kwargs) Plot spectra (select `mode` for emission/transmission, etc). :param mode: Among [transmission, emission, lightcurve, phasecurve]. Defaults to None (in which case the default spectrum is chosen). :type mode: str, optional :param ids: List of ids (`label` parameter) of models to plot. For example ['1D', '2D', '3D'] if you created :code:`Plot(model, label='1D')`, etc. :type ids: list, optional :param ref: Index of the reference curve (plot as dashed). Defaults to None. :type ref: int, optional :param savename: Name of output file. Defaults to title. :type savename: str, optional :param func: Plot function to call for each model. Defaults to :func:`~pytmosph3r.plot.modelplot.ModelPlot.plot_spectrum`. :type func: str, optional .. py:method:: plot_curves(mode='lightcurve', title='Lightcurves', wl=None, wn=None, *args, **kwargs) Same parameters as :func:`~pytmosph3r.plot.modelplot.CurvePlot.plot_curve`. You can select IDs the same way as for :func:`plot_spectra`. .. py:method:: plot_lightcurves(*args, **kwargs) Same arguments as :func:`plot_curves`. .. py:method:: plot_phasecurves(*args, **kwargs) Same arguments as :func:`plot_curves`. .. py:method:: diff_fluxes(mode=None, title='Spectra', ids=None, ax=None, time=None, phase=None, wl=None, wn=None, xlog=True, ylog=False, ppm=None, abs=False, resolution=None, figsize=(4, 4), ylabel='Residual', x_axis='wls', x_units=None, ref=-1, ref_phase=None, savename=None, *args, **kwargs) Compare fluxes together. :param mode: Among [transmission, emission, lightcurve, phasecurve]. Defaults to None (in which case the default spectrum is chosen). :type mode: str, optional :param ids: List of differences of ids (`label` parameter). Example of use: :code:`comparison.diff_fluxes(ids=[["3D", "1D"],["2D", "1D"]])` if you created :code:`Plot(model, label='1D')`, etc.. :type ids: list, optional :param ref: Index of model to take as a reference. Defaults to -1. :type ref: int, optional :param ref_phase: if you want to compare the flux at `phase` against `ref_phase`. :type ref_phase: float, optional :param ppm: Y units in ppm or not. :type ppm: bool :param x_axis: Choose X axis as "wls" or "wns", for wavelengths or wavenumbers, respectively. :type x_axis: str :param abs: Plot absolute difference. Defaults to False. :type abs: bool, optional .. py:method:: diff_spectra(phase=None, *args, **kwargs) Compare models using ids. Example of use: :code:`comparison.diff_spectra(ids=[["3D", "1D"],["2D", "1D"]])` if you created :code:`Plot(model, label='1D')`, etc.. See :func:`diff_fluxes` for more information. .. py:method:: diff_curves(x_axis: pytmosph3r.plot.plotutils.Literal[times, phases] = 'times', xlog=False, *args, **kwargs) Compare phase/light-curves together. See :func:`diff_fluxes` for more information. .. py:method:: diff_lightcurves(wl=None, wn=None, *args, **kwargs) See :func:`diff_fluxes` for more information. .. py:method:: diff_phasecurves(wl=None, wn=None, *args, **kwargs) See :func:`diff_fluxes` for more information. .. py:method:: plot_tp(ax=None, title='PT profile', logx=False, logy=True, figsize=(9, 3)) TP profile of one column. .. py:method:: plot_zp(ax=None, title='ZP profile', logx=True, logy=False, figsize=(9, 3)) ZP profile of one column. .. py:method:: plot_xprofile(ax=None, figsize=(9, 3), *args, **kwargs) Mixing ratio. longitude = 1 plots the terminator. Outdated? .. py:method:: x_legend(axes, fig, legends) Place legend with model + gas labels. .. py:method:: tp_legend(axes, fig, *args, **kwargs) .. py:method:: zp_legend(axes, fig, *args, **kwargs) .. py:method:: comp_legend(axes, fig, *args, **kwargs) Place legend with model labels. .. py:method:: legend2D(axes) Legend for rows and columns (latitudes and longitudes) when using :func:`Plot.plot_columns`. .. py:method:: plot_diff_spectra(mode=None, plots=None, compares=None, suffix=None, abs=False, figsize=(9, 5), *args, **kwargs) Plot spectra and their differences. See parameters of :func:`plot_spectra` and :func:`diff_spectra` for more information. :param mode: Among [transmission, emission, lightcurve, phasecurve]. Defaults to None (in which case the default spectrum is chosen). :type mode: str, optional :param plots: List of ids (`label` parameter) of models to plot. see parameter `ids` of :func:`plot_spectra`. :type plots: list, optional :param compares: List (`label` parameter) of differences of ids to plot. see parameter `ids` of :func:`diff_fluxes`. :type compares: list, optional :param phase: List of phases to plot (in curve modes only) in degrees. :type phase: ndarray, optional .. py:method:: plot_diff_curves(mode='lightcurve', plots=None, compares=None, suffix=None, abs=False, figsize=(9, 5), *args, **kwargs) Plot light/phase-curves and their differences. See parameters of :func:`plot_curves` and :func:`diff_curves` for more information. :param plots: List of ids (`label` parameter) of models to plot. see parameter `ids` of :func:`plot_spectra`. :type plots: list, optional :param compares: List (`label` parameter) of differences of ids to plot. see parameter `ids` of :func:`diff_fluxes`. :type compares: list, optional :param wl/wn: Wavelength/wavenumber of the curve (can be a list). :type wl/wn: float, optional .. py:method:: plot_diff_lightcurves(*args, **kwargs) See :func:`plot_diff_curves` for more information. .. py:method:: plot_diff_phasecurves(*args, **kwargs) See :func:`plot_diff_curves` for more information. .. py:method:: plot_2d_fluxes_residuals(mode='lightcurve', ax=None, title='Lightcurve residuals', ids=None, ref=0, ppm=True, x_axis='wls', figsize=(5, 3.5), savename='residuals_2d', colorbar_kwargs={}, **kwargs) Plot curve residuals (select `mode` for light/phase-curve). See :func:`~pytmosph3r.plot.modelplot.CurvePlot.plot_curves` for more parameters. :param mode: Among [lightcurve, phasecurve]. Defaults to lightcurve. :type mode: str, optional :param ids: List of ids (`label` parameter) of models to plot. For example ['1D', '2D', '3D'] if you created :code:`Plot(model, label='1D')`, etc. :type ids: list, optional :param ref: Index of the reference curve (plot as dashed). Defaults to None. :type ref: int, optional :param savename: Prefix for output filenames. Defaults to 'residuals_2d'. :type savename: str, optional .. py:method:: plot_2d_lightcurves_residuals(*args, **kwargs) See :func:`plot_2d_fluxes_residuals`. .. py:method:: plot_2d_phasecurves_residuals(title='Phasecurve residuals', mode='phasecurve', *args, **kwargs) See :func:`plot_2d_fluxes_residuals`.