drippy.utilities ================ .. py:module:: drippy.utilities Functions --------- .. autoapisummary:: drippy.utilities.get_figure_and_axes drippy.utilities.bl_filt Module Contents --------------- .. py:function:: get_figure_and_axes(fig: matplotlib.figure.Figure | None = None, ax: matplotlib.axes.Axes | None = None) -> tuple[matplotlib.figure.Figure, matplotlib.axes.Axes] Get or create figure and axes for plotting. :param fig: Existing Figure or None to create new. :type fig: Figure, optional :param Defaults to None.: :param ax: Existing Axes or None to create new. :type ax: Axes, optional :param Defaults to None.: :returns: Figure and Axes objects for plotting. :rtype: tuple[Figure, Axes] .. py:function:: bl_filt(y: numpy.ndarray, half_width: int) -> numpy.ndarray Simple Blackman filter. The end effects are handled by calculating the weighted average of however many points are available, rather than by zero-padding. :param y: Input signal to be filtered. :type y: np.ndarray :param half_width: Half-width of the filter window. Total window size will be 2*half_width + 1. :type half_width: int :returns: Filtered signal with the same shape as input. :rtype: np.ndarray