-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexample.py
More file actions
30 lines (24 loc) · 734 Bytes
/
example.py
File metadata and controls
30 lines (24 loc) · 734 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import matplotlib.pyplot as plt
import numpy as np
from recurrence.plotting import setup_plot, save_plot
from recurrence.convolve import calculate_convolve
if __name__ == "__main__":
# Example usage
fig = plt.figure(figsize=(8, 2))
# Configuration
row, col = 1, 2
size = f"{row}{col}"
# Generate raw signal
raw_signal = np.random.uniform(-1, 1, 50)
# Process the signal
convolved_signal = calculate_convolve(raw_signal)
# Plot signals and recurrence plot
setup_plot(
signal=convolved_signal,
size=size,
cell=1,
signal_name='Input Signal',
image_name='2D Image of Signal'
)
# Save the plot
save_plot(filepath='results/1D_to_2D.jpg')