This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PyQt5.QtWidgets import QApplication, QMainWindow, QLabel, QVBoxLayout, QPushButton, QWidget | |
from PyQt5.QtCore import QObject, QRunnable, QThreadPool,pyqtSlot, pyqtSignal | |
import time | |
import traceback, sys | |
class WorkerSignals(QObject): | |
''' | |
Defines the signals available from a running worker thread. | |
Supported signals are: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from numpy.typing import NDArray | |
def sinc_interpolation(x: NDArray, s: NDArray, u: NDArray) -> NDArray: | |
"""Whittaker–Shannon or sinc or bandlimited interpolation. | |
Args: | |
x (NDArray): signal to be interpolated, can be 1D or 2D | |
s (NDArray): time points of x (*s* for *samples*) | |
u (NDArray): time points of y (*u* for *upsampled*) |