File size: 1,040 Bytes
c89047a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
from datasets import load_dataset
import numpy as np
import matplotlib.pyplot as plt

# Load training split
dataset = load_dataset("OCEAN-Lab/CTS-PADC_Dataset", split="train")

# Extract sample 0
sample = dataset[0]
x_distorted = np.array(sample["arcsin_results"])  # Length: 400
y_ground_truth = np.array(sample["test_data"])    # Length: 400
rf_freq = sample["Frequencies"]                   # Frequency in GHz
rf_power = sample["Power"]                       # Power in dBm

print(f"Sample 0 -> RF Frequency: {rf_freq} GHz | RF Power: {rf_power} dBm")
print(f"Input shape: {x_distorted.shape} | Target shape: {y_ground_truth.shape}")

# Plot time-domain waveform
plt.figure(figsize=(9, 3.5))
plt.plot(y_ground_truth, label="Ground Truth", color="black", linestyle="--")
plt.plot(x_distorted, label="Distorted Input", color="crimson", alpha=0.7)
plt.title(f"PTS-ADC Capture: {rf_freq} GHz at {rf_power} dBm")
plt.xlabel("Sample Index n")
plt.ylabel("Amplitude (V)")
plt.legend()
plt.grid(True, linestyle=":")
plt.tight_layout()
plt.show()