swarmpal.toolboxes.tfa.plotting
===============================

.. py:module:: swarmpal.toolboxes.tfa.plotting


Attributes
----------

.. autoapisummary::

   swarmpal.toolboxes.tfa.plotting.logger


Functions
---------

.. autoapisummary::

   swarmpal.toolboxes.tfa.plotting._get_tfa_meta
   swarmpal.toolboxes.tfa.plotting._get_active_dataset_window
   swarmpal.toolboxes.tfa.plotting._add_secondary_x_axes
   swarmpal.toolboxes.tfa.plotting.time_series
   swarmpal.toolboxes.tfa.plotting.spectrum
   swarmpal.toolboxes.tfa.plotting._get_wave_index
   swarmpal.toolboxes.tfa.plotting.wave_index
   swarmpal.toolboxes.tfa.plotting.quicklook


Module Contents
---------------

.. py:data:: logger

.. py:function:: _get_tfa_meta(datatree)

.. py:function:: _get_active_dataset_window(datatree, meta=None, clip_times=True, tlims=None)

   Get the dataset, subselected to the analysis window


.. py:function:: _add_secondary_x_axes(dataset=None, ax=None, varnames=('Latitude', 'Longitude'), timevar='Timestamp')

   Add a number of secondary x-axes at the top of the plot


.. py:function:: time_series(datatree, varname='TFA_Variable', ax=None, clip_times=True, tlims=None, extra_x=('QDLat', 'MLT'), **kwargs)

   Plot the time series of the active variable, or any other variable

   :param datatree: A datatree from the TFA toolbox
   :type datatree: DataTree
   :param varname: Select a variable from within the dataset
   :type varname: str
   :param ax: Axes onto which to plot
   :type ax: AxesSubplot, optional
   :param clip_times: Clip to the analysis window, by default True
   :type clip_times: bool, optional
   :param tlims: Tuple of ISO strings to limit the plot to
   :type tlims: tuple(str, str), optional
   :param extra_x: Variables to add as extra x-axes
   :type extra_x: tuple(str), optional

   :rtype: fig, ax


.. py:function:: spectrum(datatree, ax=None, clip_times=True, tlims=None, log=True, levels=None, extra_x=('QDLat', 'MLT'), **kwargs)

   Plot the dynamic spectrum of the result of the wavelet transform

   :param datatree: A datatree from the TFA toolbox
   :type datatree: DataTree
   :param ax: Axes onto which to plot
   :type ax: AxesSubplot, optional
   :param clip_times: Clip to the analysis window, by default True
   :type clip_times: bool, optional
   :param tlims: Tuple of ISO strings to limit the plot to
   :type tlims: tuple(str, str), optional
   :param log: Logarithmic scale, by default True
   :type log: bool, optional
   :param levels: Override the levels used in the colorbar
   :type levels: ndarray, optional
   :param extra_x: Variables to add as extra x-axes
   :type extra_x: tuple(str), optional

   :rtype: fig, ax


.. py:function:: _get_wave_index(dataset)

   Evaluate wave index from wavelet power


.. py:function:: wave_index(datatree, ax=None, clip_times=True, tlims=None, extra_x=('QDLat', 'MLT'), **kwargs)

   Plot the index of wave activity

   :param datatree: A datatree from the TFA toolbox
   :type datatree: DataTree
   :param ax: Axes onto which to plot
   :type ax: AxesSubplot, optional
   :param clip_times: Clip to the analysis window, by default True
   :type clip_times: bool, optional
   :param tlims: Tuple of ISO strings to limit the plot to
   :type tlims: tuple(str, str), optional
   :param extra_x: Variables to add as extra x-axes
   :type extra_x: tuple(str), optional

   :rtype: fig, ax


.. py:function:: quicklook(datatree, clip_times=True, tlims=None, extra_x=('QDLat', 'MLT'))

   Returns a figure overviewing relevant contents of the data

   :param datatree: A datatree from the TFA toolbox
   :type datatree: DataTree
   :param clip_times: Clip to the analysis window, by default True
   :type clip_times: bool, optional
   :param tlims: Tuple of ISO strings to limit the plot to
   :type tlims: tuple(str, str), optional
   :param extra_x: Variables to add as extra x-axes
   :type extra_x: tuple(str), optional

   :rtype: fig, axes


