numerical_function_spaces.orlicz_spaces.plots ============================================= .. py:module:: numerical_function_spaces.orlicz_spaces.plots Functions --------- .. autoapisummary:: numerical_function_spaces.orlicz_spaces.plots.plot_save numerical_function_spaces.orlicz_spaces.plots.description_for_plot numerical_function_spaces.orlicz_spaces.plots.plot_p_norms numerical_function_spaces.orlicz_spaces.plots.plot_kappa numerical_function_spaces.orlicz_spaces.plots.plot_Phi_p_plus_Psi numerical_function_spaces.orlicz_spaces.plots.plot_Phi numerical_function_spaces.orlicz_spaces.plots.array_for_alpha numerical_function_spaces.orlicz_spaces.plots.plot_alpha numerical_function_spaces.orlicz_spaces.plots.array_for_tau numerical_function_spaces.orlicz_spaces.plots.plot_tau Module Contents --------------- .. py:function:: plot_save(name: str = 'plot', p_norm: float = '') Saves the current figure in different formats (PNG, SVG, PDF) with a given name and p_norm. :param name: The name to be used for the saved files. Default is 'plot'. :type name: str :param p_norm: The p-norm value to be included in the file names. Default is an empty string. :type p_norm: float :returns: **The function saves the figure in folder 'plots'** :rtype: None .. py:function:: description_for_plot(p_norm: float) Set description for plots :param p_norm: The p-norm value to be included in plot description :type p_norm: float .. py:function:: plot_p_norms(Orlicz_function, x, p_min=1, p_max=50, dp=2, attach_inf=False, show_progress=False, figsize: tuple = (5, 4), show: bool = False, save: bool = False) Plot the p-norms of a given signal x for a range of p values. :param Orlicz_function: The Orlicz function to be used in form accepting decimal numbers :type Orlicz_function: function :param x: A 2D numpy array representing x(t). :type x: np.ndarray :param p_min: The minimum value of the p domain. Default is 1. :type p_min: float greater or equal 1 :param p_max: The maximum value of the p domain. Default is 50. :type p_max: float smaller than infinity :param dp: The step of the p domain. Default is 2. :type dp: positive float :param attach_inf: Whether to attach infinity norm to the plot. Default is False. :type attach_inf: bool :param show_progress: Whether to show a progress bar during computation. Default is False. :type show_progress: bool :param figsize: The size of the plot. Default is (5, 4). :type figsize: tuple :param show: Whether to show the plot. Default is False. :type show: bool :param save: Whether to save the plot in different formats (PNG, SVG, PDF) in the 'plots' folder. Default is False. :type save: bool :returns: **The function generates a figure and (optionally) save in folder 'plots'** :rtype: Matplotlib figure .. py:function:: plot_kappa(Orlicz_function, x: numpy.ndarray, p_norm: float, k_min: float = 0.01, k_max: float = 10, dk: float = None, len_domain_k: int = 1000, show_progress: bool = False, figsize: tuple = (5, 4), show: bool = False, save: bool = False, save_name: str = None, title: str = None) Plot kappa() function and (optionally) save the current figure in different formats (PNG, SVG, PDF) in plots folder. :param Orlicz_function: The Orlicz function to be used in form accepting decimal numbers :type Orlicz_function: function :param x: A 2D numpy array representing x(t). :type x: np.ndarray :param k_min: The minimum value of the k domain in decimal form, by default 0.01. :type k_min: float, optional :param k_max: The maximum value of the k domain in decimal form, by default 10. :type k_max: float, optional :param dk: Step of k_domain, by default None When given, more important than len_domain_k :type dk: float, optional :param len_domain_k: The number of points in the k domain, by default 1000. :type len_domain_k: int, optional :param show_progress: Whether to show a progress bar during computation, by default False. :type show_progress: bool, optional :param figsize: Size of plots, by default (5,4) :type figsize: tuple, optional :param show: Whether to show plot, by default False. :type show: bool, optional :param save: Whether to save plot in pdf, png, svg formats in plots folder, by default False. :type save: bool, optional :param save_name: Name for saved plots, by default 'kappa_{p_norm}.pdf' :type save_name: string, optional :param title: Title for plots, by default 'kappa_{p,x}(k)' :type title: string, optional :returns: **The function generates a figure and (optionally) save in folder 'plots'** :rtype: Matplotlib figure .. py:function:: plot_Phi_p_plus_Psi(Orlicz_function, u_max: float, du: float, max_u_on_plots: float, p_plus: numpy.ndarray = None, Psi: numpy.ndarray = None, figsize: tuple = (9, 3), show: bool = False, save: bool = False) Plot Orlicz_function, right side derivative and conjugate function on one plot and (optionally) save the current figure in different formats (PNG, SVG, PDF) in plots folder. :param Orlicz_function: The Orlicz function to be used in form accepting decimal numbers :type Orlicz_function: function :param du: Step of u_domain for Orlicz function :type du: float :param u_max: Right limit of u_domain for Orlicz function (bigger u_max may improve Psi accuracy) :type u_max: float :param max_u_on_plots: May be the same or smaller to u_max :type max_u_on_plots: float :param p_plus: A 1D numpy array representing right side derivative p_{+}(u) :type p_plus: np.ndarray, optional (if given must use the same u_max and du as given for plot) :param Psi: A 1D numpy array representing right conjugate function Psi(u) :type Psi: np.ndarray, optional (if given must use the same u_max and du as given for plot) :param figsize: Size of plots, by default (5,4) :type figsize: tuple, optional :param show: Whether to show plot, by default False. :type show: bool, optional :param save: Whether to save plot in pdf, png, svg formats in plots folder, by default False. :type save: bool, optional :returns: **The function generates a figure and (optionally) save in folder 'plots'** :rtype: Matplotlib figure .. py:function:: plot_Phi(Orlicz_function, u_max: float, du: float, figsize: tuple = (5, 4), show: bool = False, save: bool = False) Plot Orlicz_function, right side derivative and conjugate function on one plot and (optionally) save the current figure in different formats (PNG, SVG, PDF) in plots folder. :param Orlicz_function: The Orlicz function to be used in form accepting decimal numbers :type Orlicz_function: function :param du: Step of u_domain for Orlicz function :type du: float :param u_max: Right limit of u_domain for Orlicz function :type u_max: float :param figsize: Size of plots, by default (5,4) :type figsize: tuple, optional :param show: Whether to show plot, by default False. :type show: bool, optional :param save: Whether to save plot in pdf, png, svg formats in plots folder, by default False. :type save: bool, optional :returns: **The function generates a figure and (optionally) save in folder 'plots'** :rtype: Matplotlib figure .. py:function:: array_for_alpha(Orlicz_function, du: float, u_max: float, x: numpy.ndarray, p_norm: float, p_plus: numpy.ndarray = None, Psi: numpy.ndarray = None, k_min: float = 0.01, k_max: float = 100, dk: float = None, len_domain_k: int = 1000, show_progress: bool = False) Calculate domain and values of alpha() function. :param Orlicz_function: The Orlicz function to be used in form accepting decimal numbers :type Orlicz_function: function :param du: Step of u_domain for Orlicz, p_plus and Psi function :type du: float :param u_max: Right limit of u_domain for Orlicz function :type u_max: float :param x: A 2D numpy array representing x(t). :type x: np.ndarray :param p_norm: The p-norm to be calculated. :type p_norm: float :param p_plus: A 1D numpy array representing right side derivative p_{+}(u) :type p_plus: np.ndarray, optional (must use the same u_max and du as given for plot), by default None :param Psi: A 1D numpy array representing right conjugate function Psi(u) :type Psi: np.ndarray, optional (must use the same u_max and du as given for plot), by default None :param k_min: The minimum value of the k domain in decimal form, by default 0.01. :type k_min: float, optional :param k_max: The maximum value of the k domain in decimal form, by default 10. :type k_max: float, optional :param dk: Step of k_domain, by default None When given, more important than len_domain_k :type dk: float, optional :param len_domain_k: The number of points in the k domain, by default 1000. :type len_domain_k: int, optional :param show_progress: Whether to show a progress bar during computation, by default False. :type show_progress: bool, optional :rtype: Two numpy arrays, first for alpha domain, second for alpha values. .. py:function:: plot_alpha(Orlicz_function, du: float, u_max: float, x: numpy.ndarray, p_norm: float, p_plus: numpy.ndarray = None, Psi: numpy.ndarray = None, k_min: float = 0.01, k_max: float = 100, dk: float = None, len_domain_k: int = 1000, show: bool = False, save: bool = False, show_progress: bool = False, save_name: str = None, title: str = None, figsize: tuple = (5, 4)) Plot kappa() function and (optionally) save the current figure in different formats (PNG, SVG, PDF) in plots folder. :param Orlicz_function: The Orlicz function to be used in form accepting decimal numbers :type Orlicz_function: function :param du: Step of u_domain for Orlicz, p_plus and Psi function :type du: float :param u_max: Right limit of u_domain for Orlicz function :type u_max: float :param x: A 2D numpy array representing x(t). :type x: np.ndarray :param p_norm: The p-norm to be calculated. :type p_norm: float :param p_plus: A 1D numpy array representing right side derivative p_{+}(u) :type p_plus: np.ndarray, optional (must use the same u_max and du as given for plot), by default None :param Psi: A 1D numpy array representing right conjugate function Psi(u) :type Psi: np.ndarray, optional (must use the same u_max and du as given for plot), by default None :param k_min: The minimum value of the k domain in decimal form, by default 0.01. :type k_min: float, optional :param k_max: The maximum value of the k domain in decimal form, by default 10. :type k_max: float, optional :param dk: Step of k_domain, by default None When given, more important than len_domain_k :type dk: float, optional :param len_domain_k: The number of points in the k domain, by default 1000. :type len_domain_k: int, optional :param show_progress: Whether to show a progress bar during computation, by default False. :type show_progress: bool, optional :param figsize: Size of plots, by default (5, 4) :type figsize: tuple, optional :param show: Whether to show plot, by default False. :type show: bool, optional :param save: Whether to save plot in pdf, png, svg formats in plots folder, by default False. :type save: bool, optional :param save_name: Name for saved plots, by default 'kappa_{p_norm}.pdf' :type save_name: string, optional :param title: Title for plots, by default 'kappa_{p,x}(k)' :type title: string, optional .. note:: In this function there are no warnings about exceeding k^{*} and k^{**} ranges :returns: **The function generates a figure and (optionally) save in folder 'plots'** :rtype: Matplotlib figure .. py:function:: array_for_tau(Orlicz_function, du: float, u_max: float, x: numpy.ndarray, p_norm: float, p_plus: numpy.ndarray = None, Psi: numpy.ndarray = None, k_min: float = 0.01, k_max: float = 100, dk: float = None, len_domain_k: int = 1000, show_progress: bool = False) Calculate domain and values of tau() function. :param Orlicz_function: The Orlicz function to be used in form accepting decimal numbers :type Orlicz_function: function :param du: Step of u_domain for Orlicz, p_plus and Psi function :type du: float :param u_max: Right limit of u_domain for Orlicz function :type u_max: float :param x: A 2D numpy array representing x(t). :type x: np.ndarray :param p_norm: The p-norm to be calculated. :type p_norm: float :param p_plus: A 1D numpy array representing right side derivative p_{+}(u) :type p_plus: np.ndarray, optional (must use the same u_max and du as given for plot), by default None :param Psi: A 1D numpy array representing right conjugate function Psi(u) :type Psi: np.ndarray, optional (must use the same u_max and du as given for plot), by default None :param k_min: The minimum value of the k domain in decimal form, by default 0.01. :type k_min: float, optional :param k_max: The maximum value of the k domain in decimal form, by default 10. :type k_max: float, optional :param dk: Step of k_domain, by default None When given, more important than len_domain_k :type dk: float, optional :param len_domain_k: The number of points in the k domain, by default 1000. :type len_domain_k: int, optional :param show_progress: Whether to show a progress bar during computation, by default False. :type show_progress: bool, optional :rtype: Two numpy arrays, first for tau domain, second for tau values. .. py:function:: plot_tau(Orlicz_function, du: float, u_max: float, x: numpy.ndarray, p_norm: float, p_plus: numpy.ndarray = None, Psi: numpy.ndarray = None, k_min: float = 0.01, k_max: float = 100, dk: float = None, len_domain_k: int = 1000, show: bool = False, save: bool = False, show_progress: bool = False, save_name: str = None, title: str = None, figsize: tuple = (5, 4)) Plot tau() function and (optionally) save the current figure in different formats (PNG, SVG, PDF) in plots folder. :param Orlicz_function: The Orlicz function to be used in form accepting decimal numbers :type Orlicz_function: function :param du: Step of u_domain for Orlicz, p_plus and Psi function :type du: float :param u_max: Right limit of u_domain for Orlicz function :type u_max: float :param x: A 2D numpy array representing x(t). :type x: np.ndarray :param p_norm: The p-norm to be calculated. :type p_norm: float :param p_plus: A 1D numpy array representing right side derivative p_{+}(u) :type p_plus: np.ndarray, optional (must use the same u_max and du as given for plot), by default None :param Psi: A 1D numpy array representing right conjugate function Psi(u) :type Psi: np.ndarray, optional (must use the same u_max and du as given for plot), by default None :param k_min: The minimum value of the k domain in decimal form, by default 0.01. :type k_min: float, optional :param k_max: The maximum value of the k domain in decimal form, by default 10. :type k_max: float, optional :param dk: Step of k_domain, by default None When given, more important than len_domain_k :type dk: float, optional :param len_domain_k: The number of points in the k domain, by default 1000. :type len_domain_k: int, optional :param show_progress: Whether to show a progress bar during computation, by default False. :type show_progress: bool, optional :param figsize: Size of plots, by default (5, 4) :type figsize: tuple, optional :param show: Whether to show plot, by default False. :type show: bool, optional :param save: Whether to save plot in pdf, png, svg formats in plots folder, by default False. :type save: bool, optional :param save_name: Name for saved plots, by default 'kappa_{p_norm}.pdf' :type save_name: string, optional :param title: Title for plots, by default 'kappa_{p,x}(k)' :type title: string, optional .. note:: In this function there are no warnings about exceeding k^{*} and k^{**} ranges :returns: **The function generates a figure and (optionally) save in folder 'plots'** :rtype: Matplotlib figure