Upload 2375_252_159.py
Browse files- 2375_252_159.py +38 -0
2375_252_159.py
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# -*- coding: utf-8 -*-
|
2 |
+
"""2375.252.159
|
3 |
+
|
4 |
+
Automatically generated by Colab.
|
5 |
+
|
6 |
+
Original file is located at
|
7 |
+
https://colab.research.google.com/drive/1F1QGGAjn4QTD_wDwx_Jygb4lwJXVrr7h
|
8 |
+
"""
|
9 |
+
|
10 |
+
import numpy as np
|
11 |
+
import matplotlib.pyplot as plt
|
12 |
+
|
13 |
+
def generate_brainwave(frequency, duration, sampling_rate=1000):
|
14 |
+
t = np.linspace(0, duration, int(sampling_rate * duration), endpoint=False)
|
15 |
+
wave = np.sin(2 * np.pi * frequency * t)
|
16 |
+
return t, wave
|
17 |
+
|
18 |
+
def combine_waves(waves):
|
19 |
+
combined_wave = np.sum(waves, axis=0)
|
20 |
+
return combined_wave / len(waves)
|
21 |
+
|
22 |
+
# Define parameters
|
23 |
+
duration = 5 # seconds
|
24 |
+
sampling_rate = 1000 # samples per second
|
25 |
+
|
26 |
+
# Generate individual waves
|
27 |
+
t, alpha_wave = generate_brainwave(10, duration, sampling_rate) # Alpha (10 Hz)
|
28 |
+
_, beta_wave = generate_brainwave(20, duration, sampling_rate) # Beta (20 Hz)
|
29 |
+
|
30 |
+
# Combine waves to create a "wealthy brain frequency"
|
31 |
+
wealthy_brain_wave = combine_waves([alpha_wave, beta_wave])
|
32 |
+
|
33 |
+
# Plot the wave
|
34 |
+
plt.plot(t, wealthy_brain_wave)
|
35 |
+
plt.title(".159 Incorporated")
|
36 |
+
plt.xlabel("Time (s)")
|
37 |
+
plt.ylabel("Amplitude")
|
38 |
+
plt.show()
|