Skip to content

Commit

Permalink
refactor(superposed-pulses): update module name
Browse files Browse the repository at this point in the history
The superposed-pulses package changed its module name from `model` to
the now much more intuitive name `superposedpulses`.
  • Loading branch information
engeir committed Oct 5, 2023
1 parent e259bef commit da15ed0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/volcano_cooking/modules/create/create_frc.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
from abc import ABC, abstractmethod
from typing import Tuple

import model
import numpy as np
import scipy.stats as scp_stats
import superposedpulses


class FrcGenerator(ABC):
Expand All @@ -19,7 +19,7 @@ def __init__(self, fs: float = 12, total_pulses: int = 300) -> None:
if total_pulses < 1:
raise ValueError(f"Can't create empty arrays, {total_pulses} = .")
self.gamma = 0.1
self.my_frc = model.StandardForcingGenerator()
self.my_frc = superposedpulses.StandardForcingGenerator()
self.my_frc.set_amplitude_distribution(lambda k: self.__lomax_amp(k, 1.8))
self.times = np.arange(0, (total_pulses + 1) / self.gamma, 1 / fs)

Expand All @@ -39,8 +39,10 @@ class Frc(FrcGenerator):
def __init__(self, fs: float = 1, size: int = 9999) -> None:
# Lomax
self.fs = fs
self.fpp = model.PointModel(gamma=0.1, total_duration=size, dt=1 / self.fs)
my_forcing_gen = model.StandardForcingGenerator()
self.fpp = superposedpulses.PointModel(
gamma=0.1, total_duration=size, dt=1 / self.fs
)
my_forcing_gen = superposedpulses.StandardForcingGenerator()
my_forcing_gen.set_amplitude_distribution(lambda k: self.__lomax_amp(k, 1.8))
self.fpp.set_custom_forcing_generator(my_forcing_gen)

Expand Down

0 comments on commit da15ed0

Please sign in to comment.