redback.plotting.IntegratedFluxOpticalPlotter

class redback.plotting.IntegratedFluxOpticalPlotter(transient: Optional[Transient], **kwargs)[source]

Bases: MagnitudePlotter

__init__(transient: Optional[Transient], **kwargs) None
Parameters:
  • transient – An instance of redback.transient.Transient. Contains the data to be plotted.

  • kwargs – Additional kwargs the plotter uses. ——-

Keyword Arguments:
  • capsize – Same as matplotlib capsize.

  • bands_to_plot – List of bands to plot in plot lightcurve and multiband lightcurve. Default is active bands.

  • legend_location – Same as matplotlib legend location.

  • legend_cols – Same as matplotlib legend columns.

  • color – Color of the data points.

  • band_colors – A dictionary with the colors of the bands.

  • band_labels – List with the names of the bands.

  • band_scaling – Dict with the scaling for each band. First entry should be {type: ‘+’ or ‘x’} for different types.

  • dpi – Same as matplotlib dpi.

  • elinewidth – same as matplotlib elinewidth

  • errorbar_fmt – ‘fmt’ argument of ax.errorbar.

  • model – str or callable, the model to plot.

  • ms – Same as matplotlib markersize.

  • axis_tick_params_padpad argument in calls to ax.tick_params when setting the axes.

  • max_likelihood_alphaalpha argument, i.e. transparency, when plotting the max likelihood curve.

  • random_sample_alphaalpha argument, i.e. transparency, when plotting random sample curves.

  • uncertainty_band_alphaalpha argument, i.e. transparency, when plotting a credible band.

  • max_likelihood_color – Color of the maximum likelihood curve.

  • random_sample_color – Color of the random sample curves.

  • bbox_inches – Setting for saving plots. Default is ‘tight’.

  • linewidth – Same as matplotlib linewidth

  • zorder – Same as matplotlib zorder

  • xy – For `ax.annotate’ x and y coordinates of the point to annotate.

  • xycoords – The coordinate system xy is given in. Default is ‘axes fraction’

  • horizontalalignment – Horizontal alignment of the annotation. Default is ‘right’

  • annotation_sizesize argument of of ax.annotate.

  • fontsize_axes – Font size of the x and y labels.

  • fontsize_legend – Font size of the legend.

  • fontsize_figure – Font size of the figure. Relevant for multiband plots. Used on supxlabel and supylabel.

  • fontsize_ticks – Font size of the axis ticks.

  • hspace – Argument for subplots_adjust, sets horizontal spacing between panels.

  • wspace – Argument for subplots_adjust, sets horizontal spacing between panels.

  • plot_others – Whether to plot additional bands in the data plot, all in the same colors

  • random_models – Number of random draws to use to calculate credible bands or to plot.

  • uncertainty_mode – ‘random_models’: Plot random draws from the available parameter sets. ‘credible_intervals’: Plot a credible interval that is calculated based on the available parameter sets.

  • reference_mjd_date – Date to use as reference point for the x axis. Default is the first date in the data.

  • credible_interval_level – 0.9: Plot the 90% credible interval.

  • plot_max_likelihood – Plots the draw corresponding to the maximum likelihood. Default is ‘True’.

  • set_same_color_per_subplot – Sets the lightcurve to be the same color as the data per subplot. Default is ‘True’.

  • xlim_high_multiplier – Adjust the maximum xlim based on available x values.

  • xlim_low_multiplier – Adjust the minimum xlim based on available x values.

  • ylim_high_multiplier – Adjust the maximum ylim based on available x values.

  • ylim_low_multiplier – Adjust the minimum ylim based on available x values.

__call__(**kwargs)

Call self as a function.

Methods

__init__(transient, **kwargs)

param transient:

An instance of redback.transient.Transient. Contains the data to be plotted.

get_filename(default)

plot_data([axes, save, show])

Plots the Magnitude data and returns Axes.

plot_lightcurve([axes, save, show])

Plots the Magnitude data and returns Axes.

plot_multiband([figure, axes, save, show])

Plots the Magnitude multiband data and returns Axes.

plot_multiband_lightcurve([figure, axes, ...])

Plots the Magnitude multiband lightcurve and returns Axes.

Attributes

band_label_generator

keyword_docstring

plot_data(axes: Optional[Axes] = None, save: bool = True, show: bool = True) Axes

Plots the Magnitude data and returns Axes.

Parameters:
  • axes (Union[matplotlib.axes.Axes, None], optional) – Matplotlib axes to plot the data into. Useful for user specific modifications to the plot.

  • save (bool) – Whether to save the plot. (Default value = True)

  • show (bool) – Whether to show the plot. (Default value = True)

Returns:

The axes with the plot.

Return type:

matplotlib.axes.Axes

plot_lightcurve(axes: Optional[Axes] = None, save: bool = True, show: bool = True) Axes

Plots the Magnitude data and returns Axes.

Parameters:
  • axes (Union[matplotlib.axes.Axes, None], optional) – Matplotlib axes to plot the lightcurve into. Useful for user specific modifications to the plot.

  • save (bool) – Whether to save the plot. (Default value = True)

  • show (bool) – Whether to show the plot. (Default value = True)

Returns:

The axes with the plot.

Return type:

matplotlib.axes.Axes

plot_multiband(figure: Optional[Figure] = None, axes: Optional[Axes] = None, save: bool = True, show: bool = True) Axes

Plots the Magnitude multiband data and returns Axes.

Parameters:
  • figure (matplotlib.figure.Figure) – Matplotlib figure to plot the data into.

  • axes (Union[matplotlib.axes.Axes, None], optional) – Matplotlib axes to plot the data into. Useful for user specific modifications to the plot.

  • save (bool) – Whether to save the plot. (Default value = True)

  • show (bool) – Whether to show the plot. (Default value = True)

Returns:

The axes with the plot.

Return type:

matplotlib.axes.Axes

plot_multiband_lightcurve(figure: Optional[Figure] = None, axes: Optional[Axes] = None, save: bool = True, show: bool = True) Axes

Plots the Magnitude multiband lightcurve and returns Axes.

Parameters:
  • figure – Matplotlib figure to plot the data into.

  • axes (Union[matplotlib.axes.Axes, None], optional) – Matplotlib axes to plot the data into. Useful for user specific modifications to the plot.

  • save (bool) – Whether to save the plot. (Default value = True)

  • show (bool) – Whether to show the plot. (Default value = True)

Returns:

The axes with the plot.

Return type:

matplotlib.axes.Axes