:py:mod:`pylbo.visualisation.modes.api` ======================================= .. py:module:: pylbo.visualisation.modes.api Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: pylbo.visualisation.modes.api.plot_1d_temporal_evolution pylbo.visualisation.modes.api.plot_2d_slice pylbo.visualisation.modes.api.plot_3d_slice pylbo.visualisation.modes.api.prepare_vtk_export .. py:function:: plot_1d_temporal_evolution(ds: pylbo.data_containers.LegolasDataSet, omega: Union[complex, list[complex], numpy.ndarray], ef_name: str, u2: float, u3: float, time: Union[list, numpy.ndarray], figsize: tuple[int, int] = None, add_background: bool = False, use_real_part: bool = True, complex_factor: complex = None, show_ef_panel: bool = True, **kwargs) -> pylbo.visualisation.modes.temporal_1d.TemporalEvolutionPlot1D Plot the temporal evolution of a 1D eigenmode solution, i.e. :math:`f(u_1, u_2, u_3, t) = f_1(u_1) \exp\left(ik_2u_2 + ik_3u_3 - i\omega t\right)`, for a particular set of coordinates :math:`(u_2, u_3)` over a time interval. :param ds: The data set containing the eigenfunction. :type ds: LegolasDataSet :param omega: The (approximate) eigenvalue of the mode(s) to visualise. :type omega: complex, list[complex], np.ndarray :param ef_name: The name of the eigenfunction to visualise. :type ef_name: str :param u2: The y or :math:`\theta` coordinate of the eigenmode solution. :type u2: float :param u3: The z coordinate of the eigenmode solution. :type u3: float :param time: The time interval to visualise. :type time: list or np.ndarray :param figsize: The size of the figure. :type figsize: tuple[int, int] :param add_background: Whether to add the equilibrium background to the plot. :type add_background: bool :param use_real_part: Whether to use the real part of the eigenmode solution. :type use_real_part: bool :param complex_factor: A complex factor to multiply the eigenmode solution with. :type complex_factor: complex :param show_ef_panel: Whether to show the eigenfunction panel. :type show_ef_panel: bool :param kwargs: Additional keyword arguments to pass to :meth:`~matplotlib.pyplot.imshow`. :type kwargs: dict :returns: The plot object. :rtype: TemporalEvolutionPlot1D .. !! processed by numpydoc !! .. py:function:: plot_2d_slice(ds: pylbo.data_containers.LegolasDataSet, omega: Union[complex, list[complex], numpy.ndarray], ef_name: str, u2: Union[float, numpy.ndarray], u3: Union[float, numpy.ndarray], time: float, slicing_axis: str, figsize: tuple[int, int] = None, add_background: bool = False, use_real_part: bool = True, complex_factor: complex = None, show_ef_panel: bool = True, polar: bool = False, **kwargs) -> pylbo.visualisation.modes.cartesian_2d.CartesianSlicePlot2D Plot a 2D spatial view of the eigenmode solution, i.e. :math:`f(u_1, u_2, u_3, t) = f_1(u_1) \exp\left(ik_2u_2 + ik_3u_3 - i\omega t\right)`, for a particular set of coordinates. If `slicing_axis = 'z'` then a 2D view is created for a given slicing point along the 'z'-axis (hence a 'xy'-view), for `slicing_axis = 'y'` a 'xz'-view will be created. The given spatial coordinates `u2` and `u3` must be consistent with the slicing axis. For cylindrical geometries slices in both Cartesian and polar coordinates can be created. :param ds: The data set containing the eigenfunction. :type ds: LegolasDataSet :param omega: The (approximate) eigenvalue of the mode(s) to visualise. :type omega: complex, list[complex], np.ndarray :param ef_name: The name of the eigenfunction to visualise. :type ef_name: str :param u2: The y or :math:`\theta` coordinate of the eigenmode solution. :type u2: float, np.ndarray :param u3: The z coordinate of the eigenmode solution. :type u3: float, np.ndarray :param time: The time at which to visualise the eigenmode solution. :type time: float :param slicing_axis: The axis to slice the 2D view along, either 'z', 'y' or 'theta' :type slicing_axis: str :param figsize: The size of the figure. :type figsize: tuple[int, int] :param add_background: Whether to add the equilibrium background to the plot. :type add_background: bool :param use_real_part: Whether to use the real part of the eigenmode solution. :type use_real_part: bool :param complex_factor: A complex factor to multiply the eigenmode solution with. :type complex_factor: complex :param show_ef_panel: Whether to show the eigenfunction panel. :type show_ef_panel: bool :param polar: Whether to use polar coordinates for the 2D view. Only used if the dataset geometry is cylindrical. Default is False. :type polar: bool :param kwargs: Additional keyword arguments to pass to the plotting function. :type kwargs: dict :returns: **p** -- The plot object. :rtype: CartesianSlicePlot2D or CylindricalSlicePlot2D .. !! processed by numpydoc !! .. py:function:: plot_3d_slice(ds: pylbo.data_containers.LegolasDataSet, omega: Union[complex, list[complex], numpy.ndarray], ef_name: str, u2: Union[float, numpy.ndarray], u3: Union[float, numpy.ndarray], time: float, slicing_axis: str, figsize: tuple[int, int] = None, add_background: bool = False, use_real_part: bool = True, complex_factor: complex = None, **kwargs) -> pylbo.visualisation.modes.cartesian_3d.CartesianSlicePlot3D Plot a 3D spatial view of the eigenmode solution, i.e. :math:`f(u_1, u_2, u_3, t) = f_1(u_1) \exp\left(ik_2u_2 + ik_3u_3 - i\omega t\right)`, for a particular set of coordinates. Several 2D slices are superimposed on each other for every value of :math:`u_3`. :param ds: The data set containing the eigenfunction. :type ds: LegolasDataSet :param omega: The (approximate) eigenvalue of the mode(s) to visualise. :type omega: complex, list[complex], np.ndarray :param ef_name: The name of the eigenfunction to visualise. :type ef_name: str :param u2: The y or :math:`\theta` coordinate of the eigenmode solution. :type u2: float, np.ndarray :param u3: The z coordinate of the eigenmode solution. :type u3: float, np.ndarray :param time: The time at which to visualise the eigenmode solution. :type time: float :param slicing_axis: The axis to slice the 2D view along, either 'z', 'y' or 'theta' :type slicing_axis: str :param figsize: The size of the figure. :type figsize: tuple[int, int] :param add_background: Whether to add the equilibrium background to the plot. :type add_background: bool :param use_real_part: Whether to use the real part of the eigenmode solution. :type use_real_part: bool :param complex_factor: A complex factor to multiply the eigenmode solution with. :type complex_factor: complex :param kwargs: Additional keyword arguments to pass to the plotting function. :type kwargs: dict :returns: **p** -- The plot object. :rtype: CartesianSlicePlot3D or CylindricalSlicePlot3D .. !! processed by numpydoc !! .. py:function:: prepare_vtk_export(ds: pylbo.data_containers.LegolasDataSet, omega: Union[complex, list[complex], numpy.ndarray], u2: numpy.ndarray, u3: numpy.ndarray, use_real_part: bool = True, complex_factor: complex = None) -> Union[pylbo.visualisation.modes.vtk_export.VTKCartesianData, pylbo.visualisation.modes.vtk_export.VTKCylindricalData] Prepares for a VTK file export of the eigenmode solution in three dimensions. Returns a :class:`VTKDataCube3D` object which can be used to generate VTK files. :param ds: The data set containing the eigenfunction. :type ds: LegolasDataSet :param omega: The (approximate) eigenvalue of the mode(s) to visualise. :type omega: complex, list[complex], np.ndarray :param u2: The y or :math:`\theta` coordinates of the eigenmode solution. :type u2: np.ndarray :param u3: The z coordinates of the eigenmode solution. :type u3: np.ndarray :param use_real_part: Whether to use the real part of the eigenmode solution. :type use_real_part: bool :returns: Object that can be used to generate VTK files. :rtype: VTKCartesianData or VTKCylindricalData .. !! processed by numpydoc !!