ExpDecayingCosParam

Exponential Decaying Cosine parameters.

Attributes:

Name Type Description
amplitude0 float

The absolute amplitude of the decaying cosine.

frequency float

The frequency of the decaying cosine.

phi0 float

The initial phase of the decaying cosine.

offset float

The offset of the decaying cosine.

tau float

The decay constant of the decaying cosine.

std Optional[ExpDecayingCosParam]

The standard deviation of the parameters, if any.

Additional attributes

omega (float): Calculates the angular frequency based on the frequency. rate (float): Calculates the rate of decay.

Source code in ffit/funcs/exp_decaying_cos.py
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
@dataclass(frozen=True)
class ExpDecayingCosParam(ParamDataclass):
    """Exponential Decaying Cosine parameters.

    Attributes:
        amplitude0 (float):
            The absolute amplitude of the decaying cosine.
        frequency (float):
            The frequency of the decaying cosine.
        phi0 (float):
            The initial phase of the decaying cosine.
        offset (float):
            The offset of the decaying cosine.
        tau (float):
            The decay constant of the decaying cosine.
        std (Optional[ExpDecayingCosParam]):
            The standard deviation of the parameters, if any.

    Additional attributes:
        omega (float):
            Calculates the angular frequency based on the frequency.
        rate (float):
            Calculates the rate of decay.
    """

    amplitude0: float
    frequency: float
    phi0: float
    offset: float
    tau: float
    std: "_t.Optional[ExpDecayingCosParam]" = None

    @property
    def omega(self):
        return 2 * np.pi * self.frequency

    @property
    def rate(self):
        return -1 / self.tau