Plotting

Created on Wed Jun 12 11:13 2024

@author: MCR

Light curve plotting functions.

exouprf.plotting.make_corner_plot(filename, mcmc_burnin=None, mcmc_thin=15, labels=None, outpdf=None, log_params=None, drop_chains=None)

Make a corner plot of fitted posterior distributions.

Parameters:
  • filename (str) – Path to file with MCMC fit outputs.

  • mcmc_burnin (int) – Number of steps to discard as burn in. Defaults to 75% of chain length. MCMC only.

  • mcmc_thin (int) – Increment by which to thin chains. MCMC only.

  • labels (list(str)) – Fitted parameter names.

  • outpdf (PdfPages) – Path to file to save plot.

  • log_params (list(int), None) – Indices of parameters to show on log scale.

  • drop_chains (list(int), None) – Indices of chains to drop.

exouprf.plotting.make_lightcurve_plot(t, data, model, scatter, errors=None, nfit=None, outpdf=None, title=None, systematics=None, rasterized=False, nbin=10)

Plot results of a light curve fit.

Parameters:
  • t (ndarray(float)) – Time axis for obsevrations (ideally in hours from mid-transit).

  • data (ndarray(float)) – Light curve observations.

  • model (ndarray(float)) – Light curve model.

  • scatter (float) – Fitted scatter value or inflated errors.

  • errors (float) – Original data errors.

  • nfit (int) – Number of fitted parameters.

  • outpdf (PdfPages) – Path to file to save plot.

  • title (str) – Plot title.

  • systematics (ndarray(float)) – Fitted systematics model.

  • rasterized (bool) – If True, rasterize plot.

  • nbin (int) – Number of data points to bin in plot.

exouprf.plotting.make_noise_binning_plot(residuals, integration_time=None, labels=None, just_calculate=False, outpdf=None)

Make a ‘Not an Allan Variance Plot” (TM) for a given set of residuals. Original routine by Hannah Wakeford, adapted by MCR.

Parameters:
  • residuals (list) – List of arrays of residuals to bin.

  • integration_time (float) – Integration time for the observations.

  • labels (list(str)) – List of labels corresponding to each of the passed residuals. Must have the same size as residuals.

  • just_calculate (bool) – If True, don’t plot anything. Just calculate the binning statistics and return them.

exouprf.plotting.plot_mcmc_chains(filename, labels=None, log_params=None, highlight_chains=None, drop_chains=None, outpdf=None)

Plot MCMC chains.

Parameters:
  • filename (str) – MCMC output file.

  • labels (list(str)) – Fitted parameter names.

  • log_params (list(str), None) – Indices of parameters to plot in log-space.

  • highlight_chains (list(int), None) – Indices of chains to highlight.

  • drop_chains (list(int), None) – Indices of chains to drop.

  • outpdf (str, None) – File to which to save plot.