uvex_transients.simulation.yield_table.YieldTable.to_latex#

YieldTable.to_latex(path: str | Path | None = None, precision: int = 3, caption: str | None = None, label: str | None = None, overwrite: bool = False) → str[source]#

Render this table as a LaTeX tabular, with rate/binomial uncertainties as stacked superscripts.

A column tabulated with a single ..._lower/..._upper pair (integrated_rate, all_sky_rate, uvex_intrinsic_rate, uvex_intrinsic_events) is rendered as $v^{+u}_{-l}$. A column tabulated with both Clopper-Pearson binomial bounds and ~uvex_transients.transients.base.ExtragalacticTransient.RATE_CI-derived rate bounds (detection_probability, expected_detections; see ~uvex_transients.simulation.event_catalog.EventCatalog.compute_yield_summary) is rendered with both, stacked, as $v^{+u_b}_{-l_b}{}^{+u_r}_{-l_r}$ – binomial uncertainty first, rate uncertainty second. numpy.nan (an unidentified detection_probability/ expected_detections, when a transient type had zero feasible Monte Carlo draws) renders as --.

Parameters:
  • path (str or Path, optional) – If given, write the rendered LaTeX here as well as returning it.

  • precision (int, optional) – Significant figures for every formatted number. The default is 3.

  • caption (str, optional) – Forwarded into a wrapping table environment’s \caption/\label, if given.

  • label (str, optional) – Forwarded into a wrapping table environment’s \caption/\label, if given.

  • overwrite (bool, optional) – Whether to overwrite an existing file at path.

Returns:

The rendered LaTeX source.

Return type:

str