yieldplotlib.core.file_nodes
============================

.. py:module:: yieldplotlib.core.file_nodes

.. autoapi-nested-parse::

   Base module for all common file-type nodes.



Classes
-------

.. autoapisummary::

   yieldplotlib.core.file_nodes.FileNode
   yieldplotlib.core.file_nodes.CSVFile
   yieldplotlib.core.file_nodes.JSONFile
   yieldplotlib.core.file_nodes.PickleFile
   yieldplotlib.core.file_nodes.FitsFile


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

.. py:class:: FileNode(file_path)

   Bases: :py:obj:`yieldplotlib.core.node.Node`


   A generic node for handling files.


   .. py:method:: get_file_key_map()

      Get a list of keys expected to be in this file based on the key map.



   .. py:method:: get(key, **kwargs)

      Translate the key and delegate to the subclass-specific _get method.



   .. py:method:: _get(translated_key, **kwargs)
      :abstractmethod:


      Subclass-specific method to retrieve the data associated with the key.

      Args:
          translated_key: The key to look up in the data.
          **kwargs: Additional arguments that may be used by specific implementations.



   .. py:method:: transform_data(key, data, type_override=None, value_override=None, **kwargs)

      Apply key-specific data transformations defined in the subclass.



.. py:class:: CSVFile(file_path)

   Bases: :py:obj:`FileNode`


   Represents a CSV file and its associated data.


   .. py:method:: load()

      Load the CSV file into memory.



   .. py:method:: _get(key, **kwargs)

      Return the data associated with the key.



.. py:class:: JSONFile(file_path)

   Bases: :py:obj:`FileNode`


   Node for handling JSON files and their associated data.


   .. py:method:: load()

      Load the JSON file into memory.



   .. py:method:: _get(key, **kwargs)

      Return the data associated with the key.



.. py:class:: PickleFile(file_path)

   Bases: :py:obj:`FileNode`


   Node for handling generic pickle files and their associated data.


   .. py:method:: load()

      Load the pickle file into memory.



   .. py:method:: _get(key, **kwargs)

      Return the data associated with the key.



.. py:class:: FitsFile(file_path)

   Bases: :py:obj:`FileNode`


   Node for handling generic fits files and their associated data.


   .. py:attribute:: file_name


   .. py:method:: load()

      Load the fits file.



   .. py:method:: _get(key, **kwargs)

      Return the data associated with the key.



