mightypy.make package#
Module contents#
mightypy.make#
- rotation_matrix_2d(theta: float) ndarray [source]#
Create 2D data rotation matrix.
Reference article#
https://en.wikipedia.org/wiki/Rotation_matrix
- param theta:
angle for rotation.
- type theta:
float
- returns:
rotation matrix.
- rtype:
np.ndarray
- sine_wave_from_sample(n_samples: int, signal_freq: float, n_cycles: int = 10, amplitude: int = 1, amp_shift: int = 0, phase_shift: int = 0) Tuple[ndarray, ndarray, ndarray] [source]#
Sine wave generation with number of samples and signal frequency
- Reference:
https://machinelearningexploration.readthedocs.io/en/latest/MathExploration/Fourier.html#Sine-wave
- Parameters:
n_samples (int) – number of samples.
signal_freq (float) – signal frequency.
n_cycles (int, optional) – number of cycles. Defaults to 10.
amplitude (int, optional) – signal amplitude. Defaults to 1.
amp_shift (int, optional) – amplitude shift. Defaults to 0.
phase_shift (int, optional) – phase shift. Defaults to 0.
- Returns:
signal wave, time, freq.
- Return type:
Tuple[np.ndarray, np.ndarray, np.ndarray]
- sine_wave_from_timesteps(signal_freq: float, time_step: float, amplitude: int = 1, amp_shift: int = 0, phase_shift: int = 0) Tuple[ndarray, ndarray, ndarray] [source]#
Sine wave generation with time steps and signal frequency
- Parameters:
- Returns:
signal wave, time, freq.
- Return type:
Tuple[np.ndarray, np.ndarray, np.ndarray]