Compare commits
No commits in common. "9e8dc06c26084a4e246cd19dc42a792c3d7fba74" and "13d4db25fa2ee3cb58af71debea2c38eaa91f533" have entirely different histories.
9e8dc06c26
...
13d4db25fa
@ -116,7 +116,7 @@ class PyRelacs(QMainWindow):
|
||||
beat_squared = beat**2
|
||||
|
||||
f, powerspec = welch(beat, fs=40_000.0)
|
||||
# powerspec = decibel(powerspec)
|
||||
powerspec = decibel(powerspec)
|
||||
|
||||
f_sq, powerspec_sq = welch(beat_squared, fs=40_000.0)
|
||||
powerspec_sq = decibel(powerspec_sq)
|
||||
@ -124,12 +124,12 @@ class PyRelacs(QMainWindow):
|
||||
pen = pg.mkPen(colors[i])
|
||||
self.beat_plot.plot(
|
||||
np.arange(0, len(beat)) / 40_000.0,
|
||||
beat,
|
||||
beat_squared,
|
||||
pen=pen,
|
||||
# name=stim.name,
|
||||
)
|
||||
self.power_plot.plot(f, powerspec, pen=pen)
|
||||
# self.power_plot.plot(f[peaks], powerspec_sq[peaks], pen=None, symbol="x")
|
||||
self.power_plot.plot(f_sq, powerspec_sq, pen=pen)
|
||||
self.power_plot.plot(f[peaks], powerspec_sq[peaks], pen=None, symbol="x")
|
||||
|
||||
def connect_dac(self):
|
||||
devices = uldaq.get_daq_device_inventory(uldaq.InterfaceType.USB)
|
||||
|
@ -2,7 +2,6 @@ import sys
|
||||
import importlib.util
|
||||
import ast
|
||||
import pathlib
|
||||
from typing import Tuple
|
||||
|
||||
from IPython import embed
|
||||
import nixio as nix
|
||||
@ -12,19 +11,12 @@ log = config_logging()
|
||||
|
||||
|
||||
class Repro:
|
||||
"""
|
||||
Repro Class that searches in the repro folder for classes instances and executes the
|
||||
the run function in the searched class
|
||||
|
||||
"""
|
||||
|
||||
def __init__(self) -> None:
|
||||
pass
|
||||
|
||||
def run_repro(
|
||||
self, nix_file: nix.File, name: str, file: pathlib.Path, *args, **kwargs
|
||||
) -> None:
|
||||
|
||||
spec = importlib.util.spec_from_file_location("rep", file)
|
||||
if not spec:
|
||||
log.error("Could not load the file")
|
||||
@ -41,17 +33,7 @@ class Repro:
|
||||
else:
|
||||
raise AttributeError(f"{file.name} has no {name} class")
|
||||
|
||||
def names_of_repros(self) -> Tuple[list, list]:
|
||||
"""
|
||||
Searches for class names in the repro folder in all python files
|
||||
|
||||
Returns
|
||||
-------
|
||||
Tuple[list, list]
|
||||
list of class names
|
||||
list of file names from the class names
|
||||
"""
|
||||
|
||||
def names_of_repros(self):
|
||||
file_path_cur = pathlib.Path(__file__).parent
|
||||
python_files = list(file_path_cur.glob("**/*.py"))
|
||||
exclude_files = ["repros.py", "__init__.py"]
|
||||
|
Loading…
Reference in New Issue
Block a user