AllenNeuralDynamics / AllenNeuralDynamics/Aind.Behavior.VrForaging.Packaging

`sites` table: `last_stop_time`/`last_stop_duration`/`velocity_at_last_stop` are always null for legacy (`dataset_version < 0.6.0`) sessions

Abierto
#59 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
0
Forks
0
Merge medio
7 h 11 min
PR fusionados (30 d)
12

Descripción

**Summary**

In the `sites` table (parquet or NWB trials table), the last three non-index columns — `last_stop_time`, `last_stop_duration`, `velocity_at_last_stop` — are 100% null for v0.3-0.4 legacy-schema session I've checked. This will happen for all legacy (<0.6) sessions.

**Steps to reproduce**

```python
import pandas as pd

df = pd.read_parquet("/sites.parquet")
cols = ["last_stop_time", "last_stop_duration", "velocity_at_last_stop"]
print(df[cols].isna().mean()) # 1.0, 1.0, 1.0 for every dataset_version < 0.6.0 session
```

Reproduced `dataset_version` 0.3.0 and 0.4.0, e.g. `707349_2024-04-17_10-34-09` (0.3.0) and `behavior_745301_2024-09-11_15-04-58` (0.4.0).

**Root cause (found in source)**

https://github.com/AllenNeuralDynamics/Aind.Behavior.VrForaging.Packaging/tree/main/src/aind_behavior_vr_foraging_packaging/session_pipeline.py's `_LEGACY_VERSION_CUTOFF = 0.6.0` routes any session with `dataset_version < 0.6.0` to `LegacySiteTableProcessor`, [whose docstring states](https://github.com/AllenNeuralDynamics/Aind.Behavior.VrForaging.Packaging/blob/main/src/aind_behavior_vr_foraging_packaging/processing/_legacy_site_table.py#L35C1-L36C1):

> IsStopped and velocity streams are absent; last_stop_* fields are always None.

So this is expected/deliberate behavior for legacy datasets, not a parsing bug.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.