piel.experimental.measurements.data.extract
===========================================

.. py:module:: piel.experimental.measurements.data.extract


Attributes
----------

.. autoapisummary::

   piel.experimental.measurements.data.extract.logger


Functions
---------

.. autoapisummary::

   piel.experimental.measurements.data.extract.extract_data_from_measurement_collection
   piel.experimental.measurements.data.extract.extract_data_from_experiment
   piel.experimental.measurements.data.extract.load_experiment_data_from_directory


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

.. py:data:: logger

.. py:function:: extract_data_from_measurement_collection(measurement_collection: piel.types.experimental.MeasurementCollectionTypes, measurement_to_data_map: dict = measurement_to_data_map, measurement_to_data_method_map: dict = measurement_to_data_method_map, skip_missing: bool = False, **kwargs) -> piel.types.experimental.MeasurementDataCollectionTypes

   The goal of this function is to compose the data from a collection of measurement references.
   Based on each type of measurement, it will apply an extraction function based on the data mapping accordingly.
   It will return a collection of data measurement which is inherent to the type of the measurement collection provided.


.. py:function:: extract_data_from_experiment(experiment: piel.types.experimental.Experiment, experiment_directory: piel.types.PathTypes, composition_kwargs: dict = None, extraction_kwargs: dict = None, **kwargs) -> piel.types.experimental.ExperimentData

   This function must be run after data has already been written within the ``Experiment`` directories
   and the metadata has been created accordingly. This will extract all the corresponding measurements collection,
   and also extract the corresponding data from each setup accordingly. It will create a `ExperimentData` that collects
   both the metadata and measurement data.

   :param experiment: The experiment object that contains the metadata of the experiment.
   :type experiment: Experiment
   :param experiment_directory: The directory where the experiment is located.
   :type experiment_directory: PathTypes
   :param \*\*kwargs: Extra keyword arguments passed to the class instantiation.

   :returns: *
             * *ExperimentData* -- The data extracted from the experiment.


.. py:function:: load_experiment_data_from_directory(experiment_directory: piel.types.PathTypes, **kwargs) -> piel.types.experimental.ExperimentData

   This function will load an `Experiment` from the metadata stored in the `experiment.json` directory.


