plot works
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import numpy as np
|
||||
from typing import List, Union, Any
|
||||
from typing import List, Any
|
||||
|
||||
|
||||
def purge_duplicates(
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user