pytmosph3r.plot.comparison
Module Contents
- class Comparison(models=None, title=None, suffix=None, cmap='Paired', out_folder='.', interactive=None)[source]
Bases:
pytmosph3r.plot.modelplot.Plot
Compare (and plot) multiple models.
Select models to compare with
models
.- property wns
- property wls
Returns the wavelength array for the bin centers (in micron)
- transmittance_map(ids=None, *args, **kwargs)[source]
Same parameters as
plot.Plot.transmittance_map()
.- Parameters:
ids (list, optional) – List of ids (label parameter) of models to plot. For example [‘1D’, ‘2D’, ‘3D’] if you created
Plot(model, label='1D')
, etc.
- plot_spectra(mode=None, title='Spectra', ids=None, ax=None, figsize=(4, 4), legend=True, ref=0, savename=None, func='plot_spectrum', *args, **kwargs)[source]
Plot spectra (select mode for emission/transmission, etc).
- Parameters:
mode (str, optional) – Among [transmission, emission, lightcurve, phasecurve]. Defaults to None (in which case the default spectrum is chosen).
ids (list, optional) – List of ids (label parameter) of models to plot. For example [‘1D’, ‘2D’, ‘3D’] if you created
Plot(model, label='1D')
, etc.ref (int, optional) – Index of the reference curve (plot as dashed). Defaults to None.
savename (str, optional) – Name of output file. Defaults to title.
func (str, optional) – Plot function to call for each model. Defaults to
plot_spectrum()
.
- plot_curves(mode='lightcurve', title='Lightcurves', wl=None, wn=None, *args, **kwargs)[source]
Same parameters as
plot_curve()
. You can select IDs the same way as forplot_spectra()
.
- plot_lightcurves(*args, **kwargs)[source]
Same arguments as
plot_curves()
.
- plot_phasecurves(*args, **kwargs)[source]
Same arguments as
plot_curves()
.
- 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)[source]
Compare fluxes together.
- Parameters:
mode (str, optional) – Among [transmission, emission, lightcurve, phasecurve]. Defaults to None (in which case the default spectrum is chosen).
ids (list, optional) – List of differences of ids (label parameter). Example of use:
comparison.diff_fluxes(ids=[["3D", "1D"],["2D", "1D"]])
if you createdPlot(model, label='1D')
, etc..ref (int, optional) – Index of model to take as a reference. Defaults to -1.
ref_phase (float, optional) – if you want to compare the flux at phase against ref_phase.
ppm (bool) – Y units in ppm or not.
x_axis (str) – Choose X axis as “wls” or “wns”, for wavelengths or wavenumbers, respectively.
abs (bool, optional) – Plot absolute difference. Defaults to False.
- diff_spectra(phase=None, *args, **kwargs)[source]
Compare models using ids. Example of use:
comparison.diff_spectra(ids=[["3D", "1D"],["2D", "1D"]])
if you createdPlot(model, label='1D')
, etc.. Seediff_fluxes()
for more information.
- diff_curves(x_axis: pytmosph3r.plot.plotutils.Literal[times, phases] = 'times', xlog=False, *args, **kwargs)[source]
Compare phase/light-curves together. See
diff_fluxes()
for more information.
- diff_lightcurves(wl=None, wn=None, *args, **kwargs)[source]
See
diff_fluxes()
for more information.
- diff_phasecurves(wl=None, wn=None, *args, **kwargs)[source]
See
diff_fluxes()
for more information.
- plot_tp(ax=None, title='PT profile', logx=False, logy=True, figsize=(9, 3))[source]
TP profile of one column.
- plot_zp(ax=None, title='ZP profile', logx=True, logy=False, figsize=(9, 3))[source]
ZP profile of one column.
- plot_xprofile(ax=None, figsize=(9, 3), *args, **kwargs)[source]
Mixing ratio. longitude = 1 plots the terminator. Outdated?
- legend2D(axes)[source]
Legend for rows and columns (latitudes and longitudes) when using
Plot.plot_columns()
.
- plot_diff_spectra(mode=None, plots=None, compares=None, suffix=None, abs=False, figsize=(9, 5), *args, **kwargs)[source]
Plot spectra and their differences. See parameters of
plot_spectra()
anddiff_spectra()
for more information.- Parameters:
mode (str, optional) – Among [transmission, emission, lightcurve, phasecurve]. Defaults to None (in which case the default spectrum is chosen).
plots (list, optional) – List of ids (label parameter) of models to plot. see parameter ids of
plot_spectra()
.compares (list, optional) – List (label parameter) of differences of ids to plot. see parameter ids of
diff_fluxes()
.phase (ndarray, optional) – List of phases to plot (in curve modes only) in degrees.
- plot_diff_curves(mode='lightcurve', plots=None, compares=None, suffix=None, abs=False, figsize=(9, 5), *args, **kwargs)[source]
Plot light/phase-curves and their differences. See parameters of
plot_curves()
anddiff_curves()
for more information.- Parameters:
plots (list, optional) – List of ids (label parameter) of models to plot. see parameter ids of
plot_spectra()
.compares (list, optional) – List (label parameter) of differences of ids to plot. see parameter ids of
diff_fluxes()
.wl/wn (float, optional) – Wavelength/wavenumber of the curve (can be a list).
- plot_diff_lightcurves(*args, **kwargs)[source]
See
plot_diff_curves()
for more information.
- plot_diff_phasecurves(*args, **kwargs)[source]
See
plot_diff_curves()
for more information.
- 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)[source]
Plot curve residuals (select mode for light/phase-curve). See
plot_curves()
for more parameters.- Parameters:
mode (str, optional) – Among [lightcurve, phasecurve]. Defaults to lightcurve.
ids (list, optional) – List of ids (label parameter) of models to plot. For example [‘1D’, ‘2D’, ‘3D’] if you created
Plot(model, label='1D')
, etc.ref (int, optional) – Index of the reference curve (plot as dashed). Defaults to None.
savename (str, optional) – Prefix for output filenames. Defaults to ‘residuals_2d’.