Source code for blissoda.id11.plotter

from __future__ import annotations

import logging
from typing import Tuple

from ..xrpd.models import XrpdPlotInfo
from ..xrpd.plots import XrpdIntegrationSumPlot
from ..xrpd.plotter import XrpdPlotter

logger = logging.getLogger(__name__)


[docs] class Id11XrpdPlotter(XrpdPlotter): def _get_sum_plot(self, lima_name: str): return super()._get_plot( f"Sum of last integration {lima_name}", XrpdIntegrationSumPlot ) def _get_plots( self, plot_info: XrpdPlotInfo, exclude_single_scan_plots: bool = False, ) -> Tuple: if plot_info.is_sum: sum_2d = self._get_sum_plot(plot_info.lima_name) return (sum_2d,) return super()._get_plots(plot_info, exclude_single_scan_plots)
[docs] def clear_lima_plots(self, lima_name: str) -> None: super().clear_lima_plots(lima_name) sum_2d = self._get_sum_plot(lima_name) sum_2d.clear()