From 909cd8691312e769f7016df6cb75555780122a03 Mon Sep 17 00:00:00 2001 From: Silas Labor Zizou Date: Wed, 16 Apr 2025 09:50:34 +0200 Subject: [PATCH] changes form lab pc again --- projects/ECOC_2025/measure_run_script.m | 12 ++++++------ projects/ECOC_2025/submit_dsp.m | 2 +- projects/run_loop.m | 17 +++++++++-------- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/projects/ECOC_2025/measure_run_script.m b/projects/ECOC_2025/measure_run_script.m index 4abd8eb..a7c5ef3 100644 --- a/projects/ECOC_2025/measure_run_script.m +++ b/projects/ECOC_2025/measure_run_script.m @@ -28,7 +28,6 @@ if run_lab_automation [v_bias_meas,i_bias_meas]=dcs.readVals(); end % Laser - if (any(confPrev.laser_power ~= conf.laser_power)) || (~exist('laser','var')) || (isempty(confPrev.laser_power)) laser = Exfo_laser("mainframe_channel",1,"safety_mode",0,"connection_id",'10','lab_interface','gpib'); laser.setWavelength(conf.wavelength); @@ -187,6 +186,7 @@ for recIdx = 1:n_recording db.appendToTable('Configurations', conf); %% Append to Measurements Table + laser.getLaserInfo; meas = db.tables.Measurements; meas.measurement_id = NaN; meas.run_id = run_id; @@ -204,12 +204,12 @@ for recIdx = 1:n_recording db.appendToTable('Measurements', meas); - %% Submit DSP Routine - - if subimt_DSP - [out, a] = submit_dsp(run_id, databasePath, database_name, savePath, ... - "parallel", parallel_dsp, "max_occurences", max_occurences); + if recIdx == 1 + if subimt_DSP + [out, a] = submit_dsp(run_id, databasePath, database_name, savePath, ... + "parallel", parallel_dsp, "max_occurences", max_occurences); + end end end diff --git a/projects/ECOC_2025/submit_dsp.m b/projects/ECOC_2025/submit_dsp.m index 019056d..6920aa0 100644 --- a/projects/ECOC_2025/submit_dsp.m +++ b/projects/ECOC_2025/submit_dsp.m @@ -18,7 +18,7 @@ if options.parallel % Check if a pool exists pool = gcp('nocreate'); if isempty(pool) - parpool; + parpool(4); end % Submit the DSP function asynchronously diff --git a/projects/run_loop.m b/projects/run_loop.m index 4eedbe8..4248623 100644 --- a/projects/run_loop.m +++ b/projects/run_loop.m @@ -13,8 +13,9 @@ end database_name = 'ecoc2025_loops.db'; -db = DBHandler("pathToDB", [databasePath, database_name],"type",'mysql'); - +if ~exist('db','var') + db = DBHandler("pathToDB", [databasePath, database_name]); +end conf = db.tables.Configurations; if ~exist('confPrev','var') confPrev = db.tables.Configurations; @@ -23,8 +24,8 @@ end awg_upload_required = 1; %still uploads every first round subimt_DSP = 1; recordlen = 5000000; -sequence_order = 17; -n_recording = 1; % Or any number you want +sequence_order = 19; +n_recording = 2; % Or any number you want % Define vector parameters directly in conf: conf.unique_elab_id = "20250408-842b0a3078172b48dd032795226fbe683190afc4"; @@ -39,10 +40,10 @@ conf.fiber_length = 0; conf.pd_in_desired = 9; conf.is_mpi = 1; conf.signal_attenuation = 0; -conf.interference_path_length = 0; %m -conf.interference_attenuation = 40;%[0:2:30,40]; -conf.pam_level = 4;%[4,6,8]; -conf.symbolrate = 56e9;%[56,72,96,112].*1e9; +conf.interference_path_length = 300; %m +conf.interference_attenuation = [0:2:30,40]; +conf.pam_level = [4,6,8]; +conf.symbolrate = [56,72,96,112].*1e9; conf.bitrate = conf.symbolrate .* floor(log2(6)*10)/10; conf.pam_source = [];