:py:mod:`gnn_tracking.analysis.latent`
======================================

.. py:module:: gnn_tracking.analysis.latent

.. autoapi-nested-parse::

   Plotting functions to plot the latent space



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

Classes
~~~~~~~

.. autoapisummary::

   gnn_tracking.analysis.latent.SelectedPidsPlot



Functions
~~~~~~~~~

.. autoapisummary::

   gnn_tracking.analysis.latent.get_color_mapper



.. py:function:: get_color_mapper(selected_values: Sequence, colors: Sequence | None = None) -> Callable[[numpy.ndarray], numpy.ndarray]

   Get a function that maps values to colors.


.. py:class:: SelectedPidsPlot(*, condensation_space: torch.Tensor, particle_id: torch.Tensor, labels: torch.Tensor, selected_pids: Sequence[int] | None = None, ec_hit_mask: torch.Tensor, input_node_features: torch.Tensor)


   Plot the condensation space with selected PIDs highlighted.
   Two kinds of plots are supported: Latent space coordinates and phi/eta.
   For each of these, separate methods plot hits of the selected PIDs,
   all other hits, and collateral hits (hits in the same cluster as the
   selected PIDs).

   :param condensation_space:
   :param particle_id:
   :param labels:
   :param selected_pids:
   :param ec_hit_mask: If we do orphan node prediction, we need to know which hits
                       make it to the condensation space
   :param input_node_features:

   .. py:method:: get_collateral_mask(pid: int) -> torch.Tensor

      Mask for hits that are in the same cluster(s) as the hits belonging to this
      particle ID.


   .. py:method:: plot_circles(ax: matplotlib.pyplot.Axes, xs: torch.Tensor, ys: torch.Tensor, colors, eps=1) -> None
      :staticmethod:


   .. py:method:: get_colors(pids: torch.Tensor | Sequence) -> Sequence


   .. py:method:: plot_selected_pid_latent(ax: matplotlib.pyplot.Axes, plot_circles=False) -> None


   .. py:method:: plot_collateral_latent(ax: matplotlib.pyplot.Axes) -> None


   .. py:method:: plot_other_hit_latent(ax: matplotlib.pyplot.Axes) -> None


   .. py:method:: plot_selected_pid_ep(ax: matplotlib.pyplot.Axes) -> None


   .. py:method:: plot_other_hit_ep(ax: matplotlib.pyplot.Axes) -> None


   .. py:method:: plot_collateral_ep(ax: matplotlib.pyplot.Axes) -> None



