feat: wavelets
This commit is contained in:
@@ -1719,7 +1719,7 @@ export default function InstrumentDashboard({ instrumentIdProp, isVisible }: { i
|
||||
const WAVELET_SLOPE_LAG = 5
|
||||
|
||||
const waveletEnergy = useMemo(() => {
|
||||
const bands: { label: string; series: number[] }[] = waveletData?.bands ?? []
|
||||
const bands: { label: string; series: number[]; reconstruction_failed?: boolean }[] = waveletData?.bands ?? []
|
||||
const n = bands[0]?.series?.length ?? 0
|
||||
if (!bands.length || n === 0) return null
|
||||
|
||||
@@ -2184,6 +2184,9 @@ export default function InstrumentDashboard({ instrumentIdProp, isVisible }: { i
|
||||
})}
|
||||
/>
|
||||
<span style={{ color: WAVELET_BAND_COLORS[i % WAVELET_BAND_COLORS.length] }}>{b.label}</span>
|
||||
{b.reconstruction_failed && (
|
||||
<span className="text-amber-400" title="Reconstruction indisponible pour cette bande (pas assez d'échelles, ou échec interne de la librairie ondelette) — la série est à zéro, ce n'est pas 'pas d'énergie'.">⚠</span>
|
||||
)}
|
||||
</label>
|
||||
))}
|
||||
</div>
|
||||
@@ -2272,6 +2275,9 @@ export default function InstrumentDashboard({ instrumentIdProp, isVisible }: { i
|
||||
<div className="flex items-center gap-2">
|
||||
<span style={{ color }}>{b.label}</span>
|
||||
{isSlow && <span className="text-slate-600">(lente)</span>}
|
||||
{b.reconstruction_failed && (
|
||||
<span className="text-amber-400" title="Reconstruction indisponible pour cette bande — série à zéro, les chiffres ci-contre ne reflètent pas une vraie absence d'énergie.">⚠</span>
|
||||
)}
|
||||
<Sparkline values={sparkValues} color={color} />
|
||||
</div>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user