Phase#
- class coupled_oscillator.phase.Phase(osc_prop: OscillatorProperties, angle: float = 0, displacement: float = 0, angle_momentum: float = 0, displacement_momentum: float = 0, arr: ndarray | None = None)[source]#
Bases:
object- __init__(osc_prop: OscillatorProperties, angle: float = 0, displacement: float = 0, angle_momentum: float = 0, displacement_momentum: float = 0, arr: ndarray | None = None)[source]#
Methods
__init__(osc_prop[, angle, displacement, ...])get_value(value)Returns the value of the given object.
Converts the phase to cartesian coordinates.
Attributes
The angle of the pendulum.
The angular momentum of the pendulum.
The displacement of the spring.
The displacement momentum of the spring.
- to_cartesian_coordinates() ndarray[source]#
Converts the phase to cartesian coordinates.
- Returns:
np.ndarray: The cartesian coordinates of the phase (x, y).
- property angle: float#
The angle of the pendulum.
- property displacement: float#
The displacement of the spring.
- property angle_momentum: float#
The angular momentum of the pendulum.
- property displacement_momentum: float#
The displacement momentum of the spring.