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

未關閉
#59 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
0
分支
0
平均合併
7 小時 11 分鐘
30 天內合併 PR
12

描述

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

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。