changes from friday
This commit is contained in:
@@ -63,7 +63,7 @@ classdef AWG
|
||||
% obj.fdac = 256e9;
|
||||
obj.dac_max = 0.5;
|
||||
obj.dac_min = -.5;
|
||||
obj.f_cutoff = 80e9;
|
||||
obj.f_cutoff = 800e9;
|
||||
|
||||
end
|
||||
|
||||
@@ -75,9 +75,12 @@ classdef AWG
|
||||
|
||||
function signalclass_out = process(obj,signalclass_in)
|
||||
|
||||
|
||||
len_in = length(signalclass_in.signal);
|
||||
|
||||
% actual processing of the signal (steps 1. - 3.)
|
||||
signalclass_in.signal = obj.process_(signalclass_in.signal);
|
||||
|
||||
|
||||
% 4. Apply LPF on the signal
|
||||
if obj.lpf_active
|
||||
lpf = Filter('filtdegree',5,"f_cutoff",obj.f_cutoff,"fsamp",obj.kover*obj.fdac,"filterType",obj.lpf_type);
|
||||
@@ -93,6 +96,12 @@ classdef AWG
|
||||
% write to output
|
||||
signalclass_out = signalclass_in;
|
||||
|
||||
len_out = length(signalclass_out.signal);
|
||||
|
||||
if len_out ~= len_in * obj.kover
|
||||
warning("AWG: Output length maybe not correct.")
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function elec_out = process_(obj,data_in)
|
||||
@@ -129,7 +138,7 @@ classdef AWG
|
||||
elec_out = repmat(elec_out,obj.repetitions,obj.kover);
|
||||
elec_out = reshape(elec_out',[],1);
|
||||
|
||||
% 3. Add skew
|
||||
% 3. Add skew (not working so far)
|
||||
if obj.skew_active
|
||||
elec_out = obj.skew(elec_out);
|
||||
end
|
||||
|
||||
@@ -93,7 +93,8 @@ classdef Scope
|
||||
% sample signal
|
||||
% TODO: implement and test the delays. Also look for delay of
|
||||
% lpf filter
|
||||
yout = obj.sampleSignal(xin);
|
||||
%yout = obj.sampleSignal(xin);
|
||||
yout = resample(xin,obj.fadc,obj.fsimu);
|
||||
|
||||
% quantize signal
|
||||
yout = obj.quantize(yout);
|
||||
@@ -148,6 +149,8 @@ classdef Scope
|
||||
% Sample the signal using linear interpolation
|
||||
sampout = xin(floor(inx_re)) .* (1 - val_re) + xin(ceil(inx_re)) .* val_re ;
|
||||
|
||||
sampout2 = resample(xin,obj.fadc,obj.fsimu);
|
||||
|
||||
end
|
||||
|
||||
function quantout = quantize(obj,xin)
|
||||
|
||||
Reference in New Issue
Block a user