Beispiel #1
0
def ko_smooth(ko_freqs, freqs, spectrum, b):
    if cyko:
        smoothed = cyko.smooth(ko_freqs, freqs, spectrum, b)
    else:
        smoothed = nuko_smooth(ko_freqs, freqs, spectrum, b)

    return smoothed
Beispiel #2
0
 def __call__(self, calc, name=None):
     Output.__call__(self, calc, name)
     loc = self._get_location(calc)
     tf = calc.calc_accel_tf(calc.loc_input, loc)
     smoothed = cyko.smooth(self.freqs, calc.motion.freqs,
                            np.abs(tf * calc.motion.fourier_amps),
                            self.ko_bandwidth)
     self._add_values(smoothed)
Beispiel #3
0
    def __call__(self, calc, name=None):
        Output.__call__(self, calc, name)
        # Locate position within the profile
        loc_in, loc_out = self._get_locations(calc)
        # Compute the response
        tf = np.abs(calc.calc_accel_tf(loc_in, loc_out))

        if self._ko_bandwidth is None:
            tf = np.interp(self.freqs, calc.motion.freqs, tf)
        else:
            tf = cyko.smooth(self.freqs, calc.motion.freqs, tf,
                             self._ko_bandwidth)

        self._add_values(tf)