redback.plotting.LuminosityPlotter
- class redback.plotting.LuminosityPlotter(transient: Optional[Transient], **kwargs)[source]
Bases:
IntegratedFluxPlotter
- __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_pad – pad argument in calls to ax.tick_params when setting the axes.
max_likelihood_alpha – alpha argument, i.e. transparency, when plotting the max likelihood curve.
random_sample_alpha – alpha argument, i.e. transparency, when plotting random sample curves.
uncertainty_band_alpha – alpha 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_size – size 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 Integrated flux data and returns Axes.
plot_lightcurve
([axes, save, show])Plots the Integrated flux data and the lightcurve and returns Axes.
plot_residuals
([axes, save, show])Plots the residual of the Integrated flux data returns Axes.
Attributes
keyword_docstring
- plot_data(axes: Optional[Axes] = None, save: bool = True, show: bool = True) Axes
Plots the Integrated flux 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 Integrated flux data and the lightcurve 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_residuals(axes: Optional[Axes] = None, save: bool = True, show: bool = True) Axes
Plots the residual of the Integrated flux data returns Axes.
- Parameters:
axes – Matplotlib axes to plot the lightcurve into. Useful for user specific modifications to the plot.
save – Whether to save the plot. (Default value = True)
show – Whether to show the plot. (Default value = True)
- Returns:
The axes with the plot.
- Return type:
matplotlib.axes.Axes