Plotting

class rvsearch.plots.CompletenessPlots(completeness, searches=None)[source]

Class to plot results of injection/recovery tests

Parameters
  • completeness (inject.Completeness) – completeness object

  • planets (numpy array) – masses and semi-major axes for planets

  • searches (list) – list of rvsearch.Search objects. If present, overplot planets detected in all Search objects.

__init__(completeness, searches=None)[source]

Initialize self. See help(type(self)) for accurate signature.

__weakref__

list of weak references to the object (if defined)

completeness_plot(title='', xlabel='', ylabel='', colorbar=True, hide_points=False)[source]

Plot completeness contours

Parameters
  • title (string) – (optional) plot title

  • xlabel (string) – (optional) x-axis label

  • ylabel (string) – (optional) y-axis label

  • colorbar (bool) – (optional) plot colorbar

  • hide_points (bool) – (optional) if true hide individual injection/recovery points

class rvsearch.plots.CustomTicker(base=10.0, labelOnlyBase=False, minor_thresholds=None, linthresh=None)[source]
__call__(x, pos=None)[source]

Return the format for tick value x.

The position pos is ignored.

class rvsearch.plots.PeriodModelPlot(search, saveplot=None, epoch=2450000, yscale_auto=False, yscale_sigma=3.0, phase_nrows=None, phase_ncols=None, summary_ncols=2, uparams=None, telfmts={'APF': {'color': 'g', 'fmt': 'd', 'label': 'APF'}, 'HARPS': {'color': 'firebrick', 'fmt': 's', 'label': 'HARPS'}, 'HARPS-N': {'color': 'firebrick', 'fmt': '^', 'label': 'HARPS-N'}, 'HIRES': {'color': 'k', 'label': 'HIRES', 'marker': 'o', 'mew': 1}, 'HIRES_RJ': {'color': 'k', 'label': 'HIRES', 'marker': 'o', 'mew': 1}, 'HIRES_RK': {'color': 'k', 'fmt': 's', 'label': 'HIRES pre 2004', 'mew': 1, 'mfc': 'none'}, 'LICK': {'color': 'g', 'fmt': '*', 'label': 'LICK'}, 'PFS': {'color': 'magenta', 'fmt': 'p', 'label': 'PFS'}, 'a': {'color': 'g', 'fmt': 'd', 'label': 'APF'}, 'apf': {'color': 'g', 'fmt': 'd', 'label': 'APF'}, 'h': {'color': 'firebrick', 'fmt': 's', 'label': 'HARPS'}, 'harps': {'color': 'firebrick', 'fmt': 's', 'label': 'HARPS'}, 'harps-n': {'color': 'firebrick', 'fmt': '^', 'label': 'HARPS-N'}, 'hires': {'color': 'k', 'label': 'HIRES', 'marker': 'o', 'mew': 1}, 'hires_rj': {'color': 'k', 'label': 'HIRES', 'marker': 'o', 'mew': 1}, 'hires_rk': {'color': 'k', 'fmt': 's', 'label': 'HIRES pre 2004', 'mew': 1, 'mfc': 'none'}, 'j': {'color': 'k', 'label': 'HIRES', 'marker': 'o', 'mew': 1}, 'k': {'color': 'k', 'fmt': 's', 'label': 'HIRES pre 2004', 'mew': 1, 'mfc': 'none'}, 'l': {'color': 'g', 'fmt': '*', 'label': 'LICK'}, 'lick': {'color': 'g', 'fmt': '*', 'label': 'LICK'}, 'pfs': {'color': 'magenta', 'fmt': 'p', 'label': 'PFS'}}, legend=True, phase_limits=[], nobin=False, phasetext_size='small', rv_phase_space=0.06, figwidth=9.5, fit_linewidth=2.0, show_rms=False, highlight_last=False, set_xlim=None, text_size=9, legend_kwargs={'loc': 'best'})[source]
Class to jointly plot the periodograms, best model phaseplots, and

window function for each search iteration.

Parameters
  • search (rvsearch.Search) – rvsearch.Search object. This includes the periodograms and best-fit RadVel posteriors for each added planet.

  • saveplot (string) – path to save plot

  • 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)

  • legend_kwargs (dict) – dict of options to pass to legend (plotted in top panel)

__init__(search, saveplot=None, epoch=2450000, yscale_auto=False, yscale_sigma=3.0, phase_nrows=None, phase_ncols=None, summary_ncols=2, uparams=None, telfmts={'APF': {'color': 'g', 'fmt': 'd', 'label': 'APF'}, 'HARPS': {'color': 'firebrick', 'fmt': 's', 'label': 'HARPS'}, 'HARPS-N': {'color': 'firebrick', 'fmt': '^', 'label': 'HARPS-N'}, 'HIRES': {'color': 'k', 'label': 'HIRES', 'marker': 'o', 'mew': 1}, 'HIRES_RJ': {'color': 'k', 'label': 'HIRES', 'marker': 'o', 'mew': 1}, 'HIRES_RK': {'color': 'k', 'fmt': 's', 'label': 'HIRES pre 2004', 'mew': 1, 'mfc': 'none'}, 'LICK': {'color': 'g', 'fmt': '*', 'label': 'LICK'}, 'PFS': {'color': 'magenta', 'fmt': 'p', 'label': 'PFS'}, 'a': {'color': 'g', 'fmt': 'd', 'label': 'APF'}, 'apf': {'color': 'g', 'fmt': 'd', 'label': 'APF'}, 'h': {'color': 'firebrick', 'fmt': 's', 'label': 'HARPS'}, 'harps': {'color': 'firebrick', 'fmt': 's', 'label': 'HARPS'}, 'harps-n': {'color': 'firebrick', 'fmt': '^', 'label': 'HARPS-N'}, 'hires': {'color': 'k', 'label': 'HIRES', 'marker': 'o', 'mew': 1}, 'hires_rj': {'color': 'k', 'label': 'HIRES', 'marker': 'o', 'mew': 1}, 'hires_rk': {'color': 'k', 'fmt': 's', 'label': 'HIRES pre 2004', 'mew': 1, 'mfc': 'none'}, 'j': {'color': 'k', 'label': 'HIRES', 'marker': 'o', 'mew': 1}, 'k': {'color': 'k', 'fmt': 's', 'label': 'HIRES pre 2004', 'mew': 1, 'mfc': 'none'}, 'l': {'color': 'g', 'fmt': '*', 'label': 'LICK'}, 'lick': {'color': 'g', 'fmt': '*', 'label': 'LICK'}, 'pfs': {'color': 'magenta', 'fmt': 'p', 'label': 'PFS'}}, legend=True, phase_limits=[], nobin=False, phasetext_size='small', rv_phase_space=0.06, figwidth=9.5, fit_linewidth=2.0, show_rms=False, highlight_last=False, set_xlim=None, text_size=9, legend_kwargs={'loc': 'best'})[source]

Initialize self. See help(type(self)) for accurate signature.

plot_periodogram(pltletter, pnum=0, alias=True, floor=True)[source]

Plot periodogram for a given search iteration.

plot_summary(letter_labels=True)[source]

Provision and plot a search summary plot

Parameters

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_window(pltletter)[source]

Plot the window function of the data, for each instrument.