fruitbat.plot

fruitbat.plot._fruitbat_colors()[source]

The official list of fruitbat plotting colours.

fruitbat.plot.cosmology_comparison(filename='', extension='png', usetex=False, passed_ax=None, **kwargs)[source]

Create a plot comparing how the estimated redshift changes as a function of dispersion mesure for each cosmology.

Parameters:
  • filename (string, optional)
  • The filename of the saved figure. Default (“cosmology_comparison”)
  • extension (string, optional) – The format to save the figure. e.g “png”, “pdf”, “eps”, etc… Default: “png”

Generates

A figure displaying how estimated redshift changes as a function of dispersion measure for each of the different cosmologies.

fruitbat.plot.method_comparison(filename=None, extension='png', usetex=False, passed_ax=None, **kwargs)[source]

Create a plot comparing how estimated redshift changes as a function of dispersion measure for each DM-z relation.

Parameters:
  • filename (string or None, optional) – The filename of the saved figure. Default: None
  • extension (string, optional) – The format to save the figure. e.g “png”, “pdf”, “eps”, etc… Default: “png”
  • usetex (bool, optional) – Use LaTeX for for fonts.
  • passed_ax (or None, optional)

Generates

A figure displaying how estimated redshift changes as a function of dispersion measure for each of the different cosmologies.

fruitbat.plot.redshift_pdf(frb, method='Batten2021', sigma=1, usetex=True, filename=None, outputdir=None)[source]

Plots the redshift pdf and confidence interval for an FRB.

Parameters:
  • frb (fruitbat.Frb) – An instance of the fruitbat.Frb class.
  • method (str, optional) – Default: “Batten2021”
  • sigma ([1, 2, 3, 4, 5], optional) – The width of the confidence interval in units of sigma. Default: 1
  • usetex (bool, optional) – Use LaTeX font when creating the figure. Set this to false to disable Latex fonts. Default: True
  • filename (str or None, optional)
Returns:

  • fig (, optional)
  • ax (, optional)

fruitbat.plot.set_rc_params(usetex=False)[source]

Set the rcParams that will be used in all the plots.