plot works

This commit is contained in:
weygoldt
2023-01-19 13:47:18 +01:00
parent a79fc86ab9
commit c2de6c7060
5 changed files with 109 additions and 232 deletions

View File

@@ -1,5 +1,5 @@
import numpy as np
from typing import List, Union, Any
from typing import List, Any
def purge_duplicates(

View File

@@ -36,6 +36,7 @@ class LoadData:
def __init__(self, datapath: str) -> None:
# load raw data
self.datapath = datapath
self.file = os.path.join(datapath, "traces-grid1.raw")
self.raw = DataLoader(self.file, 60.0, 0, channel=-1)
self.raw_rate = self.raw.samplerate
@@ -53,3 +54,23 @@ class LoadData:
def __str__(self) -> str:
return f"LoadData({self.file})"
def make_outputdir(path: str) -> str:
"""
Creates a new directory where the path leads if it does not already exist.
Parameters
----------
path : string
path to the new output directory
Returns
-------
string
path of the newly created output directory
"""
if os.path.isdir(path) == False:
os.mkdir(path)
return path

View File

@@ -23,7 +23,7 @@ def makeLogger(name: str):
logger = logging.getLogger(name)
logger.addHandler(file_handler)
logger.addHandler(console_handler)
logger.setLevel(logging.DEBUG)
logger.setLevel(logging.INFO)
return logger