Split dsp_runid into run preprocessing and scope DSP pipeline

This commit is contained in:
Silas Oettinghaus
2026-03-25 12:55:50 +01:00
parent 2691b90d65
commit 4cef384d15
3 changed files with 309 additions and 296 deletions

View File

@@ -0,0 +1,36 @@
function dspInput = preprocessRunId(run_id, database, options)
%PREPROCESSRUNID Load one run_id and prepare the canonical DSP input.
arguments
run_id
database
options struct
end
dataTable = queryRunid(run_id, database);
[Tx_bits, Symbols, Scpe_cell, found_sync] = loadAndSyncSignalDataFromDb(dataTable, options);
dspInput = struct();
dspInput.run_id = run_id;
dspInput.dataTable = dataTable;
dspInput.Tx_bits = Tx_bits;
dspInput.Symbols = Symbols;
dspInput.Scpe_cell = Scpe_cell;
dspInput.found_sync = found_sync;
dspInput.fsym = dataTable.symbolrate;
dspInput.M = double(dataTable.pam_level);
dspInput.duob_mode = parseDbMode(dataTable.db_mode);
end
function mode = parseDbMode(rawMode)
if isnumeric(rawMode)
mode = db_mode(rawMode);
return
end
if iscell(rawMode)
rawMode = rawMode{1};
end
mode = db_mode(strrep(string(rawMode), '"', ''));
end