From 84462b0a1860398f2d16900549f8ae64aeff60a6 Mon Sep 17 00:00:00 2001 From: cmp0xff Date: Sun, 4 Aug 2024 22:04:27 +0200 Subject: [PATCH] doc(comment): #36 @emptymalei https://github.com/kausalflow/hamilflow/pull/58#discussion_r1697434371 --- hamilflow/models/harmonic_oscillator_chain.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/hamilflow/models/harmonic_oscillator_chain.py b/hamilflow/models/harmonic_oscillator_chain.py index f4d274a..1afe5f0 100644 --- a/hamilflow/models/harmonic_oscillator_chain.py +++ b/hamilflow/models/harmonic_oscillator_chain.py @@ -22,6 +22,12 @@ class HarmonicOscillatorsChain: Since the original degrees of freedom are real, the initial conditions of the propagating waves need to satisfy $Y_k = Y^*_{-k \mod N}$, see [Wikipedia](https://en.wikipedia.org/wiki/Discrete_Fourier_transform#DFT_of_real_and_purely_imaginary_signals). + + :param omega: frequence parameter + :param initial_conditions: a sequence of initial conditions on the Fourier modes. + The first element in the sequence is that of the zero mode, taking a position and a velocity. + Rest of the elements are that of the independent travelling waves, taking two amplitudes and two initial phases. + :param odd_dof: The system will have `2 * len(initial_conditions) + int(odd_dof) - 2` degrees of freedom. """ def __init__( @@ -30,14 +36,6 @@ def __init__( initial_conditions: Sequence[Mapping[str, float | tuple[float, float]]], odd_dof: bool, ) -> None: - """Instantiate an oscillator chain. - - :param omega: frequence parameter - :param initial_conditions: a sequence of initial conditions on the Fourier modes. - The first element in the sequence is that of the zero mode, taking a position and a velocity. - Rest of the elements are that of the independent travelling waves, taking two amplitudes and two initial phases. - :param odd_dof: The system will have `2 * len(initial_conditions) + int(odd_dof) - 2` degrees of freedom. - """ self.n_dof = 2 * len(initial_conditions) + odd_dof - 2 if not odd_dof: prefix = "For even degrees of freedom, "