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

Aberta
#59 0 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Python
Estrelas
0
Forks
0
Merge médio
7h 11min
PRs com merge (30d)
12

Descrição

**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.

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.