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