sda.io.extract_oscilloscope_files ================================= .. py:module:: sda.io.extract_oscilloscope_files .. autoapi-nested-parse:: The aim of this file is to extract data from a zip folder generated by LeCroy Oscilloscope. It will extract the data in a folder on the desktop and rename the folder with the title of the lab notebook. Functions --------- .. autoapisummary:: sda.io.extract_oscilloscope_files.extract_oscilloscope_files sda.io.extract_oscilloscope_files.rename_oscilloscope_folders sda.io.extract_oscilloscope_files.convert_oscilloscope_files_batch Module Contents --------------- .. py:function:: extract_oscilloscope_files(zip_folder_path, destination_folder_path = None) Extract data from a zip folder generated by LeCroy Oscilloscope. :param zip_folder_path: Path to the zip folder. :type zip_folder_path: :py:class:`Path` :param destination_folder_path: Path to the folder where the data will be extracted, by default None. If None, the data will be extracted in the same folder as the zip file. :type destination_folder_path: :py:class:`Path | None`, *optional* :returns: Path to the destination folder. :rtype: :py:class:`Path` .. py:function:: rename_oscilloscope_folders(source_folder_path, destination_folder_path = None, remove_source_folder = False, name_style = 'datetime') Rename the folder with the title of the lab notebook. :param source_folder_path: Path to the folder containing the data. :type source_folder_path: :py:class:`Path` :param destination_folder_path: Path to the folder where the data will be copied, by default None. If None, the data will be copied in the same folder as the source folder. :type destination_folder_path: :py:class:`Path | None`, *optional* :param remove_source_folder: If True, the source folder will be removed after the data is copied. By default False. :type remove_source_folder: :py:class:`bool`, *optional* :param name_style: Type of the name to use for the folder. Options are "datetime" or "title". By default "datetime". "title" only works if the XPortRecord.xml file is present. :type name_style: :py:class:`str`, *optional* :returns: Path to the destination folder. :rtype: :py:class:`Path` .. py:function:: convert_oscilloscope_files_batch(folder_path, file_type = 'csv') Convert all trc files from a folder to a chosen type. :param folder_path: Path to the folder containing the data. :type folder_path: :py:class:`Path` :param file_type: Type of the file to convert to, by default "csv". :type file_type: :py:class:`str`, *optional* :returns: Path to the destination folder. :rtype: :py:class:`Path` .. rubric:: Examples >>> from sda.io.extract_oscilloscope_files import convert_oscilloscope_files_batch >>> from pathlib import Path >>> folder_path = ( ... Path(sda.__file__).parent.parent / "test" / "data" / "extracted_trc_data" ... ) >>> convert_oscilloscope_files_batch(folder_path, "csv") >>> # The csv files will be created in the same folder as the trc files.