uvex_transients.phase_space.sampling.core.SurveySampler.draw_map#

classmethod SurveySampler.draw_map(grid: Table, points: Table, path: str | Path, title: str, *, overlay: Table | None = None, show_points: bool = False, fields: Sequence[str] | None = None)#

Draw the fitted map of a sampler of this class and save the figure.

It is a class method of the files of a map, so that a map can be drawn without rebuilding the sampler. The default is plot_grid(), which draws a map over two axes with the products it carries and decorates it with annotate_map(). A map over any other number of axes is not drawn: the figure is of a plane, so the default logs a warning and returns None. A sampler whose map has a figure of its own overrides this, and is free to draw more axes in its own way.

Parameters:
  • grid (astropy.table.Table) – The fitted map (map.ecsv).

  • points (astropy.table.Table) – The measured points (points.ecsv).

  • path (str or pathlib.Path) – Where to save the figure.

  • title (str) – The suptitle.

  • overlay (astropy.table.Table, optional) – The measurements of measure_overlay() (overlay.ecsv), for a sampler that has them.

  • show_points (bool, optional) – Whether to mark the measured points.

  • fields (sequence of str, optional) – The columns of the map to draw, one panel each (any column, including a quantity that carries no interval). By default the success fraction, every quantity with an interval, and the uncertainty.

Returns:

The figure, which the caller closes, or None if the map is not drawn.

Return type:

matplotlib.figure.Figure or None