uvex_transients.phase_space.plotting.difference.plot_difference#
- uvex_transients.phase_space.plotting.difference.plot_difference(difference: Table, path: str | Path | None = None, title: str | None = None, overlays: Sequence[Table] | None = None, annotate: Callable | None = None)[source]#
Draw the difference of two recovery maps, in dex of the recovered yield (the volume-time, for a survey).
The axes come from the
spacein the table’smetawhen it has one (as a table ofdifference_map()of two maps made withgrid_table()does), so the figure does not know what they are, and from the canonical luminosity and half-decline time otherwise.The colour is \(\Delta = \log_{10}(R_\mathrm{c}/R_\mathrm{b})\), positive where the comparison recovers more, with contours at fixed numbers of dex. Cells where \(|\Delta|\) is less than two standard deviations are dotted, and cells where it is only a bound, because one map recovers essentially nothing there, are hatched by the direction of the bound. Cells where neither map recovers anything are left blank.
- Parameters:
difference (
astropy.table.Table) – The output ofdifference_map().path (
strorpathlib.Path, optional) – Where to write the figure. If omitted, the figure is not saved.title (
str, optional) – A title.overlays (
sequenceofastropy.table.Table, optional) – Measurements of populations to shade, as inplot_map(). They are of the canonical axes, so a map over others takes annotate instead.annotate (
callable, optional) –annotate(ax), called on the axes to draw anything else, as inplot_grid(). The legend handles it returns are added to the legend of the figure.
- Returns:
The figure, left open so that it can be adjusted or shown.
- Return type:
- Raises:
ValueError – If the table records a space that does not have two axes, is not a regular grid, or (with overlays) is not over the canonical axes.