Orbit Plots

class radvel.plot.orbit_plots.GPMultipanelPlot(post, saveplot=None, epoch=2450000, yscale_auto=False, yscale_sigma=3.0, phase_nrows=None, phase_ncols=None, uparams=None, rv_phase_space=0.08, telfmts={}, legend=True, phase_limits=[], nobin=False, phasetext_size='large', figwidth=7.5, fit_linewidth=2.0, set_xlim=None, text_size=9, legend_kwargs={'loc': 'best'}, subtract_gp_mean_model=False, plot_likelihoods_separately=False, subtract_orbit_model=False, status=None, separate_orbit_gp=False)[source]

Class to handle the creation of RV multipanel plots for posteriors fitted using Gaussian Processes.

Takes the same args as MultipanelPlot, with a few additional bells and whistles…

Parameters:
  • subtract_gp_mean_model (bool, optional) – if True, subtract the Gaussian process mean max likelihood model from the data and the model when plotting the results. Default: False.
  • plot_likelihoods_separately (bool, optional) – if True, plot a separate panel for each Likelihood object. Default: False
  • subtract_orbit_model (bool, optional) – if True, subtract the best-fit orbit model from the data and the model when plotting the results. Useful for seeing the structure of correlated noise in the data. Default: False.
  • status (ConfigParser) – (optional) result of radvel.driver.load_status on the .stat status file
plot_gp_like(like, orbit_model4data, ci)[source]

Plot a single Gaussian Process Likleihood object in the current Axes, including Gaussian Process uncertainty bands.

Parameters:
  • like (radvel.GPLikelihood) – radvel.GPLikelihood object. The model plotted will be generated from like.params.
  • orbit_model4data (numpy array) –
  • ci (int) – index to use when choosing a color to plot from radvel.plot.default_colors. This is only used if the Likelihood object being plotted is not in the list of defaults. Increments by 1 if it is used.

Returns: current (possibly changed) value of the input ci

plot_multipanel(nophase=False)[source]

Provision and plot an RV multipanel plot for a Posterior object containing one or more Gaussian Process Likelihood objects.

Parameters:nophase (bool, optional) – if True, don’t include phase plots. Default: False.
Returns:
  • current matplotlib Figure object
  • list of Axes objects
Return type:tuple containing
plot_timeseries()[source]

Make a plot of the RV data and Gaussian Process + orbit model in the current Axes.

class radvel.plot.orbit_plots.MultipanelPlot(post, saveplot=None, epoch=2450000, yscale_auto=False, yscale_sigma=3.0, phase_nrows=None, phase_ncols=None, uparams=None, telfmts={}, legend=True, phase_limits=[], nobin=False, phasetext_size='large', rv_phase_space=0.08, figwidth=7.5, fit_linewidth=2.0, set_xlim=None, text_size=9, highlight_last=False, show_rms=False, legend_kwargs={'loc': 'best'}, status=None)[source]

Class to handle the creation of RV multipanel plots.

Parameters:
  • post (radvel.Posterior) – radvel.Posterior object. The model plotted will be generated from post.params
  • epoch (int, optional) – epoch to subtract off of all time measurements
  • yscale_auto (bool, optional) – Use matplotlib auto y-axis scaling (default: False)
  • yscale_sigma (float, optional) – Scale y-axis limits for all panels to be +/- yscale_sigma*(RMS of data plotted) if yscale_auto==False
  • phase_nrows (int, optional) – number of columns in the phase folded plots. Default is nplanets.
  • phase_ncols (int, optional) – number of columns in the phase folded plots. Default is 1.
  • uparams (dict, optional) – parameter uncertainties, must contain ‘per’, ‘k’, and ‘e’ keys.
  • telfmts (dict, optional) –

    dictionary of dictionaries mapping instrument suffix to plotting format code. Example:

    telfmts = {
    ‘hires’: dict(fmt=’o’,label=’HIRES’), ‘harps-n’ dict(fmt=’s’)

    }

  • legend (bool, optional) – include legend on plot? Default: True.
  • phase_limits (list, optional) – two element list specifying pyplot.xlim bounds for phase-folded plots. Useful for partial orbits.
  • nobin (bool, optional) – If True do not show binned data on phase plots. Will default to True if total number of measurements is less then 20.
  • phasetext_size (string, optional) – fontsize for text in phase plots. Choice of {‘xx-small’, ‘x-small’, ‘small’, ‘medium’, ‘large’, ‘x-large’, ‘xx-large’}. Default: ‘x-small’.
  • rv_phase_space (float, optional) – amount of space to leave between orbit/residual plot and phase plots.
  • figwidth (float, optional) – width of the figures to be produced. Default: 7.5 (spans a page with 0.5 in margins)
  • fit_linewidth (float, optional) – linewidth to use for orbit model lines in phase-folded plots and residuals plots.
  • set_xlim (list of float) – limits to use for x-axes of the timeseries and residuals plots, in JD - epoch. Ex: [7000., 70005.]
  • text_size (int) – set matplotlib.rcParams[‘font.size’] (default: 9)
  • highlight_last (bool) – make the most recent measurement much larger in all panels
  • show_rms (bool) – show RMS of the residuals by instrument in the legend
  • legend_kwargs (dict) – dict of options to pass to legend (plotted in top panel)
  • status (ConfigParser) – (optional) result of radvel.driver.load_status on the .stat status file
plot_multipanel(nophase=False, letter_labels=True)[source]

Provision and plot an RV multipanel plot

Parameters:
  • nophase (bool, optional) – if True, don’t include phase plots. Default: False.
  • letter_labels (bool, optional) – if True, include letter labels on orbit and residual plots. Default: True.
Returns:

  • current matplotlib Figure object
  • list of Axes objects

Return type:

tuple containing

plot_phasefold(pltletter, pnum)[source]

Plot phased orbit plots for each planet in the fit.

Parameters:
  • pltletter (int) – integer representation of letter to be printed in the corner of the first phase plot. Ex: ord(“a”) gives 97, so the input should be 97.
  • pnum (int) – the number of the planet to be plotted. Must be the same as the number used to define a planet’s Parameter objects (e.g. ‘per1’ is for planet #1)
plot_residuals()[source]

Make a plot of residuals in the current Axes.

plot_timeseries()[source]

Make a plot of the RV data and model in the current Axes.