piel.experimental.devices.DPO73304
==================================

.. py:module:: piel.experimental.devices.DPO73304

.. autoapi-nested-parse::

   This corresponds to a Tectronic Digital Oscilloscope



Submodules
----------

.. toctree::
   :maxdepth: 1

   /autoapi/piel/experimental/devices/DPO73304/extract/index
   /autoapi/piel/experimental/devices/DPO73304/types/index


Classes
-------

.. autoapisummary::

   piel.experimental.devices.DPO73304.ParsedColumnInfo


Functions
---------

.. autoapisummary::

   piel.experimental.devices.DPO73304.extract_measurement_to_dataframe
   piel.experimental.devices.DPO73304.extract_oscilloscope_data_from_measurement
   piel.experimental.devices.DPO73304.extract_oscilloscope_measurement_data_collection
   piel.experimental.devices.DPO73304.extract_propagation_delay_data_from_measurement
   piel.experimental.devices.DPO73304.extract_propagation_delay_measurement_sweep_data
   piel.experimental.devices.DPO73304.extract_waveform_to_dataframe
   piel.experimental.devices.DPO73304.extract_to_data_time_signal
   piel.experimental.devices.DPO73304.extract_to_signal_measurement
   piel.experimental.devices.DPO73304.combine_channel_data
   piel.experimental.devices.DPO73304.parse_column_name


Package Contents
----------------

.. py:function:: extract_measurement_to_dataframe(file: piel.types.PathTypes) -> pandas.DataFrame

   Extracts the measurement files from a csv file and returns it as a pandas dataframe.

   :param file: The path to the csv file.
   :type file: PathTypes

   :returns: The measurement files as a pandas dataframe.
   :rtype: pd.DataFrame


.. py:function:: extract_oscilloscope_data_from_measurement(oscilloscope_measurement: piel.types.experimental.OscilloscopeMeasurement) -> piel.types.experimental.OscilloscopeMeasurementData

.. py:function:: extract_oscilloscope_measurement_data_collection(oscilloscope_measurement_data: piel.types.experimental.OscilloscopeMeasurementData) -> piel.types.experimental.OscilloscopeMeasurementDataCollection

   This function is used to extract the relevant measurement files amd relate them to the sweep parameter. Because
   this function extracts multi-index files then we use xarray to analyze this files more clearly. It aims to extract all
   the files in the sweep file collection.


.. py:function:: extract_propagation_delay_data_from_measurement(propagation_delay_measurement: piel.types.experimental.PropagationDelayMeasurement) -> piel.types.experimental.PropagationDelayMeasurementData

.. py:function:: extract_propagation_delay_measurement_sweep_data(propagation_delay_measurement_sweep: piel.types.experimental.PropagationDelayMeasurementCollection) -> piel.types.experimental.PropagationDelayMeasurementDataCollection

   This function is used to extract the relevant measurement files amd relate them to the sweep parameter. Because
   this function extracts multi-index files then we use xarray to analyze this files more clearly. It aims to extract all
   the files in the sweep file collection.


.. py:function:: extract_waveform_to_dataframe(file: piel.types.PathTypes) -> pandas.DataFrame

   Extracts the waveform files from a csv file and returns it as a pandas dataframe.

   :param file: The path to the csv file.
   :type file: PathTypes

   :returns: The waveform files as a pandas dataframe.
   :rtype: pd.DataFrame


.. py:function:: extract_to_data_time_signal(file: piel.types.PathTypes) -> piel.types.TimeSignalData

   Extracts the waveform files from a csv file and returns it as a DataTimeSignal that can be used to analyse the signal with other methods.

   :param file: The path to the csv file.
   :type file: PathTypes

   :returns: The waveform files as a DataTimeSignal.
   :rtype: TimeSignalData


.. py:function:: extract_to_signal_measurement(file: piel.types.PathTypes, **kwargs) -> piel.types.ScalarMetricCollection

   Extracts the measurement files from a csv file and returns it as a SignalMeasurement that can be used to analyse the signal.

   :param file:
   :type file: PathTypes

   :returns: SignalMetricsMeasurementCollection : dict[str, SignalMetricsData]


.. py:function:: combine_channel_data(channel_file: list[piel.types.PathTypes]) -> piel.types.MultiTimeSignalData

   Extracts the waveform files from a list of csv files and returns it as a MultiTimeSignalData that can be used to analyse the signals together.

   :param channel_file: The list of paths to the csv files.
   :type channel_file: list[PathTypes]

   :returns: The waveform files as a MultiTimeSignalData.
   :rtype: MultiTimeSignalData


.. py:function:: parse_column_name(name: str) -> piel.experimental.devices.DPO73304.types.ParsedColumnInfo

   Parses a column name to extract the analysis type, unit, and channel information.

   Expected column name format:
   <analysis_type>_<channels>__<unit>[_<index>]

   .. rubric:: Examples

   'delay_ch1_ch2__s_1' -> analysis_type='delay', channels='ch1_ch2', unit='seconds', index=1
   'pk-pk_ch2__v' -> analysis_type='peak_to_peak', channels='ch2', unit='V'
   'neg._duty_cyc_ch2__%' -> analysis_type='negative_duty_cycle', channels='ch2', unit='percent'
   'amplitude_ch2__v' -> analysis_type='amplitude', channels='ch2', unit='V'

   :param name: The column name to parse.
   :type name: str

   :returns: An object containing the extracted information.
   :rtype: ParsedColumnInfo

   :raises ValueError: If the column name does not match the expected pattern or contains an unknown analysis type.


.. py:class:: ParsedColumnInfo(/, **data: Any)

   Bases: :py:obj:`piel.types.Instance`


   This represents the fundamental data structure of an element in connectivity


   .. py:attribute:: analysis_type
      :type:  piel.types.DataTimeSignalAnalysisTypes
      :value: 'delay'



   .. py:attribute:: unit
      :type:  piel.types.Unit


   .. py:attribute:: channels
      :type:  str
      :value: ''



   .. py:attribute:: index
      :type:  Optional[int]
      :value: 0



