added multiply

This commit is contained in:
matthias@arch 2023-08-30 17:35:23 +02:00
parent 9f9d3d7e06
commit f281b981ea

View File

@ -1,5 +1,6 @@
import numpy as np
from scipy.interpolate import interp1d
from torch import mul
class Normalize:
"""
@ -41,6 +42,15 @@ class NormalizeAmplitude:
return f"NormalizeAmplitude(high={self.high})"
class Multiply:
def __init__(self, multiplier):
self.multiplier = multiplier
def __call__(self, data):
return data * self.multiplier
def __repr__(self):
return f"Multiply(multiplier={self.multiplier})"
class ConstantInterval:
"""
Interpolate the data to have a constant interval / sample rate,