Minimal Working - seems too good?!

This commit is contained in:
Silas Oettinghaus
2023-05-16 17:43:51 +02:00
parent 709cee9ecd
commit f5c3a1b902
23 changed files with 1476 additions and 260 deletions

View File

@@ -64,7 +64,25 @@ classdef EML
end
function [opt_out,obj] = process(obj,elec_in)
function signalclass_out = process(obj,signalclass_in)
% actual processing of the signal (steps 1. - 3.)
signalclass_in.signal = obj.process_(signalclass_in.signal);
% cast the inform. signal to electrical signal
signalclass_in = Opticalsignal(signalclass_in,"fs",obj.fsimu,"logbook",signalclass_in.logbook,"lambda",obj.lambda*1e-9,"nase",0);
% append to logbook
lbdesc = ['EML '];
signalclass_in = signalclass_in.logbookentry(lbdesc);
% write to output
signalclass_out = signalclass_in;
end
function [opt_out,obj] = process_(obj,elec_in)
%METHOD1 Summary of this method goes here
% Detailed explanation goes here
@@ -76,6 +94,8 @@ classdef EML
if obj.linewidth ~= 0
ph_noi = obj.createPhaseNoise;
laserfield = obj.field.*exp(1i*ph_noi);
%remember phase (! you need to receive the altered eml object in you sim program !)
obj.phase = ph_noi(end);
else
laserfield = obj.field;
end
@@ -83,8 +103,7 @@ classdef EML
%modulate the laserfield with the electrical signal
opt_out = obj.externalmodulation(laserfield,elec_in);
%remember phase (! you need to receive the altered eml object in you sim program !)
obj.phase = ph_noi(end);
end