feat: add physically explicit narrowband MUSIC
This commit is contained in:
@@ -8,6 +8,11 @@ import {
|
||||
createGccPhatAnalysisPlan,
|
||||
estimateGccPhatWorkload,
|
||||
} from "./gcc-phat.js";
|
||||
import {
|
||||
computeMusicMap,
|
||||
createMusicAnalysisPlan,
|
||||
estimateMusicWorkload,
|
||||
} from "./music.js";
|
||||
import {
|
||||
isDasAlgorithm,
|
||||
requireLocalizationAlgorithmDefinition,
|
||||
@@ -27,6 +32,7 @@ export function estimateLocalizationWorkload(options) {
|
||||
const algorithm = requestedAlgorithm(options);
|
||||
if (isDasAlgorithm(algorithm.id)) return estimateDasWorkload(options);
|
||||
if (algorithm.id === "gcc-phat") return estimateGccPhatWorkload(options);
|
||||
if (algorithm.id === "music") return estimateMusicWorkload(options);
|
||||
throw new RangeError("No workload estimator is registered for " + algorithm.id + ".");
|
||||
}
|
||||
|
||||
@@ -37,6 +43,7 @@ export function createLocalizationAnalysisPlan(options) {
|
||||
const algorithm = requestedAlgorithm(options);
|
||||
if (isDasAlgorithm(algorithm.id)) return createDasAnalysisPlan(options);
|
||||
if (algorithm.id === "gcc-phat") return createGccPhatAnalysisPlan(options);
|
||||
if (algorithm.id === "music") return createMusicAnalysisPlan(options);
|
||||
throw new RangeError("No analysis-plan factory is registered for " + algorithm.id + ".");
|
||||
}
|
||||
|
||||
@@ -49,5 +56,6 @@ export async function computeLocalizationMap(options) {
|
||||
const algorithm = requestedAlgorithm(options);
|
||||
if (isDasAlgorithm(algorithm.id)) return computeDasMap(options);
|
||||
if (algorithm.id === "gcc-phat") return computeGccPhatMap(options);
|
||||
if (algorithm.id === "music") return computeMusicMap(options);
|
||||
throw new RangeError("No CPU localization implementation is registered for " + algorithm.id + ".");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user