Skip to content

Commit

Permalink
filter abstract base class
Browse files Browse the repository at this point in the history
  • Loading branch information
RobBuchananCompPhys committed Feb 14, 2025
1 parent c9efde7 commit 8e17b43
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion MDANSE/Src/MDANSE/Mathematics/Signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from typing import Tuple

import scipy.signal
from abc import ABC, abstractmethod
from MDANSE.Mathematics.Arithmetic import weight
from scipy import signal, fftpack

Expand Down Expand Up @@ -305,7 +306,7 @@ def get_spectrum(signal, window=None, timeStep=1.0, axis=0, fft="fft"):
DEFAULT_FILTER_CUTOFF = 25.0


class Filter:
class Filter(ABC):
"""Base class for a filter operating on a signal."""

# Symbolic variable for analog filter transfer function (Laplace plane)
Expand Down Expand Up @@ -344,6 +345,7 @@ class FrequencyRangeMethod(Enum):
CUSTOM: int = 0
FFT: int = 1

@abstractmethod
def __init__(self, **kwargs):
if not hasattr(self, "default_settings"):
self.__class__.set_defaults()
Expand Down

0 comments on commit 8e17b43

Please sign in to comment.