How to format 5 GSa/s output data from Moku:Pro
Learn how to interpret 5 GSa/s output data from the Moku:Pro device for accurate and efficient analysis.
-
Moku:Go
Moku:Go General Moku:Go Arbitrary Waveform Generator Moku:Go Data Logger Moku:Go Digital Filter Box Moku:Go FIR Filter Builder Moku:Go Frequency Response Analyzer Moku:Go Logic Analyzer & Pattern Generator Moku:Go Oscilloscope & Voltmeter Moku:Go PID Controller Moku:Go Spectrum Analyzer Moku:Go Waveform Generator Moku:Go Power Supplies Moku:Go Lock-in Amplifier Moku:Go Time & Frequency Analyzer Moku:Go Laser Lock Box Moku:Go Phasemeter
-
Moku:Lab
Moku:Lab General Moku:Lab Arbitrary Waveform Generator Moku:Lab Data Logger Moku:Lab Digital Filter Box Moku:Lab FIR Filter Builder Moku:Lab Frequency Response Analyzer Moku:Lab Laser Lock Box Moku:Lab Lock-in Amplifier Moku:Lab Oscilloscope Moku:Lab Phasemeter Moku:Lab PID Controller Moku:Lab Spectrum Analyzer Moku:Lab Time & Frequency Analyzer Moku:Lab Waveform Generator Moku:Lab Logic Analyzer/Pattern Generator
-
Moku:Pro
Moku:Pro General Moku:Pro Arbitrary Waveform Generator Moku:Pro Data Logger Moku:Pro Frequency Response Analyzer Moku:Pro Oscilloscope Moku:Pro PID Controller Moku:Pro Spectrum Analyzer Moku:Pro Waveform Generator Moku:Pro Lock-in Amplifier Moku:Pro Laser Lock Box Moku:Pro Digital Filter Box Moku:Pro FIR Filter Builder Moku:Pro Phasemeter Moku:Pro Multi-instrument Mode Moku:Pro Logic Analyzer/Pattern Generator Moku:Pro Time & Frequency Analyzer
- Python API
- MATLAB API
- Arbitrary Waveform Generator
- Data Logger
- Digital Filter Box
- FIR Filter Builder
- Frequency Response Analyzer
- Laser Lock Box
- Lock-in Amplifier
- Oscilloscope
- Phasemeter
- PID Controller
- Spectrum Analyzer
- Time & Frequency Analyzer
- Waveform Generator
- Logic Analyzer & Pattern Generator
- Multi Instrument Mode
- Moku Cloud Compile
- Moku general
- LabVIEW
Moku:Pro can be configured to save high resolution data at a rate of 5 GSa/s with certain channel configuration settings. Details on how to configure these settings can be found in this knowledge base.
When high resolution data files are downloaded, the data format is in 5 columns, where column 1 is time and columns 2-5 are 1.25 GSa/s data arrays. The four data columns should be interleaved to form the single 5 GSa/s data array. Since each row has a 800 ps timespan, the time vector should be interpolated for each data column in 200 ps increments (i.e. If the first row of the time column is 0 ps, then Column 1 time = 0 ps, Column 2 time = 0 ps + 200 ps, Column 3 time = 0 ps + 400 ps, Column 4 time = 0 + 600 ps). An example of how the data gets reshaped is shown in the following two tables:
Table 1: Raw high resolution output data
Time (ns) |
Data column 1 |
Data column 2 |
Data column 3 |
Data column 4 |
0 |
1 |
2 |
3 |
4 |
0.8 |
5 |
6 |
7 |
8 |
1.6 |
9 |
10 |
11 |
12 |
Table 2: Reshaped high resolution output data
Time (ns) |
Data column |
0 |
1 |
0.2 |
2 |
0.4 |
3 |
0.6 |
4 |
0.8 |
5 |
1 |
6 |
1.2 |
7 |
1.4 |
8 |
1.6 |
9 |
1.8 |
10 |
2.0 |
11 |
2.2 |
12 |
Examples of how to reshape and plot downloaded high resolution data files in Python and MATLAB are below:
Python:
import numpy as np
import matplotlib.pyplot as plt
# Load the structured array
data = np.load('high_res_data.npy') # Change to your .npy filename
# Convert to regular ndarray
if data.dtype.names:
data = np.vstack([data[name] for name in data.dtype.names]).T
# Extract time and signal channels
time = data[:, 0] # First column = time
signals = data[:, 1:5] # Remaining 4 columns = signal channels
# Interleave signals row-wise (4 x N) → 1 x (4N)
data_reshaped = signals.T.reshape(-1)
# Apply 200 ps offsets across columns
offsets = np.array([0, 200e-12, 400e-12, 600e-12])
time_offsets = time[:, np.newaxis] + offsets # shape (N, 4)
time_interleaved = time_offsets.T.reshape(-1) # shape (4N, )
# Sort by time
sorted_indices = np.argsort(time_interleaved)
time_sorted = time_interleaved[sorted_indices]
data_sorted = data_reshaped[sorted_indices]
# Plot
plt.figure(figsize=(10, 4))
plt.plot(time_sorted, data_sorted)
plt.xlabel('Time (s)')
plt.ylabel('Amplitude')
plt.grid(True)
plt.tight_layout()
plt.show()
MATLAB:
load('high_res_data.mat'); % Change to your .mat filename
data = moku.data;
time = data(:, 1); % Time column
signals = data(:, 2:5); % Extract the 4 data columns
% Interleave signals row-wise (4 x N) -> 1 x (4*N)
data_reshaped = reshape(signals.', 1, []);
% Define 200 ps offset pattern for each column (same for every row)
offsets = [0, 200e-12, 400e-12, 600e-12]; % seconds
time_offsets_matrix = time + offsets; % size: N x 4
time_interleaved = reshape(time_offsets_matrix.', [], 1); % (4*N x 1)
% Plot
figure
plot(time_interleaved, data_reshaped);
xlabel('Time (s)');
ylabel('Amplitude');