LorentzianParam

Lorentzian parameters.

Attributes:

Name Type Description
amplitude float

The height of the peak.

gamma float

The half-width at half-maximum.

x0 float

The position of the peak.

offset float

The baseline offset.

Additional attributes

sigma (float): The full width at half-maximum.

Source code in ffit/funcs/lorentzian.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
@dataclass(frozen=True)
class LorentzianParam(ParamDataclass):
    """Lorentzian parameters.

    Attributes:
        amplitude (float):
            The height of the peak.
        gamma (float):
            The half-width at half-maximum.
        x0 (float):
            The position of the peak.
        offset (float):
            The baseline offset.

    Additional attributes:
        sigma (float):
            The full width at half-maximum.
    """

    amplitude: float
    gamma: float
    x0: float
    offset: float

    std: "_t.Optional[LorentzianParam]" = None

    @property
    def sigma(self):
        return self.gamma * 2