Blame | Last modification | View Log | RSS feed
%%% Finds light pulse bandwidth to estimate the needed RX BW
lightpower = importdata("lightpulse_12V_100W.txt");
frame_width = 10e-9;
%% Crop of the original signal arround max. pulse value
time = lightpower.data(:, 1);
pwr = lightpower.data(:, 2);
[peak_val, peak_index] = max(pwr);
peak_time = time(peak_index);
frame_start = peak_time - frame_width/2;
frame_stop = peak_time + frame_width/2;
[frame_start, frame_start_index] = min(abs(time - frame_start));
[frame_stop, frame_stop_index] = min(abs(time - frame_stop));
cropped_time = time(frame_start_index:frame_stop_index);
cropped_time = cropped_time - cropped_time(1);
cropped_pwr = pwr(frame_start_index:frame_stop_index);
fprintf("Peak power : %f W at %f us\n", peak_val, peak_time*1e6)
figure(1)
plot(cropped_time*1e9, cropped_pwr, "-x")
ylabel("Light power (W)")
xlabel("Time (ns)")
grid on
figure(2)
f = logspace(1, 10, 2000);
Y = nufft(pwr, time, f);
loglog(f.*1e-6, abs(Y));
xlabel("Freq. (MHz)")
grid on
Generated by GNU Enscript 1.6.5.90.