init commit

This commit is contained in:
Ayzen
2026-03-05 14:42:33 +03:00
commit fd4618b20d
964 changed files with 325114 additions and 0 deletions
@@ -0,0 +1,30 @@
#pragma once
#include <string>
#include <unordered_map>
#include <vector>
#include "shared_types.hpp"
namespace radar::preprocessing {
class CalibrationMaster;
class ReferenceMaster {
public:
// Loads a serialized raw sweep bundle with one reference trace per combo.
void load_bundle(const std::string& path);
// Builds calibrated references in memory using currently loaded raw references.
// Must be called after load_bundle() and after calibration standards are loaded.
void prepare_calibrated(const CalibrationMaster& calibration_master);
// Ensures all runtime combos are present in loaded references.
void validate_combos(const std::vector<ipc::ComboKey>& combos) const;
// Subtracts per-combo reference trace from calibrated trace.
[[nodiscard]] auto apply(const ipc::SweepTraceBlock& calibrated_trace) const -> ipc::SweepTraceBlock;
private:
std::unordered_map<ipc::ComboKey, ipc::SweepTraceBlock, ipc::ComboKeyHash> raw_references_by_combo_{};
std::unordered_map<ipc::ComboKey, ipc::SweepTraceBlock, ipc::ComboKeyHash> calibrated_references_by_combo_{};
};
} // namespace radar::preprocessing