new plots for Diss. Mostly AI gen. Few changes in actual codebase

This commit is contained in:
Silas Oettinghaus
2026-07-30 08:35:45 +02:00
parent 125d8508ca
commit 7a9deaeb0c
62 changed files with 6171 additions and 630 deletions

View File

@@ -0,0 +1,24 @@
function channelplan_nm = calcWavelengthPlan(N, df_hz, center_nm)
vec = [N:-1:1]-(N/2+0.5);
channelplan_hz = nm2hz(center_nm) + (vec * df_hz) ;
channelplan_nm = hz2nm(channelplan_hz);
% dfft = 1.367053998632946e+07; %hz
% a = diff(channelplan_hz)./2./dfft;
end
function hz = nm2hz(nm)
wavelen_in_m = nm.* 1e-9;
hz = (299792458 ./ wavelen_in_m); %frequency in Terahertz
end
function nm = hz2nm(hz)
m = (299792458 ./ hz); %wavelength in meter
nm = m .* 10^9;
end

View File

@@ -0,0 +1,4 @@
function dw = df2dw(df,f)
%delta frequency to delta wavelength
dw = 299792458 .* df ./ f.^2;
end

View File

@@ -0,0 +1,4 @@
function df = dw2df(dw,w)
%delta wavelength to delta frequency
df = 299792458 .* dw ./ w.^2;
end

View File

@@ -0,0 +1,7 @@
function positions = getSweepWavelengths(N, df_hz, StartNm)
positions = zeros(1, N);
for i = 1:N
position = (299792458 / (299792458 / (StartNm * 1e-9) + (i - 1) * df_hz)) * 1e9;
positions(i) = position;
end
end

View File

@@ -0,0 +1,4 @@
function nm = hz2nm(hz)
m = (299792458 ./ hz); %wavelength in meter
nm = m .* 10^9;
end

View File

@@ -0,0 +1,4 @@
function hz = nm2hz(nm)
wavelen_in_m = nm.* 1e-9;
hz = (299792458 ./ wavelen_in_m); %frequency in Hertz
end

View File

@@ -0,0 +1,4 @@
function thz = nm2thz(nm)
wavelen_in_m = nm.* 1e-9;
thz = (299792458 ./ wavelen_in_m) .*1e-12; %frequency in Terahertz
end

View File

@@ -0,0 +1,4 @@
function nm = thz2nm(thz)
freq_in_hz = thz.* 1e12;
nm = (299792458 ./ freq_in_hz) .*1e9; %wavelength in nanometer
end