Skip to content
Snippets Groups Projects
Commit 2f0640c8 authored by JOSSOUD Olivier's avatar JOSSOUD Olivier
Browse files

Explo. Using cfatool. Beginning

parent f2aedb6d
No related branches found
No related tags found
No related merge requests found
......@@ -5,17 +5,20 @@ import re
import xmltodict
import xml.etree.cElementTree as ET
from io import StringIO
from cfatools.logreader.instrument import InstrumentReader
import utils
from dataprovider.picarroprovider import PicarroProvider
class ExploProvider:
def __init__(self, picarro_prvd: PicarroProvider):
self.datasets_root_directory = ""
self.datasets = {}
self.picarro_prvd = picarro_prvd
self.instrument_reader = None
def explore_root_directory(self, root_directory: str) -> list:
"""Get the names of the datasets directories.
......@@ -31,6 +34,7 @@ class ExploProvider:
List of dataset directories name (without full path)
"""
self.instrument_reader = InstrumentReader(base_path=root_directory)
directories = []
# Find all directories in datasets root directory (not recursive)
......@@ -85,7 +89,6 @@ class Dataset:
inst_and_type = re.search("^" + self.directory_name + '_(.+?).log$', filename).group(1)
except AttributeError:
# The found file does not match normal instrument's log file pattern
print("File [" + filename + "] does not appear to be a valid CFA log file")
continue
instrument_name = inst_and_type.split("_")[0]
......
......@@ -76,7 +76,6 @@ class ExploUim:
self.__init_stab__()
self.main_ui.explo_pushbutton_stab.clicked.connect(self.__show_stab_window__)
def __initialize_dataset_combobox__(self):
"""Populate the "datasets" combobox with the existing dataset directory names."""
data_root_dir = self.config.read("DATA_SOURCE", "absolute_root_dir")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment