This commit is contained in:
jupfi 2024-04-26 16:10:27 +02:00
parent 06a4cbc6cd
commit 37796e5800
2 changed files with 11 additions and 3 deletions

View file

@ -2,7 +2,6 @@
import logging import logging
import numpy as np import numpy as np
from decimal import Decimal
from nqrduck.helpers.signalprocessing import SignalProcessing as sp from nqrduck.helpers.signalprocessing import SignalProcessing as sp
from nqrduck.helpers.functions import Function from nqrduck.helpers.functions import Function
@ -49,8 +48,7 @@ class Measurement:
self.IF_frequency = IF_frequency self.IF_frequency = IF_frequency
def apodization(self, function : Function): def apodization(self, function : Function):
""" """Applies apodization to the measurement data.
Applies apodization to the measurement data.
Args: Args:
function (Function): Apodization function. function (Function): Apodization function.

View file

@ -39,6 +39,7 @@ class Option:
subclasses = [] subclasses = []
def __init_subclass__(cls, **kwargs): def __init_subclass__(cls, **kwargs):
"""Adds the subclass to the list of subclasses."""
super().__init_subclass__(**kwargs) super().__init_subclass__(**kwargs)
cls.subclasses.append(cls) cls.subclasses.append(cls)
@ -105,6 +106,15 @@ class NumericOption(Option):
def __init__( def __init__(
self, name: str, value, is_float=True, min_value=None, max_value=None self, name: str, value, is_float=True, min_value=None, max_value=None
) -> None: ) -> None:
"""Initializes the NumericOption.
Args:
name (str): The name of the option.
value: The value of the option.
is_float (bool): If the value is a float.
min_value: The minimum value of the option.
max_value: The maximum value of the option.
"""
super().__init__(name, value) super().__init__(name, value)
self.is_float = is_float self.is_float = is_float
self.min_value = min_value self.min_value = min_value