Mark fallback NP computation for future removal
This commit is contained in:
@@ -112,8 +112,8 @@
|
|||||||
$: galleryImages = (detail?.custom as any)?.images as string[] ?? [];
|
$: galleryImages = (detail?.custom as any)?.images as string[] ?? [];
|
||||||
|
|
||||||
|
|
||||||
// Coggan NP from timeseries — mirrors the Python implementation in metrics.py.
|
// TODO(cleanup): fallback NP from timeseries — remove once all activities have been
|
||||||
// Used as fallback for activities extracted before np_power_w was added to the JSON.
|
// re-extracted with np_power_w baked into the JSON. Mirrors metrics.py → _np_power().
|
||||||
function computeNpFromTimeseries(ts: Timeseries): number | null {
|
function computeNpFromTimeseries(ts: Timeseries): number | null {
|
||||||
const { t, power_w } = ts;
|
const { t, power_w } = ts;
|
||||||
if (!power_w || !t || t.length < 30) return null;
|
if (!power_w || !t || t.length < 30) return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user